-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.js
75 lines (65 loc) · 1.77 KB
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-gas-reporter");
require("solidity-coverage");
require('@openzeppelin/hardhat-upgrades');
/** @type import('hardhat/config').HardhatUserConfig */
require('dotenv').config();
require('hardhat-contract-sizer');
require("./tasks/upgrade-poap")
require("./tasks/deploy-poap")
module.exports = {
solidity: "0.8.7",
gasReporter: {
enabled: process.env.REPORT_GAS
},
allowUnlimitedContractSize: true,
networks: {
hardhat: {},
},
};
const { Goerli_API_URL, Goerli_PRIVATE_KEY } = process.env;
if (Goerli_API_URL) {
module.exports['networks']['goerli'] = {
url: Goerli_API_URL,
accounts: [`0x${Goerli_PRIVATE_KEY}`],
timeout: 100000000
};
}
const { Gnosis_PRIVATE_KEY } = process.env;
if (Gnosis_PRIVATE_KEY) {
module.exports['networks']['gnosis'] = {
accounts: [`0x${Gnosis_PRIVATE_KEY}`],
url: "https://rpc.gnosischain.com",
};
module.exports['networks']['chiado'] = {
url: "https://rpc.chiadochain.net",
gasPrice: 1000000000,
accounts: [`0x${Gnosis_PRIVATE_KEY}`],
};
}
const { Etherscan_API } = process.env;
const { Gnosis_API } = process.env;
module.exports['etherscan'] = {
customChains: [
{
network: "gnosis",
chainId: 100,
urls: {
// 3) Select to what explorer verify the contracts
// Gnosisscan
apiURL: "https://api.gnosisscan.io/api",
browserURL: "https://gnosisscan.io/",
// Blockscout
// apiURL: "https://blockscout.com/xdai/mainnet/api",
// browserURL: "https://blockscout.com/xdai/mainnet",
},
},
],
apiKey: {
mainnet: Etherscan_API,
gnosis: Gnosis_API
},
}