-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.js
56 lines (53 loc) · 1.36 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
require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-ethers");
require("@openzeppelin/hardhat-upgrades");
/** @type import('hardhat/config').HardhatUserConfig */
require("dotenv").config();
const MAINNET_PRIVATE_KEY = process.env.MAINNET_PRIVATE_KEY;
const TESTNET_PRIVATE_KEY = process.env.TESTNET_PRIVATE_KEY;
const BSC_API_KEY = process.env.BSC_API_KEY;
module.exports = {
solidity: {
version: "0.8.15",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://bscscan.com/
apiKey: BSC_API_KEY,
},
defaultNetwork: "bsctestnet",
// defaultNetwork: "hardhat",
networks: {
hardhat: {},
bsc: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
accounts: [MAINNET_PRIVATE_KEY],
gas: "auto",
gasPrice: 5000000000,
},
bsctestnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545/",
chainId: 97,
accounts: [TESTNET_PRIVATE_KEY],
gas: "auto",
gasPrice: 10000000000,
},
polygon: {
url: "https://rpc-mainnet.maticvigil.com",
chainId: 137,
accounts: [MAINNET_PRIVATE_KEY],
},
mumbai: {
url: "https://matic-mumbai.chainstacklabs.com",
chainId: 80001,
accounts: [TESTNET_PRIVATE_KEY],
},
},
};