-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathhardhat.config.ts
98 lines (89 loc) · 2.17 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-deploy";
import "hardhat-abi-exporter";
import "hardhat-contract-sizer";
import "hardhat-docgen";
import "@openzeppelin/hardhat-upgrades";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-solpp";
import { config as dotEnvConfig } from "dotenv";
dotEnvConfig();
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
// test networks
hardhat: {
chainId: 31337,
gas: 12000000,
blockGasLimit: 0x1fffffffffffff,
allowUnlimitedContractSize: true
},
bsctest: {
url: "https://dimensional-magical-sun.bsc-testnet.discover.quiknode.pro/8d7ff025c5d4a1aa94bfcdf8a563bf156c120ca7/",
accounts: [process.env.TESTNET_PRIVATE_KEY || ''],
},
// main networks
ethereum: {
url: "https://eth-mainnet.g.alchemy.com/v2/ThP75c4L-jDh9F9d8_icKVhT9r9xdDRu",
accounts: [process.env.MAINNET_PRIVATE_KEY || ''],
},
polygon: {
url: "https://polygon-mainnet.g.alchemy.com/v2/HnyOE6plvFb9l5AQfiE6vDYmE83bCrnd",
accounts: [process.env.MAINNET_PRIVATE_KEY || ''],
gasPrice: 60_000_000_000
},
bsc: {
url: "https://bsc-dataseed1.defibit.io/",
accounts: [process.env.MAINNET_PRIVATE_KEY || ''],
},
moonbeam: {
url: "https://rpc.api.moonbeam.network",
accounts: [process.env.MAINNET_PRIVATE_KEY || ''],
},
},
solidity: {
compilers: [
{
version: "0.8.9",
settings: {
optimizer: { enabled: true, runs: 200 }
}
}
]
},
paths: {
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
},
typechain: {
outDir: './typechain',
target: 'ethers-v5',
},
abiExporter: {
path: './abi',
runOnCompile: true,
clear: false,
flat: true
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: false,
strict: true,
},
docgen: {
path: './docs',
clear: true,
runOnCompile: false
},
solpp: {
noFlatten: true
},
mocha: {
timeout: 100000
},
};
export default config;