-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
118 lines (112 loc) · 3.5 KB
/
hardhat.config.js
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
/*global process*/
require("hardhat-contract-sizer");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
require("hardhat-gas-reporter");
require("hardhat-tracer");
require("@nomicfoundation/hardhat-chai-matchers");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
require("@nomicfoundation/hardhat-toolbox");
const ALCHEMY_API_KEY_MAINNET = process.env.ALCHEMY_API_KEY_MAINNET;
const ALCHEMY_API_KEY_MATIC = process.env.ALCHEMY_API_KEY_MATIC;
const ALCHEMY_API_KEY_GOERLI = process.env.ALCHEMY_API_KEY_GOERLI;
const ALCHEMY_API_KEY_MUMBAI = process.env.ALCHEMY_API_KEY_MUMBAI;
const GNOSIS_CHAIN_API_KEY = process.env.GNOSIS_CHAIN_API_KEY;
const CHIADO_CHAIN_API_KEY = "10200";
let TESTNET_MNEMONIC = process.env.TESTNET_MNEMONIC;
const accounts = {
mnemonic: TESTNET_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
};
if (!TESTNET_MNEMONIC) {
// Generated with bip39
accounts.mnemonic = "velvet deliver grief train result fortune travel voice over subject subject staff nominee bone name";
accounts.accountsBalance = "100000000000000000000000000";
}
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY;
module.exports = {
networks: {
local: {
url: "http://localhost:8545",
},
mainnet: {
url: "https://eth-mainnet.g.alchemy.com/v2/" + ALCHEMY_API_KEY_MAINNET,
accounts: accounts,
chainId: 1,
},
polygon: {
url: "https://polygon-mainnet.g.alchemy.com/v2/" + ALCHEMY_API_KEY_MATIC,
accounts: accounts,
chainId: 137,
},
gnosis: {
url: "https://rpc.gnosischain.com",
accounts: accounts,
chainId: 100,
},
goerli: {
url: "https://eth-goerli.g.alchemy.com/v2/" + ALCHEMY_API_KEY_GOERLI,
chainId: 5,
accounts: accounts,
},
polygonMumbai: {
url: "https://polygon-mumbai.g.alchemy.com/v2/" + ALCHEMY_API_KEY_MUMBAI,
accounts: accounts,
},
chiado: {
url: "https://rpc.chiadochain.net",
accounts: accounts,
},
hardhat: {
allowUnlimitedContractSize: true
},
},
etherscan: {
customChains: [
{
network: "chiado",
chainId: 10200,
urls: {
apiURL: "https://blockscout.com/gnosis/chiado/api",
browserURL: "https://blockscout.com/gnosis/chiado",
},
},
{
network: "gnosis",
chainId: 100,
urls: {
apiURL: "https://api.gnosisscan.io/api",
browserURL: "https://gnosisscan.io/"
},
},
],
apiKey: {
mainnet: ETHERSCAN_API_KEY,
polygon: POLYGONSCAN_API_KEY,
gnosis: GNOSIS_CHAIN_API_KEY,
goerli: ETHERSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
chiado: CHIADO_CHAIN_API_KEY,
}
},
solidity: {
compilers: [
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
},
}
]
},
gasReporter: {
enabled: true
}
};