-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
156 lines (154 loc) · 4.47 KB
/
hardhat.config.ts
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
require('dotenv').config({ path: './.env' });
import { HardhatUserConfig } from 'hardhat/types';
import '@nomiclabs/hardhat-ethers';
import '@typechain/hardhat';
import 'hardhat-deploy';
import '@nomiclabs/hardhat-waffle';
import '@nomiclabs/hardhat-solhint';
import 'hardhat-gas-reporter';
import '@nomiclabs/hardhat-etherscan';
// import "hardhat-ethernal"
const INFURA_API_KEY = process.env.INFURA_API_KEY!;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY!;
const GET_BLOCK_API_KEY = process.env.GET_BLOCK_API_KEY!;
const DEPLOY_PK = process.env.DEPLOY_PK!;
const COINMARKETCAP_API = process.env.COINMARKETCAP_API!;
const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS!;
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
solidity: {
compilers: [{ version: '0.8.7' }, { version: '0.8.3' }],
settings: { optimizer: { enabled: true, runs: 200 } },
},
networks: {
/** comment out this hardhat config if running tests */
// hardhat: {
// mining: {
// auto: false,
// interval: 1000,
// },
// },
/** ^^^ */
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [DEPLOY_PK],
chainId: 1,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,
accounts: [DEPLOY_PK],
chainId: 4,
},
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_API_KEY}`,
accounts: [DEPLOY_PK],
chainId: 5,
},
sepolia: {
url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
accounts: [DEPLOY_PK],
chainId: 11155111,
},
base_goerli: {
url: `https://goerli.base.org`,
accounts: [DEPLOY_PK],
chainId: 84531,
},
base: {
url: `https://mainnet.base.org`,
accounts: [DEPLOY_PK],
chainId: 8453,
},
xdai: {
url: 'https://rpc.gnosischain.com/',
accounts: [DEPLOY_PK],
chainId: 100,
},
rsk: {
url: `https://rsk.getblock.io/${GET_BLOCK_API_KEY}/mainnet/`,
accounts: [DEPLOY_PK],
chainId: 30,
},
polygon: {
url: 'https://polygon-rpc.com/',
accounts: [DEPLOY_PK],
chainId: 137,
gasPrice: 80000000000,
},
harmony_testnet: {
url: 'https://api.s0.b.hmny.io',
accounts: [DEPLOY_PK],
chainId: 1666700000,
},
harmony: {
url: 'https://a.api.s0.t.hmny.io',
accounts: [DEPLOY_PK],
chainId: 1666600000,
},
avalanche_cChain: {
url: 'https://api.avax.network/ext/bc/C/rpc',
accounts: [DEPLOY_PK],
chainId: 43114,
},
celo: {
url: `https://forno.celo.org`,
accounts: [DEPLOY_PK],
chainId: 42220,
},
aurora: {
url: `https://mainnet.aurora.dev`,
accounts: [DEPLOY_PK],
chainId: 1313161554,
},
moonbeam: {
url: `https://rpc.api.moonbeam.network`,
accounts: [DEPLOY_PK],
chainId: 1284,
},
arbitrum: {
url: `https://arb1.arbitrum.io/rpc`,
accounts: [DEPLOY_PK],
chainId: 42161,
},
fuse: {
url: `https://rpc.fuse.io`,
accounts: [DEPLOY_PK],
chainId: 122,
},
optimism: {
url: 'https://mainnet.optimism.io',
accounts: [DEPLOY_PK],
chainId: 10,
},
bnb: {
url: `https://bsc-dataseed.binance.org/`,
accounts: [DEPLOY_PK],
chainId: 56,
},
},
namedAccounts: {
deployer: {
default: DEPLOYER_ADDRESS,
},
},
gasReporter: {
enabled: true,
currency: 'USD',
gasPrice: 100,
// coinmarketcap: COINMARKETCAP_API,
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
customChains: [
{
network: 'base-goerli',
chainId: 84531,
urls: {
apiURL: 'https://api-goerli.basescan.org/api',
browserURL: 'https://goerli.basescan.org',
},
},
],
},
};
export default config;