-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
104 lines (101 loc) · 2.64 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
require("dotenv").config(); // eslint-disable-line
import "hardhat-typechain";
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
const INFURA_PROJECT_ID = process.env.INFURA_PROJECT_ID;
const ALCHEMY_PROJECT_ID = process.env.ALCHEMY_PROJECT_ID;
const alchemyEndpoint = `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_PROJECT_ID}`;
const MNEMONIC = process.env.MNEMONIC;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
import { CONFIG } from "./test/Config";
const LOCALHOST = "http://127.0.0.1:8545";
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn moreww
const config: HardhatUserConfig = {
solidity: {
version: "0.7.3",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
chainId: 1,
accounts: {
mnemonic: MNEMONIC,
accountsBalance: "300000000000000000000000",
},
forking: {
enabled: true,
url: alchemyEndpoint ? alchemyEndpoint : LOCALHOST,
blockNumber: CONFIG.BLOCK_NO,
},
blockGasLimit: 20000000,
allowUnlimitedContractSize: true,
},
kovan: {
url: `https://kovan.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: {
mnemonic: MNEMONIC,
},
blockGasLimit: 20000000,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: {
mnemonic: MNEMONIC,
},
blockGasLimit: 20000000,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 1,
accounts: {
mnemonic: MNEMONIC,
},
blockGasLimit: 20000000,
},
maticTestnet: {
url: `https://polygon-mumbai.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 80001,
accounts: {
mnemonic: MNEMONIC,
},
},
matic: {
url: `https://polygon-mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 137,
accounts: {
mnemonic: MNEMONIC,
},
// Issue for polygon
// https://github.com/nomiclabs/hardhat/issues/1828
gasPrice: 8000000000,
},
arbitrum: {
url: `https://arbitrum-mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 42161,
accounts: {
mnemonic: MNEMONIC,
},
},
arbitrumTestnet: {
url: `https://arbitrum-rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 421611,
accounts: {
mnemonic: MNEMONIC,
},
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
mocha: {
timeout: 1200000,
},
};
export default config;