This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
forked from Uniswap/liquidity-staker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
118 lines (111 loc) · 2.8 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
require('dotenv').config()
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
// import '@eth-optimism/plugins/hardhat/compiler'
import "@eth-optimism/hardhat-ovm"
import { CHAIN_IDS } from './config/constants'
if (
!process.env.DEPLOYER_PRIVATE_KEY
) {
throw new Error('Missing .env or .env parameters')
}
const desiredAccounts: string[] = [
process.env.DEPLOYER_PRIVATE_KEY
]
const isOptimizerEnabled: boolean = true
const numOptimizerRuns: number = 50000
// You have to export an object to set up your config
// This object can have the following optional entries:
// defaultNetwork, networks, solc, and paths.
// Go to https://buidler.dev/config/ to learn more
export default {
networks: {
hardhat: {
allowUnlimitedContractSize: true
},
mainnet: {
url: process.env.RPC_ENDPOINT_MAINNET,
accounts: desiredAccounts,
chainId: CHAIN_IDS.ETHEREUM.MAINNET.toNumber(),
timeout: 480e3
},
kovan: {
url: process.env.RPC_ENDPOINT_KOVAN,
accounts: desiredAccounts,
chainId: CHAIN_IDS.ETHEREUM.KOVAN.toNumber(),
timeout: 480e3
},
goerli: {
url: process.env.RPC_ENDPOINT_GOERLI,
accounts: desiredAccounts,
chainId: CHAIN_IDS.ETHEREUM.GOERLI.toNumber()
},
arbitrum: {
url: process.env.RPC_ENDPOINT_ARBITRUM,
accounts: desiredAccounts,
gasPrice: 0,
chainId: CHAIN_IDS.ARBITRUM.TESTNET_4.toNumber(),
timeout: 480e3
},
optimism: {
url: process.env.RPC_ENDPOINT_OPTIMISM,
accounts: desiredAccounts,
gasPrice: 0,
chainId: CHAIN_IDS.OPTIMISM.HOP_TESTNET.toNumber(),
timeout: 480e3,
ovm: true
},
xdai: {
url: process.env.RPC_ENDPOINT_XDAI,
accounts: desiredAccounts,
gasPrice: 1000000000,
gas: 500000,
chainId: CHAIN_IDS.XDAI.XDAI.toNumber()
},
sokol: {
url: process.env.RPC_ENDPOINT_SOKOL,
accounts: desiredAccounts,
gasPrice: 1000000000,
gas: 500000,
chainId: CHAIN_IDS.XDAI.SOKOL.toNumber()
},
polygon: {
url: process.env.RPC_ENDPOINT_POLYGON,
accounts: desiredAccounts,
gasPrice: 1000000000,
gas: 500000,
chainId: CHAIN_IDS.POLYGON.POLYGON.toNumber()
},
mumbai: {
url: process.env.RPC_ENDPOINT_MUMBAI,
accounts: desiredAccounts,
gasPrice: 1000000000,
gas: 500000,
chainId: CHAIN_IDS.POLYGON.MUMBAI.toNumber()
}
},
ovm: {
solcVersion: '0.6.12'
},
solidity: {
compilers: [
{
settings: {
optimizer: {
enabled: isOptimizerEnabled,
runs: numOptimizerRuns
}
},
version: '0.5.16'
}
]
},
mocha: {
timeout: 40000
}
// abiExporter: {
// path: './data/abi',
// clear: true,
// flat: true
// }
}