-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
79 lines (73 loc) · 1.79 KB
/
hardhat.config.ts
File metadata and controls
79 lines (73 loc) · 1.79 KB
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import "hardhat-deploy";
// Load environment variables
import * as dotenv from "dotenv";
dotenv.config({ path: ".env" });
// Get environment variables or use defaults
const PRIVATE_KEY = process.env.WALLET_SECRET || "0x0000000000000000000000000000000000000000000000000000000000000000";
const GNOSIS_RPC_URL = process.env.GNOSIS_RPC_URL || "https://gnosis-rpc.publicnode.com";
const GNOSIS_API_KEY = process.env.MAINNET_ETHERSCAN_KEY || "";
const config: HardhatUserConfig = {
solidity: {
version: "0.8.23",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
viaIR: true,
},
},
networks: {
hardhat: {
chainId: 31337,
},
gnosis: {
url: GNOSIS_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 100,
verify: {
etherscan: {
apiUrl: "https://api.gnosisscan.io",
apiKey: GNOSIS_API_KEY,
},
},
},
},
etherscan: {
apiKey: {
gnosis: GNOSIS_API_KEY,
},
customChains: [
{
network: "gnosis",
chainId: 100,
urls: {
apiURL: "https://api.gnosisscan.io/api",
browserURL: "https://gnosisscan.io",
},
},
],
},
// Sourcify verification (v2 - supported by GnosisScan / Blockscout natively)
// No API key required. Verifies on https://sourcify.dev and mirrors to GnosisScan.
sourcify: {
enabled: true,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
deploy: "./deploy",
deployments: "./deployments",
},
namedAccounts: {
deployer: {
default: 0,
},
},
};
export default config;