-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
76 lines (71 loc) · 1.72 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
require("dotenv-safe").config({ example: ".env.template" });
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-etherscan");
const mochaConfig = {
timeout: 180000,
grep: process.env.MOCHA_GREP ?? "@hardhat",
};
const compilerSettings = {
optimizer: {
enabled: true,
runs: 800,
},
metadata: { bytecodeHash: "none" },
};
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.PROVIDER_ALCHEMY_KEY}`,
blockNumber: 12802299,
},
accounts: [
{
privateKey:
"0101010101010101010101010101010101010101010101010101010101010101",
balance: "20000000000000000000",
},
{
privateKey: process.env.DEPLOYER,
balance: "20000000000000000000",
},
],
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.PROVIDER_ALCHEMY_KEY}`,
timeout: 720000,
accounts: [process.env.DEPLOYER],
gasPrice: 85e9,
gasMultiplier: 1.15,
},
kovan: {
url: `https://eth-kovan.alchemyapi.io/v2/${process.env.PROVIDER_ALCHEMY_KEY}`,
timeout: 720000,
},
optimism: {
url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_OPTIMISM_KEY}`,
accounts: [process.env.DEPLOYER]
}
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
solidity: {
compilers: [
{
version: "0.8.10",
settings: compilerSettings,
},
],
},
paths: {
sources: "./contracts",
tests: "./tests",
artifacts: "./build_hardhat",
},
mocha: mochaConfig,
};