-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
95 lines (87 loc) · 1.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
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
import Dotenv from 'dotenv'
Dotenv.config()
const {
API_KEY_ALCHEMY,
PKEY_ETH_MAIN,
PKEY_ETH_TEST,
CACHE_PATH,
API_KEY_INFURA,
} = process.env
// As the PKEYs are only used for deployment, we use default dummy PKEYs if none are set in .env file, so that project can compile
const pkeyMainnet =
PKEY_ETH_MAIN == undefined || PKEY_ETH_MAIN.length == 0
? 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
: PKEY_ETH_MAIN
const pkeyTestnet =
PKEY_ETH_TEST == undefined || PKEY_ETH_TEST.length == 0
? 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
: PKEY_ETH_TEST
export default {
solidity: {
compilers: [
{
version: '0.8.19',
settings: {
viaIR: false,
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
overrides: {
'contracts/staking/VxPremia.sol': {
version: '0.8.19',
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
},
paths: {
cache: CACHE_PATH ?? './cache',
},
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${API_KEY_ALCHEMY}`,
blockNumber: 16597500,
},
blockGasLimit: 180000000000,
},
anvil: {
url: `http://127.0.0.1:8545`,
accounts: [pkeyTestnet],
},
arbitrum: {
url: `https://arb-mainnet.g.alchemy.com/v2/${API_KEY_ALCHEMY}`,
accounts: [pkeyMainnet],
timeout: 300000,
},
arbitrumGoerli: {
url: `https://arbitrum-goerli.infura.io/v3/${API_KEY_INFURA}`,
accounts: [pkeyTestnet],
timeout: 300000,
},
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${API_KEY_ALCHEMY}`,
accounts: [pkeyTestnet],
timeout: 300000,
},
arbitrumNova: {
url: `https://nova.arbitrum.io/rpc`,
accounts: [pkeyMainnet],
timeout: 300000,
},
},
mocha: {
timeout: 6000000,
},
}