generated from rmrk-team/evm-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
executable file
·201 lines (196 loc) · 6.17 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
import * as dotenv from 'dotenv';
import { ethers } from 'ethers';
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@typechain/hardhat';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
import 'hardhat-contract-sizer';
// import './tasks/calculateSalt'; // Needs to be commented for first compile
import './tasks/getMigrationForBatch';
import './tasks/getTxToStartMoonriverMigration';
dotenv.config();
const accounts = process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [];
const randomAccounts = [...Array(5)].map(() => ({
privateKey: ethers.Wallet.createRandom().privateKey,
balance: '10000000000000000000000',
}));
const config: HardhatUserConfig = {
solidity: {
version: '0.8.21',
settings: {
evmVersion: 'london',
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
accounts: [
{
// We need the first account to be the deployer
privateKey: accounts[0],
balance: '10000000000000000000000',
},
].concat(randomAccounts),
},
modularium: {
url: 'https://fraa-dancebox-3035-rpc.a.dancebox.tanssi.network',
chainId: 776877,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 1000000000,
},
moonbaseAlpha: {
url: process.env.MOONBASE_URL || 'https://rpc.testnet.moonbeam.network',
chainId: 1287,
accounts: accounts,
gasPrice: 1125000000,
},
sepolia: {
url: process.env.SEPOLIA_URL || 'https://rpc.sepolia.dev',
chainId: 11155111,
accounts: accounts,
gasPrice: 100000000000,
},
polygonMumbai: {
url: process.env.MUMBAI_URL || 'https://rpc-mumbai.maticvigil.com',
chainId: 80001,
accounts: accounts,
gasPrice: 2500000000,
},
baseGoerli: {
chainId: 84531,
url: process.env.BASE_GOERLI_URL || 'https://goerli.base.org',
accounts: accounts,
gasPrice: 2000000000,
},
baseSepolia: {
chainId: 84532,
url: process.env.BASE_SEPOLIA_URL || 'https://sepolia.base.org',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 900000000,
},
shibuya: {
chainId: 81,
url: process.env.SHIBUYA_URL || 'https://evm.shibuya.astar.network',
accounts: accounts,
// gasPrice: 2000000000,
},
zkatana: {
chainId: 1261120,
url: process.env.ZKATANA_URL || 'https://rpc.startale.com/zkatana',
accounts: accounts,
gasPrice: 650000000,
},
moonriver: {
url: process.env.MOONRIVER_URL || 'https://rpc.api.moonriver.moonbeam.network',
chainId: 1285,
accounts: accounts,
},
moonbeam: {
url: process.env.MOONBEAM_URL || 'https://rpc.api.moonbeam.network',
chainId: 1284,
accounts: accounts,
},
mainnet: {
url: process.env.ETHEREUM_URL || 'https://eth.drpc.org',
chainId: 1,
accounts: accounts,
gasPrice: 26000000000,
},
polygon: {
url: process.env.POLYGON_URL || 'https://polygon.drpc.org',
chainId: 137,
accounts: accounts,
gasPrice: 600000000000,
},
base: {
chainId: 8453,
url: process.env.BASE_URL || 'https://developer-access-mainnet.base.org',
accounts: accounts,
// gasPrice: 500000,
},
astar: {
url: process.env.ASTAR_URL || 'https://evm.astar.network',
chainId: 592,
accounts: accounts,
},
bsc: {
url: process.env.BSC_URL || 'https://bsc-dataseed.bnbchain.org',
chainId: 56,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 3000000000,
},
},
etherscan: {
apiKey: {
moonbaseAlpha: process.env.MOONSCAN_APIKEY || '', // Moonbeam Moonscan API Key
sepolia: process.env.ETHERSCAN_API_KEY || '', // Sepolia Etherscan API Key
polygonMumbai: process.env.POLYGONSCAN_API_KEY || '', // Polygon Mumbai Etherscan API Key
baseGoerli: process.env.BASESCAN_API_KEY || '', // Base Goerli Etherscan API Key
baseSepolia: process.env.BASESCAN_API_KEY || '', // Base Goerli Etherscan API Key
shibuya: process.env.SHIBUYA_BLOCKSCOUT_API_KEY || '', // Shibuya blockscout API Key
zkatana: process.env.ZKATANA_BLOCKSCOUT_API_KEY || '', // ZKatana blockscout API Key
moonriver: process.env.MOONSCAN_APIKEY || '', // Moonriver Moonscan API Key
moonbeam: process.env.MOONSCAN_APIKEY || '', // Moonbeam Moonscan API Key
mainnet: process.env.ETHERSCAN_API_KEY || '', // Ethereum Etherscan API Key
polygon: process.env.POLYGONSCAN_API_KEY || '', // Polygon Etherscan API Key
base: process.env.BASESCAN_API_KEY || '', // Base Etherscan API Key
astar: process.env.ASTAR_BLOCKSCOUT_API_KEY || '', // Astar blockscout API Key
bsc: process.env.BSCSCAN_API_KEY || '', // BSC Etherscan API Key
},
customChains: [
{
network: 'baseGoerli',
chainId: 84531,
urls: {
apiURL: 'https://api-goerli.basescan.org/api',
browserURL: 'https://goerli.basescan.org',
},
},
{
network: 'baseSepolia',
chainId: 84532,
urls: {
apiURL: 'https://api-sepolia.basescan.org/api',
browserURL: 'https://sepolia.basescan.org',
},
},
{
network: 'base',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.org/api',
browserURL: 'https://basescan.org',
},
},
{
network: 'shibuya',
chainId: 81,
urls: {
apiURL: 'https://blockscout.com/shibuya/api',
browserURL: 'https://blockscout.com/shibuya',
},
},
{
network: 'astar',
chainId: 592,
urls: {
apiURL: 'https://blockscout.com/astar/api',
browserURL: 'https://blockscout.com/astar/',
},
},
{
network: 'zkatana',
chainId: 1261120,
urls: {
apiURL: 'https://zkatana.blockscout.com/api',
browserURL: 'https://zkatana.blockscout.com',
},
},
],
},
};
export default config;