-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathhardhat.config.ts
148 lines (145 loc) · 4.27 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
141
142
143
144
145
146
147
148
import { HardhatUserConfig } from "hardhat/config"
import "@keep-network/hardhat-helpers"
import "@nomiclabs/hardhat-waffle"
import "@nomiclabs/hardhat-ethers"
import "hardhat-gas-reporter"
import "hardhat-deploy"
import "hardhat-dependency-compiler"
import "solidity-coverage"
import "@nomiclabs/hardhat-etherscan"
import "@tenderly/hardhat-tenderly"
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.9",
},
],
},
paths: {
artifacts: "./build",
},
dependencyCompiler: {
paths: ["@threshold-network/solidity-contracts/contracts/token/T.sol"],
keep: true,
},
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: ["local"],
},
development: {
url: "http://localhost:8545",
chainId: 1101,
tags: ["local"],
},
goerli: {
url: process.env.CHAIN_API_URL || "",
chainId: 5,
accounts: process.env.ACCOUNTS_PRIVATE_KEYS
? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["etherscan", "tenderly"],
},
sepolia: {
url: process.env.CHAIN_API_URL || "",
chainId: 11155111,
accounts: process.env.ACCOUNTS_PRIVATE_KEYS
? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["etherscan", "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: ["etherscan", "tenderly"],
},
},
tenderly: {
username: "thesis",
project: "",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
external: {
contracts: [
{
artifacts:
"node_modules/@threshold-network/solidity-contracts/artifacts",
},
{
artifacts: "node_modules/@keep-network/keep-core/artifacts",
// Example if we want to use deployment scripts from external package:
// deploy: "node_modules/@keep-network/keep-core/deploy",
},
{
artifacts: "node_modules/@keep-network/tbtc/artifacts",
},
],
deployments: {
// For hardhat environment we can fork the mainnet, so we need to point it
// to the contract artifacts.
// hardhat: ["./external/mainnet-v2"],
// For development environment we expect the local dependencies to be linked
// with `yarn link` command.
development: [
"node_modules/@threshold-network/solidity-contracts/artifacts",
"node_modules/@keep-network/keep-core/artifacts",
"node_modules/@keep-network/tbtc/artifacts",
],
goerli: [
"node_modules/@threshold-network/solidity-contracts/artifacts",
"node_modules/@keep-network/keep-core/artifacts",
"node_modules/@keep-network/tbtc/artifacts",
"./external/goerli",
],
sepolia: [
"node_modules/@threshold-network/solidity-contracts/artifacts",
"node_modules/@keep-network/keep-core/artifacts",
"node_modules/@keep-network/tbtc/artifacts",
"./external/sepolia",
],
mainnet: ["./external/mainnet-v2"],
},
},
namedAccounts: {
deployer: {
default: 0, // take the first account as deployer
},
rewardManager: {
default: 1,
goerli: 0, // use deployer account
sepolia: 0, // use deployer account
mainnet: 0, // use deployer account
},
thresholdCouncil: {
default: 2,
goerli: 0, // use deployer account
sepolia: 0, // use deployer account
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f",
},
treasuryGuild: {
default: 3,
goerli: 0, // use deployer account
sepolia: 0, // use deployer account
mainnet: "0x71E47a4429d35827e0312AA13162197C23287546",
},
},
mocha: {
timeout: 30000,
},
}
export default config