generated from gnosisguild/zodiac-mod-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
84 lines (77 loc) · 1.96 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
import "@nomicfoundation/hardhat-toolbox"
import "@nomicfoundation/hardhat-verify"
import "@nomicfoundation/hardhat-ethers"
import "hardhat-contract-sizer"
import "hardhat-gas-reporter"
import "solidity-coverage"
import dotenv from "dotenv"
import type { HttpNetworkUserConfig } from "hardhat/types"
dotenv.config()
import "./tasks/deploy-mastercopies"
import "./tasks/deploy-mastercopy"
import "./tasks/extract-mastercopy"
import "./tasks/verify-mastercopies"
import "./tasks/verify-mastercopy"
const DEFAULT_MNEMONIC = "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"
const sharedNetworkConfig: HttpNetworkUserConfig = {}
if (process.env.PRIVATE_KEY) {
sharedNetworkConfig.accounts = [process.env.PRIVATE_KEY]
} else {
sharedNetworkConfig.accounts = {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
}
}
const config = {
paths: {
artifacts: "build/artifacts",
cache: "build/cache",
deploy: "src/deploy", // BEFORE: deploy/raw
sources: "contracts",
},
solidity: {
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
viaIR: true,
},
},
sourcify: {
enabled: true,
},
networks: {
hardhat: { tags: ["moduleProxy"] },
mainnet: {
...sharedNetworkConfig,
url: `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`,
},
gnosis: {
...sharedNetworkConfig,
url: "https://rpc.gnosischain.com",
},
matic: {
...sharedNetworkConfig,
url: "https://rpc-mainnet.maticvigil.com",
},
sepolia: {
...sharedNetworkConfig,
url: `https://sepolia.infura.io/v3/${process.env.INFURA_KEY}`,
tags: ["moduleMastercopy"],
},
},
namedAccounts: {
deployer: 0,
dependenciesDeployer: 1,
tester: 2,
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: "USD",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
}
export default config