-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
90 lines (85 loc) · 1.95 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
import 'dotenv/config';
import 'hardhat-deploy';
import '@tenderly/hardhat-tenderly';
import '@eth-optimism/hardhat-ovm';
import '@nomiclabs/hardhat-waffle';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import 'hardhat-interface-generator';
import './tasks/peronio';
import './tasks/dex';
import './tasks/polygonscan';
//
// Select the network you want to deploy to here:
//
const defaultNetwork = 'localhost';
const gasPrice = parseFloat(process.env.GAS_PRICE || '1');
const PRIVATE_KEY = process.env.PRIVATE_KEY ?? '';
const ETHERSCAN_API = process.env.ETHERSCAN_API ?? '';
module.exports = {
defaultNetwork,
gasPrice,
networks: {
hardhat: {
chainId: 31337,
forking: {
url: "https://polygon-mainnet.g.alchemy.com/v2/Wi60JHV5bj80NSw9BCvE48Gz5Z-3oajq",
blockNumber: 24464942
},
mining: {
auto: true,
interval: 1000
}
},
localhost: {
chainId: 31337,
url: 'http://localhost:8545',
accounts: [`${PRIVATE_KEY}`],
},
matic: {
chainId: 137,
url: 'https://polygon-mainnet.infura.io/v3/2343217699c44b45851935789f1f89e6',
gasPrice: gasPrice * 10 ** 9,
accounts: [`${PRIVATE_KEY}`],
},
mumbai: {
chainId: 80001,
url: 'https://rpc-mumbai.maticvigil.com/',
gasPrice: gasPrice * 10 ** 9,
accounts: [`${PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: ETHERSCAN_API,
},
solidity: {
compilers: [
{
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
ovm: {
solcVersion: '0.7.6',
},
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
},
},
};