-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathhardhat.config.ts
140 lines (136 loc) · 4.1 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
131
132
133
134
135
136
137
138
139
140
import { HardhatUserConfig } from "hardhat/config"
import "@keep-network/hardhat-helpers"
import "@nomiclabs/hardhat-waffle"
import "@openzeppelin/hardhat-upgrades"
import "@tenderly/hardhat-tenderly"
import "hardhat-contract-sizer"
import "hardhat-deploy"
import "hardhat-gas-reporter"
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 10,
},
},
},
],
},
paths: {
artifacts: "./build",
},
networks: {
hardhat: {
forking: {
// forking is enabled only if FORKING_URL env is provided
enabled: !!process.env.FORKING_URL,
// URL should point to a node with archival data (Alchemy recommended)
url: process.env.FORKING_URL || "",
// latest block is taken if FORKING_BLOCK env is not provided
blockNumber: process.env.FORKING_BLOCK
? parseInt(process.env.FORKING_BLOCK)
: undefined,
},
tags: ["allowStubs"],
},
development: {
url: "http://localhost:8545",
chainId: 1101,
tags: ["allowStubs"],
},
goerli: {
url: process.env.CHAIN_API_URL || "",
chainId: 5,
accounts: process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY
? [
process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
process.env.KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
]
: undefined,
tags: ["tenderly"],
},
rinkeby: {
url: process.env.CHAIN_API_URL || "",
chainId: 4,
accounts: process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY
? [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY]
: undefined,
tags: ["tenderly"],
},
ropsten: {
url: process.env.CHAIN_API_URL || "",
chainId: 3,
accounts: process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY
? [
process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
process.env.KEEP_CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY,
]
: undefined,
tags: ["tenderly"],
},
mainnet: {
url: process.env.CHAIN_API_URL || "",
chainId: 1,
accounts: process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY
? [process.env.CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY]
: undefined,
tags: ["tenderly"],
},
},
tenderly: {
username: "thesis",
project: "thesis/threshold-network",
},
verify: {
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
},
external: {
contracts: [
{
// Due to a limitation of `hardhat-deploy` plugin, we have
// to modify the artifacts imported from NPM. Please see
// `scripts/prepare-dependencies.sh` for details.
artifacts: "external/npm/@keep-network/keep-core/artifacts",
// Example if we want to use deployment scripts from external package:
// deploy: "node_modules/@keep-network/keep-core/deploy",
},
],
deployments: {
// For hardhat environment we can fork the mainnet, so we need to point it
// to the contract artifacts.
hardhat: process.env.FORKING_URL ? ["./external/mainnet"] : [],
// For development environment we expect the local dependencies to be linked
// with `yarn link` command, uncomment the line below to use the linked
// dependencies.
// development: ["external/npm/@keep-network/keep-core/artifacts"],
ropsten: ["external/npm/@keep-network/keep-core/artifacts"],
goerli: ["external/npm/@keep-network/keep-core/artifacts"],
mainnet: ["./external/mainnet"],
},
},
namedAccounts: {
deployer: {
default: 1, // take the first account as deployer
goerli: 0,
// mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf",
},
thresholdCouncil: {
mainnet: "0x9F6e831c8F8939DC0C830C6e492e7cEf4f9C2F5f",
},
keepRegistryKeeper: {
default: 1, // same as the deployer
ropsten: "0x923C5Dbf353e99394A21Aa7B67F3327Ca111C67D",
goerli: "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc",
},
},
mocha: {
timeout: 60000,
},
}
export default config