-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.js
90 lines (88 loc) · 2 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
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-solhint");
require("@nomiclabs/hardhat-waffle");
require("@ubeswap/hardhat-celo");
const {
additionalOutputSelection,
fornoURLs,
ICeloNetwork,
} = require("@ubeswap/hardhat-celo");
require("dotenv/config");
require("hardhat-abi-exporter");
require("hardhat-gas-reporter");
const { removeConsoleLog } = require("hardhat-preprocessor");
require("hardhat-spdx-license-identifier");
const accounts = {
mnemonic:
process.env.MNEMONIC ||
"test test test test test test test test test test test junk",
path: "m/44'/52752'/0'/0/",
};
module.exports = {
abiExporter: {
path: "./build/abi",
flat: true,
},
defaultNetwork: "hardhat",
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
currency: "USD"
},
networks: {
mainnet: {
url: fornoURLs[ICeloNetwork.MAINNET],
accounts: [process.env.PRIVATE_KEY1],
chainId: ICeloNetwork.MAINNET,
live: true,
gasPrice: 2 * 10 ** 8,
gas: 8000000,
},
alfajores: {
url: fornoURLs[ICeloNetwork.ALFAJORES],
accounts: [process.env.PRIVATE_KEY1, process.env.PRIVATE_KEY2],
chainId: ICeloNetwork.ALFAJORES,
live: true,
gasPrice: 2 * 10 ** 8,
gas: 8000000,
},
hardhat: {
chainId: 31337,
accounts,
}
},
paths: {
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.8.3",
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
metadata: {
useLiteralContent: true,
},
outputSelection: additionalOutputSelection,
},
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
namedAccounts: {
deployer: 0,
},
mocha: {
timeout: 120e3, // 120s
},
};