-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
99 lines (97 loc) · 3.05 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
93
94
95
96
97
98
99
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
require('dotenv/config');
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.20',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
networks: {
hardhat: {
forking: {
url: 'https://mainnet.infura.io/v3/' + process.env.INFURA_KEY,
blockNumber: 19652821,
},
// loggingEnabled: true
},
// "https://rpc-mumbai.maticvigil.com",
// "https://polygon-mumbai-bor.publicnode.com",
// "wss://polygon-mumbai-bor.publicnode.com",
// "https://polygon-mumbai.gateway.tenderly.co",
// "wss://polygon-mumbai.gateway.tenderly.co"
// "https://matic-mumbai.chainstacklabs.com"
polygonMumbai: {
// url: `https://rpc-mumbai.maticvigil.com`
url: `https://polygon-mumbai-bor.publicnode.com`,
},
// "rpc":[
// "https://rpc.sepolia.org",
// "https://rpc2.sepolia.org",
// "https://rpc-sepolia.rockx.com",
// "https://rpc.sepolia.ethpandaops.io",
// "https://sepolia.infura.io/v3/${INFURA_API_KEY}",
// "wss://sepolia.infura.io/v3/${INFURA_API_KEY}",
// "https://sepolia.gateway.tenderly.co",
// "wss://sepolia.gateway.tenderly.co",
// "https://ethereum-sepolia-rpc.publicnode.com",
// "wss://ethereum-sepolia-rpc.publicnode.com"]
sepolia: {
url: `https://rpc2.sepolia.org`,
},
okx: {
// mainnet
// https://rpc.xlayer.tech
// https://xlayerrpc.okx.com
url: 'https://rpc.xlayer.tech',
accounts: [process.env.PRIVATE_KEY_ADMIN || ''],
},
xlayer: {
// testnet
// https://testrpc.xlayer.tech
// https://xlayertestrpc.okx.com/
url: 'https://testrpc.xlayer.tech',
accounts: [process.env.PRIVATE_KEY_ADMIN || ''],
},
},
etherscan: {
enabled: true,
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
mainnet: `${process.env.ETHERSCAN_API_KEY}`,
sepolia: `${process.env.ETHERSCAN_API_KEY}`,
polygonMumbai: `${process.env.POLYGONSCAN_API_KEY}`,
polygon: `${process.env.POLYGONSCAN_API_KEY}`,
xlayer: `${process.env.OKX_API_KEY}`,
okx: `${process.env.OKX_API_KEY}`,
},
customChains: [
{
network: 'okx',
chainId: 196,
urls: {
apiURL: 'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER',
browserURL: 'https://www.oklink.com/xlayer ',
},
},
{
network: 'xlayer',
chainId: 195, //196 for mainnet
urls: {
apiURL: 'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER_TESTNET', //or https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER for mainnet
browserURL: 'https://www.oklink.com/xlayer-test', //or https://www.oklink.com/xlayer for mainnet
},
},
],
},
};
export default config;