-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
63 lines (60 loc) · 1.85 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
require("dotenv").config({ path: ".env" });
require("@nomiclabs/hardhat-waffle");
require("solidity-coverage");
require("hardhat-deploy");
require("@nomiclabs/hardhat-ethers");
const user0_private_key = process.env.USER0_PRIVATE_KEY
? process.env.USER0_PRIVATE_KEY
: "0000000000000000000000000000000000000000000000000000000000000000";
const user1_private_key = process.env.USER1_PRIVATE_KEY
? process.env.USER1_PRIVATE_KEY
: "0000000000000000000000000000000000000000000000000000000000000000";
const user2_private_key = process.env.USER2_PRIVATE_KEY
? process.env.USER2_PRIVATE_KEY
: "0000000000000000000000000000000000000000000000000000000000000000";
const user3_private_key = process.env.USER3_PRIVATE_KEY
? process.env.USER3_PRIVATE_KEY
: "0000000000000000000000000000000000000000000000000000000000000000";
const user4_private_key = process.env.USER4_PRIVATE_KEY
? process.env.USER4_PRIVATE_KEY
: "0000000000000000000000000000000000000000000000000000000000000000";
const accounts = [
`0x${user0_private_key}`,
`0x${user1_private_key}`,
`0x${user2_private_key}`
];
module.exports = {
networks: {
localhost: {
url: "http://127.0.0.1:8545",
},
hardhat: {},
bsctestnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
gas: 2100000,
gasPrice: 20000000000,
accounts: accounts,
},
bscmainnet: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
gasPrice: 20000000000,
accounts: accounts,
},
ethropsten:{
url: `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: accounts,
},
ethmainnet:{
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: accounts,
}
},
solidity: "0.8.4",
namedAccounts: {
deployer: 0,
tokenOwner: 1,
charityBag: 2,
},
};