-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
69 lines (65 loc) · 1.82 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
import { HardhatUserConfig } from "hardhat/config"
import "@nomicfoundation/hardhat-toolbox"
import "hardhat-deploy"
import "hardhat-contract-sizer"
import "dotenv/config"
import "@openzeppelin/hardhat-upgrades"
const GOERLI_PRIVATE_KEY = process.env.GOERLI_PRIVATE_KEY
const GOERLI_PRIVATE_KEY2 = process.env.GOERLI_PRIVATE_KEY2 || ""
const GOERLI_RPC_URL = process.env.GOERLI_RPC_URL || ""
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.17",
},
],
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 31337,
},
localhost: {
chainId: 31337,
},
goerli: {
url: GOERLI_RPC_URL,
accounts: GOERLI_PRIVATE_KEY !== undefined ? [GOERLI_PRIVATE_KEY, GOERLI_PRIVATE_KEY2] : [],
saveDeployments: true,
chainId: 5,
},
},
etherscan: {
// npx hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>
apiKey: {
// rinkeby: ETHERSCAN_API_KEY,
// kovan: ETHERSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
// avalanche: SNOWTRACE_API_KEY,
// avalancheFujiTestnet: SNOWTRACE_API_KEY,
// polygon: POLYGONSCAN_API_KEY,
},
},
gasReporter: {
enabled: false,
currency: "USD",
outputFile: "gas-report.txt",
noColors: true,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
token: "ETH",
},
namedAccounts: {
deployer: {
default: 0,
},
attacker: {
default: 1,
},
},
mocha: {
timeout: 300000, // 200 Seconds
},
}
export default config