-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
77 lines (73 loc) · 1.77 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
import '@nomiclabs/hardhat-waffle';
import * as dotenv from 'dotenv';
import 'hardhat-gas-reporter';
import 'hardhat-typechain';
import { HardhatUserConfig } from 'hardhat/types';
dotenv.config();
const { INFURA_KEY, TEST_MNEMONIC } = process.env;
const config: HardhatUserConfig = {
solidity: {
version: '0.8.13',
// https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description
settings: {
optimizer: {
enabled: true,
runs: 200,
details: {
deduplicate: true,
cse: true,
constantOptimizer: true,
yul: true,
},
},
},
},
gasReporter: {
showTimeSpent: true,
gasPrice: 50, // ETH easily achievable minimum
currency: 'USD',
},
defaultNetwork: 'hardhat',
networks: {
/*ethereum: {
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
chainId: 1,
},*/
kovan: {
url: `https://kovan.infura.io/v3/${INFURA_KEY}`,
accounts: TEST_MNEMONIC ? {
mnemonic: TEST_MNEMONIC,
count: 5,
} : undefined,
chainId: 42,
gasPrice: 1e9,
},
/*bsc: {
url: 'https://bsc-dataseed.binance.org/',
chainId: 56,
},*/
bsctest: {
url: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
chainId: 97,
accounts: TEST_MNEMONIC ? {
mnemonic: TEST_MNEMONIC,
count: 5,
} : undefined,
},
hardhat: {
gasPrice: 90000000000,
chainId: 1337,
accounts: TEST_MNEMONIC ? {
mnemonic: TEST_MNEMONIC,
count: 5,
} : undefined,
hardfork: 'london',
forking: {
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
// blockNumber: 12363083,
enabled: false,
},
}
},
};
export default config;