-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.js
99 lines (91 loc) · 2.19 KB
/
hardhat.config.js
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
require('dotenv').config();
require("@nomiclabs/hardhat-waffle");
const { task } = require('hardhat/config');
const deploy = require('./scripts/deploy');
const whitelist = require('./scripts/whitelist');
const multicallDeploy = require("./scripts/deploy_multicall")
const liquidity = require('./scripts/liquidity');
task("deploy", "Deploys the contracts")
.addFlag(
"y",
"Skips any confirmations and automatically agrees to them. Use with caution!"
)
.addFlag(
"s",
"Silences stdout"
)
.setAction(deploy);
task("whitelist", "Add or remove addresses from the whitelist")
.addPositionalParam(
"action",
`"add" or "remove"`,
undefined,
types.string
)
.addPositionalParam(
"file",
"The relative path to the file of addresses to perform the action on. Should be a line-delimtted file of KCC addresses",
undefined,
types.inputFile
)
.addFlag(
"y",
"Skips any confirmations and automatically agrees to them. Use with caution!"
)
.setAction(whitelist);
task("liquidity", "Add liquidity from Presale")
.addPositionalParam(
"amount",
"Amount of tokens to add to liquidity",
undefined,
types.string
)
.addFlag(
"y",
"Skips any confirmations and automatically agrees to them. Use with caution!"
)
.setAction(liquidity);
task("multicall:deploy", "Deploys the multicall")
.setAction(multicallDeploy);
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
hardhat: {
forking: {
url: `https://rpc-mainnet.kcc.network`,
},
chainId: 321,
allowUnlimitedContractSize: true
},
kucoin_mainnet: {
url: 'https://rpc-mainnet.kcc.network',
chainId: 321,
accounts: {
mnemonic: process.env.SEED_PHRASE
},
gasPrice: 3000000000 // 3 gwei
},
kucoin_testnet: {
url: 'https://rpc-testnet.kcc.network',
chainId: 322,
accounts: {
mnemonic: process.env.TEST_SEED_PHRASE
},
gasPrice: 1000000000 // 1 gwei
}
},
mocha: {
timeout: 60000
}
};