-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.ts
executable file
·130 lines (127 loc) · 3.05 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
127
128
129
130
// --- Hardhat plugins ---
import { HardhatUserConfig } from "hardhat/types";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-web3";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-etherscan";
import "@celo/staked-celo-hardhat-deploy";
import "./lib/contractkit.plugin";
import minimist from "minimist";
import { config } from "dotenv";
// --- Monkey-patching ---
import "./lib/bignumber-monkeypatch";
const argv = minimist(process.argv.slice(2));
const { network } = argv;
config({ path: network === "" || !network || network === "devchain" ? ".env" : `.env.${network}` });
import "./lib/deployTask";
import "./lib/account-tasks/accountTask";
import "./lib/multiSig-tasks/multiSigTask";
import "./lib/manager-tasks/managerTask";
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
paths: {
tests: "test-ts",
},
typechain: {
target: "ethers-v5",
},
namedAccounts: {
deployer: {
default: 0,
},
multisigOwner0: {
default: 3,
},
multisigOwner1: {
default: 4,
},
multisigOwner2: {
default: 5,
},
multisigOwner3: {
default: 6,
},
multisigOwner4: {
default: 7,
},
// Used as owner in test fixtures instead of multisig
owner: {
default: 6,
},
},
networks: {
local: {
url: "http://localhost:8545",
gas: 13000000,
gasPrice: 100000000000,
},
devchain: {
url: "http://localhost:7545",
// Having to set a default value for gas, as the provider does not estimate
// gas properly when signing using ledger HW, resulting in an error.
gas: 2100000,
gasPrice: 8000000000,
},
hardhat: {
forking: {
// Local ganache
url: "http://localhost:7545",
blockNumber: 399,
},
allowUnlimitedContractSize: true,
},
alfajores: {
url: `https://alfajores-forno.celo-testnet.org/`,
gas: 13000000,
gasPrice: 100000000000,
},
staging: {
url: `https://staging-forno.celo-networks-dev.org/`,
gas: 13000000,
gasPrice: 100000000000,
},
celo: {
url: `https://forno.celo.org/`,
gas: 13000000,
gasPrice: 20000000000,
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://celoscan.io
apiKey: process.env.CELO_SCAN_API_KEY,
customChains: [
{
network: "celo",
chainId: 42220,
urls: {
apiURL: "https://api.celoscan.io/api",
browserURL: "https://celoscan.io",
},
},
],
},
solidity: {
compilers: [
{
version: "0.5.13",
settings: {
evmVersion: "istanbul",
metadata: { useLiteralContent: true },
},
},
{
version: "0.8.11",
settings: {
evmVersion: "istanbul",
metadata: { useLiteralContent: true }
},
},
],
},
} as HardhatUserConfig;