forked from Ubeswap/ubeswap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
115 lines (112 loc) · 2.77 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
113
114
115
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-solhint";
import "@nomiclabs/hardhat-waffle";
import "@tenderly/hardhat-tenderly";
import "@ubeswap/hardhat-celo";
import { fornoURLs, ICeloNetwork } from "@ubeswap/hardhat-celo";
import "dotenv/config";
import "hardhat-abi-exporter";
import "hardhat-gas-reporter";
import { removeConsoleLog } from "hardhat-preprocessor";
import "hardhat-spdx-license-identifier";
import "hardhat-watcher";
import { HardhatUserConfig, task } from "hardhat/config";
import { ActionType, HDAccountsUserConfig } from "hardhat/types";
import "solidity-coverage";
task(
"deploy",
"Deploys a step",
async (...args: Parameters<ActionType<{ step: string }>>) => {
return await (await import("./tasks/deploy")).deploy(...args);
}
).addParam("step", "The step to deploy");
const accounts: HDAccountsUserConfig = {
mnemonic:
process.env.MNEMONIC ||
"test test test test test test test test test test test junk",
path: "m/44'/52752'/0'/0/",
};
export default {
abiExporter: {
path: "./build/abi",
//clear: true,
flat: true,
// only: [],
// except: []
},
defaultNetwork: "hardhat",
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
currency: "USD",
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
excludeContracts: ["contracts/mocks/", "contracts/libraries/"],
},
networks: {
mainnet: {
url: fornoURLs[ICeloNetwork.MAINNET],
accounts,
chainId: ICeloNetwork.MAINNET,
live: true,
gasPrice: 0.5 * 10 ** 9,
gas: 8000000,
},
alfajores: {
url: fornoURLs[ICeloNetwork.ALFAJORES],
accounts,
chainId: ICeloNetwork.ALFAJORES,
live: true,
gasPrice: 0.5 * 10 ** 9,
gas: 8000000,
},
hardhat: {
chainId: 31337,
accounts,
},
},
paths: {
deploy: "scripts/deploy",
sources: "./contracts",
tests: "./test",
cache: "./build/cache",
artifacts: "./build/artifacts",
},
preprocess: {
eachLine: removeConsoleLog(
(bre) =>
bre.network.name !== "hardhat" && bre.network.name !== "localhost"
),
},
solidity: {
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 5000,
},
},
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
tenderly: {
project: process.env.TENDERLY_PROJECT,
username: process.env.TENDERLY_USERNAME,
},
watcher: {
compile: {
tasks: ["compile"],
files: ["./contracts"],
verbose: true,
},
},
namedAccounts: {
deployer: 0,
},
} as HardhatUserConfig;