-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
112 lines (106 loc) · 2.43 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
107
108
109
110
111
112
import fs from "fs";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-chai-matchers";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-contract-sizer";
let mnemonic = 'inspire school random normal account steel strike shove close album produce cube bounce memory before';
if (fs.existsSync(".mnemonic")) {
mnemonic = fs.readFileSync(".mnemonic").toString().trim();
}
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
accounts: {
count: 100,
mnemonic,
accountsBalance: "1000000000000000000000000000"
},
allowUnlimitedContractSize: true,
hardfork: "istanbul",
gasPrice: 0
},
dmd: {
url: "https://rpc.uniq.diamonds/",
chainId: 777012,
gasPrice: 1000000000, // 1 gwei
accounts: {
mnemonic: mnemonic
}
},
alpha4: {
url: "http://62.171.133.46:54100",
accounts: {
count: 10,
path: "m/44'/60'/0'/0",
mnemonic
},
allowUnlimitedContractSize: true,
hardfork: "istanbul",
minGasPrice: 1000000000
},
},
solidity: {
compilers: [
{
version: "0.8.25",
settings: {
optimizer: {
enabled: true,
runs: 800,
details: {
yul: true,
},
},
evmVersion: "london"
},
},
]
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
only: ["DiamondDao"]
},
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./test",
},
typechain: {
target: "ethers-v6",
},
etherscan: {
apiKey: "123",
customChains: [
{
network: "alpha3",
chainId: 777016,
urls: {
apiURL: "https://explorer.uniq.diamonds/api",
browserURL: "https://explorer.uniq.diamonds",
},
},
{
network: "dmd",
chainId: 777012,
urls: {
apiURL: "https://explorer.uniq.diamonds/api",
browserURL: "https://explorer.uniq.diamonds",
},
},
{
network: "alpha4",
chainId: 777018,
urls: {
apiURL: "http://62.171.133.46:4400/api",
browserURL: "http://62.171.133.46:4400",
},
},
],
},
};
export default config;