-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
122 lines (118 loc) · 3.07 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/** @format */
require('dotenv').config()
import { HardhatUserConfig } from 'hardhat/config'
import '@nomicfoundation/hardhat-toolbox'
import 'hardhat-gas-reporter'
import '@openzeppelin/hardhat-upgrades'
require('./tasks/extract-metadata')
// const { ProxyAgent, setGlobalDispatcher } = require('undici')
// const proxyAgent = new ProxyAgent('http://127.0.0.1:7890')
// setGlobalDispatcher(proxyAgent)
const config: HardhatUserConfig = {
solidity: {
version: '0.8.20',
settings: {
metadata: {
useLiteralContent: true,
},
optimizer: {
enabled: true,
runs: 2000,
details: {
yul: true,
yulDetails: {
stackAllocation: true,
optimizerSteps: 'dhfoDgvulfnTUtnIf',
},
},
},
viaIR: true,
},
},
networks: {
dev: {
url: 'HTTP://127.0.0.1:8545',
loggingEnabled: true,
},
sepolia: {
url: process.env.SEPOLIA_RPC_URL,
loggingEnabled: true,
accounts: [process.env.PRIVATE_KEY, process.env.PRIVATE_KEY1],
},
arbitrumSepolia: {
url: process.env.Arbitrum_Sepolia_Testnet_RPC_URL,
accounts: [process.env.PRIVATE_KEY, process.env.PRIVATE_KEY_PROD],
loggingEnabled: true,
},
arbitrumMainnet: {
url: process.env.Arbitrum_Mainnet_RPC_URL,
accounts: [process.env.PRIVATE_KEY_PROD],
loggingEnabled: true,
},
nova: {
url: 'https://nova.arbitrum.io/rpc',
accounts: [process.env.PRIVATE_KEY_PROD],
loggingEnabled: true,
},
hyperAGI: {
url: 'https://rpc.hyperagi.network',
accounts: [process.env.PRIVATE_KEY_PROD, process.env.PRIVATE_KEY1],
loggingEnabled: true,
},
},
etherscan: {
solidity: true,
apiKey: {
sepolia: process.env.ETHERSCAN_API_KEY,
optimismSepolia: process.env.Optimism_Sepolia_KEY,
arbitrumSepolia: process.env.Arbitrum_Sepolia_KEY,
arbitrumMainnet: process.env.Arbitrum_Mainnet_KEY,
hyperAGI: '123',
},
customChains: [
{
network: 'arbitrumSepolia',
chainId: 421614,
urls: {
apiURL: 'https://api-sepolia.arbiscan.io/api',
browserURL: 'https://sepolia.arbiscan.io/',
},
},
{
network: 'arbitrumMainnet',
chainId: 42161,
urls: {
apiURL: 'https://api.arbiscan.io/api',
browserURL: 'https://arbiscan.io/',
},
},
{
network: 'optimismSepolia',
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimistic.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io/',
},
},
{
network: 'hyperAGI',
chainId: 2868,
urls: {
apiURL: 'https://explorer.hyperagi.network/api',
browserURL: 'https://explorer.hyperagi.network/',
},
},
],
timeout: 60000,
},
sourcify: {
enabled: false,
},
verify: {
etherscan: {
apiKey: '',
apiTimeout: 60 * 1000, // 设置超时时间为300秒
},
},
}
export default config