-
Notifications
You must be signed in to change notification settings - Fork 5
/
hardhat.config.js
116 lines (112 loc) · 3.01 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
// require("@nomiclabs/hardhat-waffle");
// require("@nomiclabs/hardhat-ethers");
require("@nomicfoundation/hardhat-toolbox");
require("@nomicfoundation/hardhat-verify");
require("dotenv").config();
const settings = {
optimizer: {
enabled: true,
runs: 200,
},
};
function mnemonic() {
return [
process.env.PRIVATE_KEY,
// process.env.PRIVATE_KEY1,
// process.env.PRIVATE_KEY2,
];
}
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.20",
networks: {
localhost: {
url: "http://localhost:8545",
//gasPrice: 125000000000, // you can adjust gasPrice locally to see how much it will cost on production
/*
notice no mnemonic here? it will just use account 0 of the hardhat node to deploy
(you can put in a mnemonic here to set the deployer locally)
*/
},
mainnet: {
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
accounts: mnemonic(),
},
sepolia: {
url: "https://sepolia.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
accounts: mnemonic(),
},
matic: {
url: "https://polygon-mainnet.infura.io/v3/" + process.env.INFURA_ID,
accounts: mnemonic(),
},
optimism: {
url: "https://optimism-mainnet.infura.io/v3/" + process.env.INFURA_ID,
accounts: mnemonic(),
},
arbitrum: {
url: "https://arb1.arbitrum.io/rpc",
accounts: mnemonic(),
},
scroll: {
url: "https://rpc.scroll.io/",
accounts: mnemonic(),
},
base: {
// this is a custom network
url: "https://mainnet.base.org/",
accounts: mnemonic(),
},
polygonZKEVM: {
// this is a custom network
url: "https://zkevm-rpc.com",
accounts: mnemonic(),
},
linea: {
url: "https://linea-mainnet.infura.io/v3/" + process.env.INFURA_ID,
accounts: mnemonic(),
},
},
etherscan: {
apiKey: {
mainnet: process.env.EHTERSCAN_KEY,
sepolia: process.env.EHTERSCAN_KEY,
scroll: process.env.SCROLLSCAN_KEY,
optimisticEthereum: process.env.OP_KEY,
arbitrumOne: process.env.ARBI_KEY,
polygonZKEVM: process.env.POLYGONZKEVM_KEY,
linea: process.env.LINEASCAN_API_KEY,
},
customChains: [
{
network: "scroll",
chainId: 534352,
urls: {
apiURL: "https://api.scrollscan.com/api",
browserURL: "https://scrollscan.com/",
},
},
{
network: "polygonZKEVM",
chainId: 1101,
urls: {
apiURL: "https://api-zkevm.polygonscan.com/api",
browserURL: "https://zkevm.polygonscan.com/",
},
},
{
network: "linea",
chainId: 59144,
urls: {
apiURL: "https://api.lineascan.build/api",
browserURL: "https://lineascan.build/",
},
},
],
},
sourcify: {
// Disabled by default
// Doesn't need an API key
enabled: true,
},
};