-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
72 lines (67 loc) · 1.67 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
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.20'
},
{
version: '0.8.16'
}
]
},
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}`]
},
localhost: {
url: 'http://127.0.0.1:8545',
accounts: {
mnemonic: DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20
}
}
},
etherscan: {
apiKey: process.env.OKLINK_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'
}
}
]
},
gasReporter: {
currency: 'USD',
coinmarketcap: process.env.COINMARKETCAP_KEY,
enabled: !!process.env.REPORT_GAS,
token: 'MATIC'
}
};
export default config;