forked from 0xlaozi/qidao
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
108 lines (105 loc) · 2.88 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
require('dotenv').config()
import {HardhatUserConfig} from "hardhat/types";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-typechain";
let privateKey = process.env.PRIVATE_KEY;
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
solidity: {
compilers: [{ version: "0.5.5", settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
},{ version: "0.5.16", settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
},{ version: "0.6.12", settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
},{ version: "0.7.6", settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
},{ version: "0.8.0", settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
}],
},
networks: {
hardhat: {
forking: {
enabled: true,
url: `https://polygon-mainnet.infura.io/v3/${process.env.POLYGON_INFURA_KEY}`
},
},
polygon:{
chainId: 137,
url: `https://polygon-mainnet.infura.io/v3/${process.env.POLYGON_INFURA_KEY}`,
accounts: [`0x${privateKey}`],
},
avax: {
chainId: 43114,
url: `https://api.avax.network/ext/bc/C/rpc`,
accounts: [`0x${privateKey}`],
},
fantom: {
chainId: 250,
url: `https://rpc.ftm.tools/`,
accounts: [`0x${privateKey}`],
}
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey:{
mainnet: process.env.ETHERSCAN_KEY,
ropsten: process.env.ETHERSCAN_KEY,
rinkeby: process.env.ETHERSCAN_KEY,
goerli: process.env.ETHERSCAN_KEY,
kovan: process.env.ETHERSCAN_KEY,
// binance smart chain
bsc: process.env.BSCSCAN_KEY,
bscTestnet: process.env.BSCSCAN_KEY,
// huobi eco chain
heco: process.env.HECOINFO_KEY,
hecoTestnet: process.env.HECOINFO_KEY,
// fantom mainnet
opera: process.env.FTMSCAN_KEY,
ftmTestnet: process.env.FTMSCAN_KEY,
// optimism
optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_KEY,
optimisticKovan: process.env.OPTIMISTIC_ETHERSCAN_KEY,
// polygon
polygon: process.env.POLYGONSCAN_KEY,
polygonMumbai: process.env.POLYGONSCAN_KEY,
// arbitrum
arbitrumOne: process.env.ARBISCAN_KEY,
arbitrumTestnet: process.env.ARBISCAN_KEY,
// avalanche
avalanche: process.env.SNOWTRACE_KEY,
avalancheFujiTestnet: process.env.SNOWTRACE_KEY,
// moonriver
moonriver: process.env.MOONRIVER_MOONSCAN_KEY,
moonbaseAlpha: process.env.MOONRIVER_MOONSCAN_KEY,
// xdai and sokol don't need an API key, but you still need
// to specify one; any string placeholder will work
xdai: "api-key",
sokol: "api-key",
}
},
};
export default config;