-
Notifications
You must be signed in to change notification settings - Fork 38
/
hardhat.config.ts
83 lines (71 loc) · 2.2 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
import "dotenv/config"
import "@nomiclabs/hardhat-solhint"
import "@nomiclabs/hardhat-waffle"
import "@nomiclabs/hardhat-web3"
import "@nomiclabs/hardhat-ethers"
import "hardhat-gas-reporter"
import "solidity-coverage"
import "hardhat-contract-sizer"
import "hardhat-tracer"
import "hardhat-deploy"
import "hardhat-deploy-ethers"
import "hardhat-spdx-license-identifier"
import "./tasks"
import {HardhatUserConfig} from "hardhat/types"
import {accounts, ChainId, setupNetwork, setupNetworks} from "@layerzerolabs/lz-sdk"
const config: HardhatUserConfig = {
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
contractSizer: {
alphaSort: false,
runOnCompile: true,
disambiguatePaths: false,
},
// for hardhat-deploy
namedAccounts: {
deployer: 0,
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
accounts: accounts()
},
...setupNetworks([
// mainnets
[ChainId.ETHEREUM, { rpcIndex: 0 }],
[ChainId.BSC, { rpcIndex: 0 }],
[ChainId.AVALANCHE, { rpcIndex: 0 }],
[ChainId.POLYGON, { rpcIndex: 0 }],
[ChainId.ARBITRUM, {rpcIndex: 0 }],
[ChainId.OPTIMISM, {rpcIndex: 0 }],
[ChainId.FANTOM, { rpcIndex: 0 }],
[ChainId.SWIMMER, { rpcIndex: 0 }],
[ChainId.DFK, { rpcIndex: 0 }],
[ChainId.HARMONY, { rpcIndex: 0 }],
// testnets
[ChainId.RINKEBY, {rpcIndex: 0}],
[ChainId.BSC_TESTNET, {rpcIndex: 1}],
[ChainId.FUJI, {rpcIndex: 0}],
[ChainId.MUMBAI, {rpcIndex: 0}],
[ChainId.ARBITRUM_RINKEBY, {rpcIndex: 0}],
[ChainId.OPTIMISM_KOVAN, {rpcIndex: 0}],
[ChainId.FANTOM_TESTNET, {rpcIndex: 0}]
]),
// note: setup a single rpc like this. (be sure to comment out the above)
// https://rpc.ftm.tools
// ...setupNetwork(
// {
// url: `https://rpc.ftm.tools`,
// },
// [ChainId.FANTOM]
// ),
}
}
export default config