-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
55 lines (51 loc) · 1.06 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
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import 'hardhat-deploy';
import env from './config';
import './tasks';
const { POLYGON_PRIVKEY, POLYGON_NODE_URL, POLYGON_ETHERSCAN_API } = env;
let accounts;
if (POLYGON_PRIVKEY) {
accounts = [POLYGON_PRIVKEY];
} else {
accounts = {
mnemonic: 'test test test test test test test test test test test test',
};
}
const config: HardhatUserConfig = {
networks: {
hardhat: {
// forking: {
// url: POLYGON_NODE_URL || 'https://polygon-rpc.com/',
// blockNumber: 41_000_000,
// },
},
polygon: {
url: POLYGON_NODE_URL || 'https://polygon-rpc.com/',
chainId: 137,
accounts,
},
},
namedAccounts: {
deployer: 0,
owner: {
default: 0,
polygon: 1,
},
},
etherscan: {
apiKey: {
polygon: POLYGON_ETHERSCAN_API,
},
},
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
};
export default config;