-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
103 lines (101 loc) · 2.29 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
import "dotenv/config";
import { HardhatUserConfig } from "hardhat/types";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-solhint";
import "@nomicfoundation/hardhat-chai-matchers";
import "@openzeppelin/hardhat-upgrades";
import "@typechain/hardhat";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
import "solidity-coverage";
import "./tasks";
import { nodeUrl, accounts, addForkConfiguration } from "./utils/network";
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
namedAccounts: {
owner: 0,
notOwner: 1,
buyer: 2,
supplierOwner: 3,
supplierSigner: 4,
retailerOwner: 5,
retailerSigner: 6,
},
networks: addForkConfiguration({
hardhat: {
initialBaseFeePerGas: 0,
allowUnlimitedContractSize: true,
},
localhost: {
url: nodeUrl("localhost"),
accounts: accounts(),
},
polzktest: {
url: nodeUrl("polzktest"),
accounts: accounts("polzktest"),
verify: {
etherscan: {
apiUrl: "https://explorer.public.zkevm-test.net",
},
},
},
chiado: {
url: "https://rpc.chiadochain.net",
gasPrice: 1000000000,
accounts: accounts("chiado"),
verify: {
etherscan: {
apiUrl: "https://blockscout.com/gnosis/chiado",
},
},
},
}),
gasReporter: {
currency: "USD",
gasPrice: 100,
enabled: process.env.REPORT_GAS ? true : false,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
maxMethodDiff: 10,
},
typechain: {
outDir: "typechain",
target: "ethers-v5",
},
mocha: {
timeout: 0,
},
external: process.env.HARDHAT_FORK
? {
deployments: {
hardhat: ["deployments/" + process.env.HARDHAT_FORK],
localhost: ["deployments/" + process.env.HARDHAT_FORK],
},
}
: undefined,
verify: {
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
},
};
export default config;