-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
38 lines (33 loc) · 982 Bytes
/
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
import { config as envEncConfig } from "@chainlink/env-enc";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
envEncConfig();
import "./tasks"; // makes tasks available via cli
const providerApiKey = process.env.ALCHEMY_API_KEY!;
const privateKey = process.env.PRIVATE_KEY!;
/**
* Configured to fork arbitrum for local testing
*/
const config: HardhatUserConfig = {
solidity: "0.8.19",
networks: {
hardhat: {
// set chainId to be arbitrum since we are forking it for testing
chainId: 42161,
forking: {
url: `https://arb-mainnet.alchemyapi.io/v2/${providerApiKey}`,
},
},
mainnet: {
chainId: 1,
url: `https://eth-mainnet.alchemyapi.io/v2/${providerApiKey}`,
accounts: [privateKey],
},
arbitrum: {
chainId: 42161,
url: `https://arb-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [privateKey],
},
},
};
export default config;