-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.js
79 lines (74 loc) · 1.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
require("hardhat-deploy");
require("hardhat-deploy-ethers");
const fs = require("fs");
function mnemonic() {
try {
return fs.readFileSync("./mnemonic.txt").toString().trim();
} catch (e) {
console.log("Couldn't read mnemonic", e);
}
return "";
}
function deployerPk() {
try {
return fs.readFileSync("./pk.txt").toString().trim();
} catch (e) {
console.log("Couldn't read pk", e);
}
return "";
}
const infuraId = "0e8a1922865f444683f5d0507139d739";
module.exports = {
networks: {
hardhat: {
chainId: 1337,
accounts: [
{
privateKey:
"c6cbd7d76bc5baca530c875663711b947efa6a86a900a9e8645ce32e5821484e",
balance: "1000000000000000000000",
},
],
},
localhost: {
url: "http://localhost:8545",
},
kovan: {
url: "https://kovan.infura.io/v3/" + infuraId,
accounts: {
mnemonic: mnemonic(),
},
},
rinkeby: {
url: "https://rinkeby.infura.io/v3/" + infuraId,
accounts: [deployerPk()],
},
mainnet: {
url: "https://mainnet.infura.io/v3/" + infuraId,
accounts: [deployerPk()],
gasPrice: 42000000000,
},
},
solidity: {
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
namedAccounts: {
deployer: 0,
dev: 1,
fee: 2,
},
paths: {
sources: "./contracts",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 20000,
},
};