-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhardhat.config.js
More file actions
183 lines (170 loc) · 5.34 KB
/
hardhat.config.js
File metadata and controls
183 lines (170 loc) · 5.34 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
require('dotenv').config();
require("@nomicfoundation/hardhat-toolbox");
// require("solidity-coverage")
// require('hardhat-contract-sizer'); //npx hardhat size-contracts
const kovanURL = `https://eth-kovan.alchemyapi.io/v2/${process.env.ALCHEMY_KOVAN}`
const goerliURL = `https://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_GOERLI}`
const rinkebyURL = /*`https://rinkeby.infura.io/v3/${process.env.INFURA_ID_PROJECT}` */`https://eth-rinkeby.alchemyapi.io/v2/${process.env.ALCHEMY_RINKEBY}`
const bscURL = 'https://bsc-dataseed.binance.org' //`https://eth-rinkeby.alchemyapi.io/v2/${process.env.ALCHEMY_RINKEBY}`
const mainnetURL = `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_MAINNET}`
const maticURL = `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_MATIC}`
const mumbaiURL = 'https://matic-mumbai.chainstacklabs.com';
const baseURL = 'https://mainnet.base.org';
const optimismURL = 'https://optimism.llamarpc.com';
module.exports = {
networks: {
local: {
url: "http://localhost:8545", //rinkebyURL,
chainId: 1337,
//gasPrice: "auto",
//accounts: {mnemonic: process.env.MNEMONIC,initialIndex:1},
accounts: [process.env.private_key],
saveDeployments: true
},
hardhat: {
allowUnlimitedContractSize: false,
// chainId: 137, // sync with url or getting uniswap settings will reject transactions
// forking: {url: maticURL}
// @dev
// 1. there are no way to override chainid. in EVM on assembly section we will have 0x7a69 (local ganache id) whatever you write here or use any RPC urls
// so if set url for BSC to be sure that libLiquidity supports
// 2. set hardcoded "latest" block number on node. Else got an error "ProviderError: missing trie node" and happens only in BSC
//-------------------------
chainId: 1,
forking: {url: mainnetURL}
},
bsc: {
url: bscURL,
chainId: 56,
//gasPrice: "auto",
accounts: [
process.env.private_key,
process.env.private_key_auxiliary,
process.env.private_key_releasemanager,
process.env.private_key_communitycoin,
process.env.private_key_rewards
],
saveDeployments: true
},
polygon: {
url: maticURL,
chainId: 137,
//gasPrice: "auto",
accounts: [
process.env.private_key,
process.env.private_key_auxiliary,
process.env.private_key_releasemanager,
process.env.private_key_communitycoin,
process.env.private_key_rewards
],
saveDeployments: true
},
// mumbai: {
// url: mumbaiURL,
// chainId: 80001,
// gasPrice: "auto",
// accounts: [process.env.private_key],
// saveDeployments: true
// },
mainnet: {
url: mainnetURL,
chainId: 1,
//gasPrice: 3_000000000,
accounts: [
process.env.private_key,
process.env.private_key_auxiliary,
process.env.private_key_releasemanager,
process.env.private_key_communitycoin,
process.env.private_key_rewards
],
saveDeployments: true
},
base: {
url: baseURL,
chainId: 8453,
accounts: [
process.env.private_key,
process.env.private_key_auxiliary,
process.env.private_key_releasemanager,
process.env.private_key_communitycoin,
process.env.private_key_rewards
],
saveDeployments: true
},
optimisticEthereum: {
url: optimismURL,
chainId: 10,
accounts: [
process.env.private_key,
process.env.private_key_auxiliary,
process.env.private_key_releasemanager,
process.env.private_key_communitycoin,
process.env.private_key_rewards
],
saveDeployments: true
}
},
docgen: {
theme: '../../docgen-custom-markdown',
path: './docs',
clear: true,
runOnCompile: false,
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: "USD"
},
etherscan: {
apiKey: {
polygon: process.env.MATIC_API_KEY,
bsc: process.env.BSCSCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
optimisticEthereum: process.env.OPTIMISM_API_KEY,
base: process.env.BASE_API_KEY
}
},
solidity: {
compilers: [
{
version: "0.8.11",
settings: {
optimizer: {
enabled: true,
runs: 1,
},
metadata: {
// do not include the metadata hash, since this is machine dependent
// and we want all generated code to be deterministic
// https://docs.soliditylang.org/en/v0.7.6/metadata.html
bytecodeHash: "none",
},
},
},
{
version: "0.6.7",
settings: {},
settings: {
optimizer: {
enabled: false,
runs: 1,
},
metadata: {
// do not include the metadata hash, since this is machine dependent
// and we want all generated code to be deterministic
// https://docs.soliditylang.org/en/v0.7.6/metadata.html
bytecodeHash: "none",
},
},
},
],
},
namedAccounts: {
deployer: 0
},
paths: {
sources: "./contracts"
},
mocha: {
timeout: 200000
}
}