-
Notifications
You must be signed in to change notification settings - Fork 4
/
hardhat.config.js
110 lines (106 loc) · 2.47 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
require("dotenv").config({ path: "./.env" });
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
require("solidity-coverage");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-etherscan");
const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY, ARBISCAN_API_KEY, PK } =
process.env;
const DEFAULT_MNEMONIC = "hello darkness my old friend";
const sharedNetworkConfig = {};
if (PK) {
sharedNetworkConfig.accounts = [PK];
} else {
sharedNetworkConfig.accounts = {
mnemonic: MNEMONIC || DEFAULT_MNEMONIC,
};
}
require("./tasks/seedManagement");
require("./tasks/gnosisManagment");
module.exports = {
paths: {
artifacts: "build/artifacts",
cache: "build/cache",
deploy: "deploy",
sources: "contracts",
imports: "imports",
},
defaultNetwork: "hardhat",
networks: {
localhost: {
...sharedNetworkConfig,
blockGasLimit: 100000000,
gas: 2000000,
saveDeployments: false,
},
hardhat: {
blockGasLimit: 10000000000000,
gas: 200000000000,
saveDeployments: false,
initialBaseFeePerGas: 0,
hardfork: "london",
},
mainnet: {
...sharedNetworkConfig,
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
saveDeployments: true,
},
goerli: {
...sharedNetworkConfig,
url: `https://goerli.infura.io/v3/${INFURA_KEY}`,
saveDeployments: true,
},
ganache: {
...sharedNetworkConfig,
url: "http://127.0.0.1:7545",
saveDeployments: false,
},
arbitrumTest: {
...sharedNetworkConfig,
url: "https://rinkeby.arbitrum.io/rpc",
saveDeployments: true,
},
arbitrum: {
...sharedNetworkConfig,
url: "https://arb1.arbitrum.io/rpc",
saveDeployments: true,
},
alfajores: {
...sharedNetworkConfig,
url: "https://alfajores-forno.celo-testnet.org",
saveDeployments: true,
},
celo: {
...sharedNetworkConfig,
url: "https://forno.celo.org",
saveDeployments: true,
},
},
solidity: {
compilers: [
{
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
arbitrumOne: ARBISCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
},
},
namedAccounts: {
root: 0,
prime: 1,
beneficiary: 2,
},
};