-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
60 lines (57 loc) · 1.33 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
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-deploy";
import { HardhatUserConfig } from "hardhat/config";
import {
ETHERSCAN_API_KEY,
FORKING_BLOCK_NUMMBER,
INFURA_API_KEY,
POLYGONSCAN_API_KEY,
getNetworkConfig,
} from "./config";
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
live: false,
chainId: 31337,
// https://hardhat.org/hardhat-network/docs/guides/forking-other-networks
forking: {
url: `https://goerli.infura.io/v3/${INFURA_API_KEY}`,
blockNumber: FORKING_BLOCK_NUMMBER,
enabled: false,
},
},
localhost: {
live: false,
chainId: 31337,
},
mainnet: getNetworkConfig("mainnet"),
polygon: getNetworkConfig("polygon"),
sepolia: getNetworkConfig("sepolia"),
mumbai: getNetworkConfig("mumbai"),
},
namedAccounts: {
deployer: {
default: 0,
},
},
// https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
sepolia: ETHERSCAN_API_KEY,
polygon: POLYGONSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
},
},
solidity: {
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 100000,
},
},
},
};
export default config;