-
Notifications
You must be signed in to change notification settings - Fork 36
/
hardhat.config.ts
105 lines (100 loc) · 2.59 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
import dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@openzeppelin/hardhat-upgrades';
import '@nomicfoundation/hardhat-verify';
dotenv.config();
const DEFAULT_MNEMONIC = 'test test test test test test test test test test test junk';
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.27',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
]
},
networks: {
// main: {
// chainId: 137,
// url: `${process.env.MAIN_RPC_URL}`,
// accounts: [`0x${process.env.MAIN_PRIVATE_KEY}`],
// gasPrice: 200000000000
// },
// amoy: {
// chainId: 80002,
// url: `${process.env.AMOY_RPC_URL}`,
// accounts: [`0x${process.env.AMOY_PRIVATE_KEY}`]
// },
// 'linea-sepolia': {
// chainId: 59141,
// url: `${process.env.LINEA_SEPOLIA_RPC_URL}`,
// accounts: [`0x${process.env.LINEA_SEPOLIA_PRIVATE_KEY}`]
// },
// linea: {
// chainId: 59144,
// url: `${process.env.LINEA_RPC_URL}`,
// accounts: [`0x${process.env.LINEA_PRIVATE_KEY}`]
// },
localhost: {
url: 'http://127.0.0.1:8545',
accounts: {
mnemonic: DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20
}
}
},
etherscan: {
apiKey: {
linea: process.env.LINEA_API_KEY,
'linea-sepolia': process.env.LINEA_API_KEY,
amoy: process.env.AMOY_API_KEY
},
customChains: [
{
network: 'amoy',
chainId: 80002,
urls: {
apiURL:
'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/AMOY_TESTNET',
browserURL: 'https://www.oklink.com/amoy'
}
},
{
network: 'linea-sepolia',
chainId: 59141,
urls: {
apiURL: 'https://api-sepolia.lineascan.build/api',
browserURL: 'https://sepolia.lineascan.build'
}
},
{
network: 'linea',
chainId: 59144,
urls: {
apiURL: 'https://api.lineascan.build/api',
browserURL: 'https://lineascan.build'
}
}
]
},
gasReporter: {
currency: 'USD',
coinmarketcap: process.env.COINMARKETCAP_KEY,
enabled: !!process.env.REPORT_GAS,
token: 'MATIC'
}
};
export default config;