forked from sushi-labs/sushiswap
-
Notifications
You must be signed in to change notification settings - Fork 10
/
hardhat.config.ts
126 lines (121 loc) · 2.66 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
116
117
118
119
120
121
122
123
124
125
126
// hardhat.config.ts
import "dotenv/config"
import "@nomiclabs/hardhat-solhint"
import "@nomiclabs/hardhat-waffle"
import "hardhat-abi-exporter"
import "hardhat-deploy"
import "hardhat-deploy-ethers"
import "hardhat-gas-reporter"
import "hardhat-spdx-license-identifier"
import "hardhat-typechain"
import "hardhat-watcher"
import "solidity-coverage"
import "./tasks"
import { HardhatUserConfig } from "hardhat/types"
import { removeConsoleLog } from "hardhat-preprocessor"
const accounts = [process.env.DEPLOYER_PRIVATE_KEY, process.env.DEV_PRIVATE_KEY]
const config: HardhatUserConfig = {
abiExporter: {
path: "./abi",
clear: false,
flat: true,
// only: [],
// except: []
},
defaultNetwork: "hardhat",
gasReporter: {
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
currency: "USD",
enabled: process.env.REPORT_GAS === "true",
excludeContracts: ["contracts/mocks/", "contracts/libraries/"],
},
mocha: {
timeout: 20000,
},
namedAccounts: {
deployer: {
default: 0,
},
dev: {
// Default to 1
default: 1,
// dev address mainnet
// 1: "",
},
},
networks: {
localhost: {
live: false,
saveDeployments: true,
tags: ["local"],
},
hardhat: {
forking: {
enabled: process.env.FORKING === "true",
url: `https://smartbch.fountainhead.cash/mainnet`,
blockNumber: 639620,
},
live: false,
saveDeployments: true,
tags: ["test", "local"],
},
smartbch: {
url: "https://smartbch.fountainhead.cash/mainnet",
accounts,
chainId: 10000,
live: true,
saveDeployments: true,
gasMultiplier: 2,
},
"smartbch-amber": {
url: "https://moeing.tech:9545",
accounts,
chainId: 10001,
live: true,
saveDeployments: true,
tags: ["staging"],
gasMultiplier: 2,
},
},
paths: {
artifacts: "artifacts",
cache: "cache",
deploy: "deploy",
deployments: "deployments",
imports: "imports",
sources: "contracts",
tests: "test",
},
preprocess: {
eachLine: removeConsoleLog((bre) => bre.network.name !== "hardhat" && bre.network.name !== "localhost"),
},
solidity: {
compilers: [
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
typechain: {
outDir: "types",
target: "ethers-v5",
},
watcher: {
compile: {
tasks: ["compile"],
files: ["./contracts"],
verbose: true,
},
},
}
export default config