-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
92 lines (86 loc) · 3.25 KB
/
hardhat.config.ts
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
// import '@openzeppelin/hardhat-upgrades';
import 'dotenv/config';
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 10
}
}
}
]
},
networks: {
'local': {
url: process.env.BSC_LOCAL || "http://127.0.0.1:8545",
accounts: {
mnemonic: 'test test test test test test test test test test test junk',
},
},
'bsc-testnet': {
url: process.env.BSC_TESTNET_RPC || 'https://data-seed-prebsc-1-s1.binance.org:8545/',
accounts: {
mnemonic: process.env.DEPLOYER_MNEMONIC || 'test test test test test test test test test test test junk',
},
gasPrice: 5e9,
},
'bsc': {
url: process.env.BSC_RPC || 'https://bsc-dataseed1.binance.org',
accounts: {
mnemonic: process.env.DEPLOYER_MNEMONIC || 'test test test test test test test test test test test junk',
},
gasPrice: 1.1 * 1e9
},
'opbnb': {
url: 'https://opbnb-mainnet-rpc.bnbchain.org',
accounts: {
mnemonic: process.env.DEPLOYER_MNEMONIC || 'test test test test test test test test test test test junk',
},
gasPrice: 1e8,
},
'opbnb-testnet': {
url: 'https://opbnb-testnet-rpc.bnbchain.org',
accounts: {
mnemonic: process.env.DEPLOYER_MNEMONIC || 'test test test test test test test test test test test junk',
},
gasPrice: 2e8,
},
},
etherscan: {
apiKey: {
opBNB: process.env.OPBNB_BSCSCAN_APIKEY || '',
opBNBTestnet: process.env.OPBNB_BSCSCAN_APIKEY || '',
bsc: process.env.BSCSCAN_APIKEY || '',
bscTestnet: process.env.BSCSCAN_APIKEY || '',
},
customChains: [
{
network: "opBNB",
chainId: 204, // opBNB Mainnet
urls: {
apiURL: `https://api-opbnb.bscscan.com/api`, // opBNB Mainnet
browserURL: "https://opbnb.bscscan.com", // opBNB mainnet
// apiURL: `https://open-platform-tmp.bk.nodereal.cc/${process.env.OPBNBSCAN_APIKEY}/op-bnb-mainnet/contract/`,
// browserURL: "https://opbnbscan.com/",
},
},
{
network: "opBNBTestnet",
chainId: 5611, // opBNB Testnet
urls: {
apiURL: `https://api-opbnb-testnet.bscscan.com/api`, // opBNB Testnet
browserURL: "https://opbnb-testnet.bscscan.com/", // opBNB Testnet
// apiURL: `https://open-platform-tmp.bk.nodereal.cc/${process.env.OPBNBSCAN_APIKEY}/op-bnb-testnet/contract/`,
// browserURL: "https://testnet.opbnbscan.com/",
},
},
],
},
};
export default config;