This repository was archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
75 lines (72 loc) · 2.22 KB
/
Copy pathhardhat.config.ts
File metadata and controls
75 lines (72 loc) · 2.22 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
import { type HardhatUserConfig } from "hardhat/config";
import "@typechain/hardhat";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-chai-matchers";
const config: HardhatUserConfig = {
networks: {
// Used for the origin chain started by `yarn chain:a`
a: {
url: "http://127.0.0.1:8545",
chainId: 31337,
},
// Used for the destination chain started by `yarn chain:b`
b: {
url: "http://127.0.0.1:8546",
chainId: 31338,
},
scroll: {
url: "https://sepolia-rpc.scroll.io",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
polygonzkevm: {
url: "https://rpc.public.zkevm-test.net",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
goerli: {
url: "https://goerli.blockpi.network/v1/rpc/public",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
sepolia: {
url: "https://eth-sepolia.public.blastapi.io",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
mantle: {
url: "https://rpc.testnet.mantle.xyz",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
optimism: {
url: "https://optimism-goerli.public.blastapi.io",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
filecoin: {
url: "https://api.calibration.node.glif.io/rpc/v1",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
// Used for testing
hardhat: {
chainId:
// Unfortunately hardhat node doesn't support specifying a chainId or network; it just uses the default hardhat network.
// To work around this we use an environment variable to specify which chain we're on, and then set the chainId accordingly.
(process.env.IS_DESTINATION ?? "").toLowerCase() === "true"
? 31338
: 31337,
},
},
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
};
export default config;