-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhardhat.network.ts
115 lines (108 loc) · 2.58 KB
/
hardhat.network.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
115
import { HardhatUserConfig } from 'hardhat/config'
import fs from 'fs'
import { ethers } from 'ethers'
const alchemyKey = 'EuD-FVgI2gMBGf0aypDghsPHYWHB9nhn'
function mnemonic() {
try {
return fs.readFileSync(`./mnemonic.txt`).toString().trim()
} catch (e) {
console.log('☢️ warning: No mnemonic file created for a deploy account. Try `yarn run generate` and then `yarn run account`.')
}
return ''
}
//
// Select the network you want to deploy to here:
//
const networks: HardhatUserConfig['networks'] = {
hardhat: {
chainId: 1337,
allowUnlimitedContractSize: true,
mining: {
auto: true,
interval: 5000,
},
accounts: {
mnemonic: mnemonic(),
count: 20,
accountsBalance: '10000000000000000000000',
},
},
hardhat2: {
url: 'http://127.0.0.1:3000',
chainId: 1338,
allowUnlimitedContractSize: true,
mining: {
auto: true,
interval: 5000,
},
accounts: {
mnemonic: mnemonic(),
count: 20,
accountsBalance: '10000000000000000000000',
},
},
coverage: {
url: 'http://127.0.0.1:8555',
blockGasLimit: 200000000,
allowUnlimitedContractSize: true,
},
lux: {
url: 'https://api.lux.network',
accounts: {
mnemonic: mnemonic(),
},
chainId: 96369,
live: true,
saveDeployments: true,
//gasPrice: ethers.utils.parseUnits(`155`, 'gwei').toNumber(),
blockGasLimit: 4000000,
},
mainnet: {
url: 'https://mainnet.infura.io/v3/30171d2ba65445de9271453dbc6ca307',
accounts: {
mnemonic: mnemonic(),
},
chainId: 1,
live: true,
saveDeployments: true,
gasPrice: ethers.utils.parseUnits(`155`, 'gwei').toNumber(),
blockGasLimit: 4000000,
},
// testnet: {
// url: 'https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
// chainId: 4,
// // gasPrice: 11e9,
// // gas: 20e6,
// accounts: {
// mnemonic: mnemonic(),
// },
// },
testnet: {
url: `https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161`,
accounts: {
mnemonic: mnemonic(),
},
chainId: 3,
live: true,
saveDeployments: true,
tags: ["staging"],
gasPrice: ethers.utils.parseUnits(`50`, 'gwei').toNumber(),
blockGasLimit: 4000000,
gasMultiplier: 2,
},
}
// if (process.env.FORK_ENABLED == "true") {
// networks.hardhat = {
// chainId: 1,
// forking: {
// url: `https://eth-mainnet.alchemyapi.io/v2/${alchemyKey}`,
// // blockNumber: 12226812
// },
// accounts: {
// mnemonic,
// },
// }
// } else {
// }
export {}
export default networks