forked from Liberdus/otc-swap-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
69 lines (67 loc) · 2.04 KB
/
Copy pathhardhat.config.js
File metadata and controls
69 lines (67 loc) · 2.04 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
require("@nomicfoundation/hardhat-ethers");
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
module.exports = {
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
},
evmVersion: "shanghai",
viaIR: true, // Important for OZ 5.1.0
metadata: {
bytecodeHash: "ipfs"
}
}
},
defaultNetwork: "localhost",
networks: {
hardhat: {
chainId: 1337,
accounts: {
mnemonic: process.env.MNEMONIC || "test test test test test test test test test test test junk",
},
},
localhost: {
url: "http://127.0.0.1:8545",
accounts: [
// These are hardhat default accounts. Safe to use for local testing.
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d",
"0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a",
"0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6",
"0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a",
"0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba",
"0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e"
].filter((key) => key !== undefined),
},
polygon: {
url: process.env.POLYGON_URL || "https://polygon-rpc.com",
accounts: [process.env.PRIVATE_KEY].filter(Boolean),
chainId: 137
},
mumbai: {
url: process.env.MUMBAI_URL || "https://rpc-mumbai.maticvigil.com",
accounts: [process.env.PRIVATE_KEY].filter(Boolean),
chainId: 80001
},
amoy: {
url: process.env.MUMBAI_URL || "https://rpc-amoy.polygon.technology/",
accounts: [process.env.PRIVATE_KEY].filter(Boolean),
chainId: 80002
}
},
etherscan: {
apiKey: {
polygon: process.env.POLYGONSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY
}
},
namedAccounts: {
deployer: {
default: 0
}
}
};