-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
97 lines (91 loc) · 2.41 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "dotenv/config";
var accounts;
const mnemonic: string | undefined = process.env.MNEMONIC;
const keys: any | undefined = process.env.KEYS?.split(" ").map((key) => ({
privateKey: key,
balance: "10000000000000000000000",
}));
if (process.env.MNEMONIC) accounts = { mnemonic };
else if (process.env.KEYS) accounts = keys;
const chainIds = {
hardhat: 31337,
eth: 1,
goerli: 5,
sepolia: 11155111,
"mantle-testnet": 5001,
"bnb-testnet": 97,
};
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
allowUnlimitedContractSize: true,
chainId: chainIds.hardhat,
blockGasLimit: 10000000000,
accounts: accounts,
},
localhost: {
accounts: process.env.KEYS?.split(" "),
chainId: 31337,
blockGasLimit: 10000000000,
allowUnlimitedContractSize: true,
timeout: 1000000,
},
zkvn: {
accounts: process.env.KEYS?.split(" "),
chainId: 31337,
url: "https://thepao-node.auxo.fund",
},
goerli: {
accounts: process.env.KEYS?.split(" "),
chainId: chainIds.goerli,
url: "https://rpc.ankr.com/eth_goerli",
gas: 1200000,
},
sepolia: {
accounts: process.env.KEYS?.split(" "),
chainId: chainIds.sepolia,
url: "https://rpc2.sepolia.org",
gas: 5000000,
},
},
solidity: {
compilers: [
{
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 1000000,
},
gasReporter: {
currency: "ETH",
gasPrice: 21,
enabled: true,
},
};
export default config;