generated from mudgen/contracts-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
64 lines (62 loc) · 1.85 KB
/
hardhat.config.ts
File metadata and controls
64 lines (62 loc) · 1.85 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
import 'dotenv/config';
import { defineConfig } from 'hardhat/config';
import hardhatViem from '@nomicfoundation/hardhat-viem';
import hardhatViemAssertions from '@nomicfoundation/hardhat-viem-assertions';
import hardhatVerify from '@nomicfoundation/hardhat-verify';
import hardhatNodeTestRunner from '@nomicfoundation/hardhat-node-test-runner';
import hardhatNetworkHelpers from '@nomicfoundation/hardhat-network-helpers';
// Note: For deployments, use scripts/utils/keystore.ts to load wallet from encrypted keystore
// The accounts array here is empty for read-only operations (tests, queries)
// Deploy scripts handle authentication via keystore prompt
export default defineConfig({
plugins: [
hardhatViem,
hardhatViemAssertions,
hardhatVerify,
hardhatNodeTestRunner,
hardhatNetworkHelpers,
],
verify: {
etherscan: {
// Single API key works across all Etherscan-based explorers (Polygon, Ethereum, Base)
// Use: pnpm exec hardhat verify etherscan --network <chain> <address> <args>
apiKey: process.env.ETHERSCAN_API_KEY || process.env.POLYGONSCAN_API_KEY || "",
},
},
solidity: {
version: '0.8.11',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
paths: {
tests: {
nodejs: './test'
}
},
networks: {
polygon: {
type: 'http' as const,
url: process.env.POLYGON_RPC || 'https://polygon-rpc.com',
chainId: 137,
},
ethereum: {
type: 'http' as const,
url: process.env.ETHEREUM_RPC || 'https://eth.llamarpc.com',
chainId: 1,
},
base: {
type: 'http' as const,
url: process.env.BASE_RPC || 'https://mainnet.base.org',
chainId: 8453,
},
manta: {
type: 'http' as const,
url: process.env.MANTA_RPC || 'https://pacific-rpc.manta.network/http',
chainId: 169,
}
}
});