-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
84 lines (77 loc) · 2.07 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
import 'dotenv/config'
import { getEnvValSafe } from './utils'
import { HardhatUserConfig } from 'hardhat/config'
import '@nomicfoundation/hardhat-foundry'
import '@nomicfoundation/hardhat-network-helpers'
import '@nomiclabs/hardhat-solhint'
import '@nomicfoundation/hardhat-toolbox'
import './tasks/verify'
import './tasks/automatedClaim'
import './tasks/season'
import './tasks/admin'
import { formatUnits, parseUnits } from 'ethers'
const AVALANCHE_RPC_URL = getEnvValSafe('AVALANCHE_RPC_URL')
const FUJI_RPC_URL = getEnvValSafe('FUJI_RPC_URL')
const DEPLOYER_PRIVATE_KEY = getEnvValSafe('PRIVATE_KEY')
const COINMARKETCAP_API_KEY = getEnvValSafe('COINMARKETCAP_API_KEY')
const SNOWTRACE_API_KEY = getEnvValSafe('SNOWTRACE_API_KEY', false)
const config: HardhatUserConfig = {
networks: {
avalanche: {
accounts: [DEPLOYER_PRIVATE_KEY],
chainId: 43114,
url: AVALANCHE_RPC_URL,
gasPrice: +parseUnits('28', 'gwei').toString(),
},
fuji: {
accounts: [DEPLOYER_PRIVATE_KEY],
chainId: 43113,
url: FUJI_RPC_URL,
gas: 8000000,
timeout: 10000000,
},
hardhat: {
forking: {
// blockNumber: 21540815,
blockNumber: 32454282, //this is the block at which the fix was deployed.
url: AVALANCHE_RPC_URL,
},
},
},
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
},
},
etherscan: {
apiKey: {
snowtrace: 'snowtrace',
snowtraceFuji: 'snowtraceFuji',
},
customChains: [
{
network: 'snowtrace',
chainId: 43114,
urls: {
apiURL:
'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan',
browserURL: 'https://snowtrace.dev/',
},
},
{
network: 'snowtraceFuji',
chainId: 43113,
urls: {
apiURL:
'https://api.routescan.io/v2/network/testnet/evm/43113/etherscan',
browserURL: 'https://testnet.snowtrace.io/',
},
},
],
},
}
export default config