-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
106 lines (99 loc) · 2.19 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-contract-sizer";
import "hardhat-abi-exporter";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
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,
educhain: 656476,
sepolia: 11155111,
"mantle-testnet": 5001,
"bnb-testnet": 97,
};
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
namedAccounts: {
deployer: 0,
},
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,
},
educhain: {
chainId: chainIds.educhain,
loggingEnabled: true,
saveDeployments: true,
url: "https://open-campus-codex-sepolia.drpc.org",
accounts: [process.env.acc1!],
},
},
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
// {
// version: "0.8.12",
// settings: {
// optimizer: {
// enabled: true,
// runs: 200,
// },
// },
// },
],
},
gasReporter: {
currency: "ETH",
enabled: true,
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
abiExporter: [
{
path: "./abi/json",
format: "json",
runOnCompile: true,
},
],
};
export default config;