forked from beethovenxfi/beethovenx-token
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
117 lines (113 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
import "dotenv/config"
import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-etherscan"
import "@nomiclabs/hardhat-solhint"
import "@nomiclabs/hardhat-waffle"
import "@tenderly/hardhat-tenderly"
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 { HardhatUserConfig } from "hardhat/types"
import { removeConsoleLog } from "hardhat-preprocessor"
const accounts = [`0x${process.env.DEPLOYER!}`, `0x${process.env.ADMIN!}`, `0x${process.env.LBP_FUND!}`]
const config: HardhatUserConfig = {
abiExporter: {
path: "./abi",
clear: false,
flat: true,
},
defaultNetwork: "hardhat",
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
currency: "USD",
enabled: process.env.REPORT_GAS === "true",
excludeContracts: ["contracts/mocks/", "contracts/libraries/"],
},
mocha: {
timeout: 20000,
},
networks: {
localhost: {
live: false,
saveDeployments: true,
tags: ["local"],
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts,
chainId: 4,
live: true,
saveDeployments: true,
},
fantom: {
url: "https://rpcapi.fantom.network",
accounts,
chainId: 250,
live: true,
saveDeployments: true,
gasMultiplier: 2,
},
// "fantom-testnet": {
// url: "https://rpc.testnet.fantom.network",
// accounts,
// chainId: 4002,
// 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.8.7",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
tenderly: {
project: process.env.TENDERLY_PROJECT!,
username: process.env.TENDERLY_USERNAME!,
},
typechain: {
outDir: "types",
target: "ethers-v5",
},
watcher: {
compile: {
tasks: ["compile"],
files: ["./contracts"],
verbose: true,
},
},
}
export default config