-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
114 lines (110 loc) · 2.7 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
/* eslint-disable global-require */
import { opendirSync } from 'fs';
import { HardhatUserConfig } from 'hardhat/types';
import { env } from './env';
import 'hardhat-typechain';
import '@nomiclabs/hardhat-ethers';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
if (env.DUELIST_KING_DEPLOY_MNEMONIC !== 'baby nose young alone sport inside grain rather undo donor void exotic') {
const dir = opendirSync(`${__dirname}/tasks`);
for (let entry = dir.readSync(); entry !== null; entry = dir.readSync()) {
if (entry.name.toLowerCase().includes('.ts')) {
// eslint-disable-next-line import/no-dynamic-require
require(`./tasks/${entry.name.replace(/\.ts$/gi, '')}`);
}
}
}
const compilers = ['0.8.7'].map((item: string) => ({
version: item,
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
}));
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
polygon: {
url: env.DUELIST_KING_RPC,
chainId: 137,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
fantom: {
url: env.DUELIST_KING_RPC,
chainId: 250,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
binance: {
url: env.DUELIST_KING_RPC,
chainId: 56,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
mumbai: {
url: env.DUELIST_KING_RPC,
chainId: 80001,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
bnbtest: {
url: env.DUELIST_KING_RPC,
chainId: 97,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
testnet: {
url: env.DUELIST_KING_RPC,
// Fantom testnet
chainId: 4002,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
local: {
url: 'http://localhost:8545/',
chainId: 911,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
},
// Hard hat network
hardhat: {
chainId: 911,
hardfork: 'london',
blockGasLimit: 30000000,
initialBaseFeePerGas: 0,
gas: 25000000,
accounts: {
mnemonic: env.DUELIST_KING_DEPLOY_MNEMONIC,
path: "m/44'/60'/0'/0",
},
forking: env.DUELIST_KING_FORK
? {
url: env.DUELIST_KING_RPC,
enabled: true,
}
: undefined,
},
},
solidity: {
compilers,
},
};
export default config;