forked from rmrk-team/evm-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
executable file
·149 lines (146 loc) · 5.14 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
import * as dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@typechain/hardhat';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
import 'hardhat-contract-sizer';
dotenv.config();
const config: HardhatUserConfig = {
solidity: {
version: '0.8.21',
settings: {
evmVersion: 'london',
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
moonbaseAlpha: {
url: process.env.MOONBASE_URL || 'https://rpc.testnet.moonbeam.network',
chainId: 1287,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 1100000000,
},
sepolia: {
url: process.env.SEPOLIA_URL || 'https://rpc.sepolia.dev',
chainId: 11155111,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
polygonMumbai: {
url: process.env.MUMBAI_URL || 'https://rpc-mumbai.maticvigil.com',
chainId: 80001,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 2500000000,
},
baseGoerli: {
chainId: 84531,
url: process.env.BASE_GOERLI_URL || 'https://goerli.base.org',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 2000000000,
},
shibuya: {
chainId: 81,
url: process.env.SHIBUYA_URL || 'https://evm.shibuya.astar.network',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
moonriver: {
url: process.env.MOONRIVER_URL || 'https://rpc.api.moonriver.moonbeam.network',
chainId: 1285,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
moonbeam: {
url: process.env.MOONBEAM_URL || 'https://rpc.api.moonbeam.network',
chainId: 1284,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
mainnet: {
url: process.env.ETHEREUM_URL || 'https://eth.drpc.org',
chainId: 1,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 12000000000,
},
polygon: {
url: process.env.POLYGON_URL || 'https://polygon.drpc.org',
chainId: 137,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gasPrice: 120000000000,
},
base: {
chainId: 8453,
url: process.env.BASE_URL || 'https://developer-access-mainnet.base.org',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
astar: {
url: process.env.ASTAR_URL || 'https://evm.astar.network',
chainId: 592,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
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,
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: 'USD',
coinmarketcap: process.env.COIN_MARKET_CAP_KEY || '',
gasPrice: 50,
},
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
shibuya: process.env.SHIBUYA_BLOCKSCOUT_API_KEY || '', // Shibuya blockscout API KeyT
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: '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/',
},
},
],
},
};
export default config;