-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
72 lines (62 loc) · 1.86 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
import { HardhatUserConfig, vars } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-verify";
import "dotenv/config";
import "./task/index";
import 'hardhat-deploy';
import '@nomicfoundation/hardhat-ethers';
import 'hardhat-deploy';
import 'hardhat-deploy-ethers';
import "hardhat-gas-reporter";
// change to yours, With the global proxy enabled, change the proxyUrl to your own proxy link. The port may be different for each client.
const proxyUrl = "http://127.0.0.1:33210"
const { ProxyAgent, setGlobalDispatcher } = require("undici")
const proxyAgent = new ProxyAgent(proxyUrl)
setGlobalDispatcher(proxyAgent)
// export https_proxy=http://127.0.0.1:33210 http_proxy=http://127.0.0.1:33210 all_proxy=socks5://127.0.0.1:33211
//import * as envEnc from "@chainlink/env-enc";
//envEnc.config();
const SEPOLIA_URL: string = process.env.SEPOLIA_URL as string;
const PRIVITE_KEY1: string = process.env.PRIVITE_KEY1 as string;
const PRIVITE_KEY2: string = process.env.PRIVITE_KEY2 as string;
const ETHERSCAN_KEYS: string = process.env.ETHERSCAN_KEYS as string;
// const SEPOLIA_URL: string = vars.get("SEPOLIA_URL");
// const PRIVITE_KEY1: string = vars.get("PRIVITE_KEY1");
// const PRIVITE_KEY2: string = vars.get("PRIVITE_KEY2");
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
solidity: "0.8.28",
mocha:{
timeout: 300000
},
networks: {
sepolia: {
url: SEPOLIA_URL,
accounts: [PRIVITE_KEY1, PRIVITE_KEY2],
chainId: 11155111
}
},
etherscan: {
apiKey: {
sepolia: ETHERSCAN_KEYS
}
}
// sourcify: {
// Disabled by default
// Doesn't need an API key
// enabled: true
// }
,
namedAccounts: {
firstAccount: {
default: 0
},
secondAccount: {
default: 1
},
},
gasReporter: {
enabled: true
}
};
export default config;