-
Notifications
You must be signed in to change notification settings - Fork 17
/
hardhat.config.js
89 lines (88 loc) · 2.42 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
require("hardhat-deploy");
require("solidity-docgen");
require("hardhat-watcher");
require("solidity-coverage");
require("hardhat-gas-reporter");
require("hardhat-contract-sizer");
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
module.exports = {
solidity: {
version: "0.8.15",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
namedAccounts: {
// Always the first account
deployer: 0,
factoryOwner: {
// Defaults to second account
default: 1,
mainnet: "0xb3613DA07178a0beE44b48FBBCe1fa70Ff5d2DCC", // https://gnosis-safe.io/app/eth:0xb3613DA07178a0beE44b48FBBCe1fa70Ff5d2DCC
goerli: "0x534b107C4958e2AEddf47C438bd4388e2Bd5402A", // https://gnosis-safe.io/app/gor:0x534b107C4958e2AEddf47C438bd4388e2Bd5402A
// polygon: '',
},
factorySigner: {
// Defaults to third account
default: 2,
mainnet: "0xFe9609570EE974bFBf29691Db9c6f6d2512D623A",
goerli: "0xf2e5fEb12556400E0702edeeA26938E90D7a5Ea2",
// polygon: '',
},
},
networks: {
hardhat: {
chainId: parseInt(process.env.CHAIN_ID || "31337"),
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_PROJECT_ID}`,
accounts: process.env.DEPLOYER_WALLET
? [process.env.DEPLOYER_WALLET]
: undefined,
etherscan: { apiKey: process.env.API_KEY_ETHERSCAN },
},
polygon: {
url: "https://polygon-rpc.com",
accounts: process.env.DEPLOYER_WALLET
? [process.env.DEPLOYER_WALLET]
: undefined,
etherscan: { apiKey: process.env.API_KEY_POLYGONSCAN },
},
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_PROJECT_ID}`,
accounts: process.env.DEPLOYER_WALLET
? [process.env.DEPLOYER_WALLET]
: undefined,
etherscan: { apiKey: process.env.API_KEY_ETHERSCAN },
},
},
watcher: {
dev: {
tasks: ["test"],
files: ["./contracts", "./test"],
},
docs: {
tasks: ["docgen"],
files: ["./contracts"],
},
},
gasReporter: {
enabled: !!process.env.REPORT_GAS,
currency: "USD",
gasPrice: 55,
coinmarketcap: process.env.CMC_API_KEY,
},
contractSizer: {
runOnCompile: !!process.env.REPORT_CONTRACT_SIZE,
},
docgen: {
path: "./docs",
clear: true,
runOnCompile: !!process.env.GENERATE_DOCS,
pages: "files",
},
};