-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
78 lines (74 loc) · 1.99 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
import dotenv from 'dotenv'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import {HardhatUserConfig} from 'hardhat/types/config';
dotenv.config()
const { INFURA_API_KEY, PRIVATE_KEY, ETHERSCAN_API_KEY, POLYGONSCAN_KEY, SNOWTRACE_API_KEY } = process.env;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 1000,
}
}
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
/**
accounts: [{
privateKey: `0x${PRIVATE_KEY}`,
balance: '100000000000000000000'
}],
**/
chainId: 1337,
// forking: {
// url: "https://rinkeby.infura.io/v3/" + INFURA_API_KEY,
// blockNumber: 7425305
// }
},
rinkeby: {
url: "https://rinkeby.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
goerli: {
url: "https://goerli.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
mainnet: {
url: "https://mainnet.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
polygon: {
url: "https://polygon-mainnet.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
polygonMumbai: {
url: "https://polygon-mumbai.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
avalancheFujiTestnet: {
url: "https://avalanche-fuji.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
},
avalanche: {
url: "https://avalanche-mainnet.infura.io/v3/" + INFURA_API_KEY,
accounts: [`0x${PRIVATE_KEY}`]
}
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
rinkeby: ETHERSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
polygon: POLYGONSCAN_KEY,
polygonMumbai: POLYGONSCAN_KEY,
avalancheFujiTestnet: SNOWTRACE_API_KEY,
avalanche: SNOWTRACE_API_KEY,
}
}
}
export default config