forked from AAStarCommunity/EthPaymaster_contract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
51 lines (47 loc) · 1.58 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
import { HardhatUserConfig } from "hardhat/config";
import "dotenv/config";
import "@nomiclabs/hardhat-ethers";
//import "module-alias/register";
import "@nomiclabs/hardhat-etherscan";
import '@nomiclabs/hardhat-waffle'
import '@typechain/hardhat'
import 'hardhat-deploy'
//const { ProxyAgent, setGlobalDispatcher } = require("undici");
//const proxyAgent = new ProxyAgent("http://127.0.0.1:7890");
//setGlobalDispatcher(proxyAgent);
const withOptimizations = true;
const defaultNetwork = "hardhat"; // "hardhat" for tests
const config: HardhatUserConfig = {
solidity: {
compilers: [ //可指定多个sol版本
{
version: "0.8.23",
settings: {
optimizer: {
enabled: withOptimizations,
runs: 1000
}
}
},
],
},
defaultNetwork: defaultNetwork,
networks: {
hardhat: {
blockGasLimit: 10000000, allowUnlimitedContractSize: !withOptimizations
}, sepolia: {
url: 'https://eth-sepolia.g.alchemy.com/v2/CH4apxhy9YIw2jj2uhKnZxtMnKIJbx5e',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
}, ethereum: {
url: 'https://eth-mainnet.g.alchemy.com/v2/GlAFz_VOPK6XUapGQx5WkLNguXulcdMJ',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
}, mumbai: {
url: 'https://polygon-mumbai.g.alchemy.com/v2/msaJegrQLaLoy3szqaYUebeTejvKLeJO',
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
}
},
etherscan: {
apiKey: process.env.SCAN_API_KEY
},
};
export default config;