-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
83 lines (79 loc) · 2.06 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
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
require("@openzeppelin/hardhat-upgrades");
// require('hardhat-contract-sizer');
require("solidity-coverage");
require("dotenv").config();
const alchemy = {
mainnet: 'https://eth-mainnet.alchemyapi.io/v2/',
arbitrum: 'https://arb-mainnet.g.alchemy.com/v2/',
optimism: 'https://opt-mainnet.g.alchemy.com/v2/',
polygon: 'https://polygon-mainnet.g.alchemy.com/v2/',
goerli: 'https://eth-goerli.alchemyapi.io/v2/'
}
const key = process.env.ALCHEMY_KEY;
if(!key) {
console.log('please set your ALCHEMY_KEY in .env');
return;
}
module.exports = {
networks: {
hardhat: {
forking: {
url: alchemy.mainnet + key,
enabled: false,
blockNumber: 14954700,
},
initialBaseFeePerGas: 0,
allowUnlimitedContractSize: true,
},
mainnet: {
url: alchemy.mainnet + key,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
gasPrice: 155000000000,
gas: 2222222,
},
arbitrum: {
url: alchemy.arbitrum + key,
accounts: [process.env.DEPLOYER_PRIVATE_KEY, process.env.ADMIN_2_PRIVATE_KEY],
gas: 77777777,
//gasPrice: 1000000000
},
optimism: {
url: alchemy.optimism + key,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
// gasPrice: 44000000000, // 44 gwei
gas: 15000000,
},
polygon: {
url: alchemy.polygon + key,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
// gasPrice: 44000000000 // 44 gwei,
gas: 8888888,
},
goerli: {
url: alchemy.goerli + key,
accounts: [process.env.ADMIN_PRIVATE_KEY, process.env.ADMIN_2_PRIVATE_KEY],
}
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
solidity: {
version: "0.8.15",
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
contractSizer: {
alphaSort: true,
runOnCompile: false,
},
};