-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
66 lines (62 loc) · 1.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
import { HardhatUserConfig } from "hardhat/types";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "hardhat-tracer";
import "@nomiclabs/hardhat-web3";
import "@nomiclabs/hardhat-etherscan";
import { task } from "hardhat/config";
import { askAddress, bn18, bscChainId, deploy } from "@defi.org/web3-candies";
task("deploy").setAction(async () => {
const name = "VenusLoop";
const owner = await askAddress("owner address 0x");
const gasLimit = 2_000_000;
await deploy(name, [owner], gasLimit, 0, false);
});
function configFile() {
return require("./.config.json");
}
const config: HardhatUserConfig = {
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
forking: {
url: "https://bsc-dataseed4.binance.org",
},
blockGasLimit: 12e6,
accounts: {
accountsBalance: bn18("1,000,000").toString(),
},
},
bsc: {
chainId: bscChainId,
url: "https://bsc-dataseed4.binance.org",
},
},
typechain: {
outDir: "typechain-hardhat",
target: "web3-v1",
},
mocha: {
timeout: 500_000,
retries: 0,
bail: true,
},
gasReporter: {
currency: "USD",
coinmarketcap: configFile().coinmarketcapKey,
showTimeSpent: true,
},
etherscan: {
apiKey: configFile().etherscanKey,
},
};
export default config;