-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
61 lines (56 loc) · 1.44 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
61
require("dotenv").config({ path: ".env" });
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
const ACCOUNT_PRIVATE_KEY = process.env.PRIVATE_KEY;
const FORK_FUJI = false;
const FORK_MAINNET = false;
let forkingData = undefined;
if (FORK_MAINNET) {
forkingData = {
url: "https://api.avax.network/ext/bc/C/rpcc",
};
}
if (FORK_FUJI) {
forkingData = {
url: "https://api.avax-test.network/ext/bc/C/rpc",
};
}
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
hardhat: {
gasPrice: 225000000000,
chainId: !forkingData ? 43112 : undefined, //Only specify a chainId if we are not forking
forking: forkingData,
},
fuji: {
url: "https://api.avax-test.network/ext/bc/C/rpc",
gasPrice: 225000000000,
chainId: 43113,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`],
},
mainnet: {
url: "https://api.avax.network/ext/bc/C/rpc",
gasPrice: 225000000000,
chainId: 43114,
accounts: [`0x${ACCOUNT_PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: {
fuji: "fuji", // apiKey is not required, just set a placeholder
},
customChains: [
{
network: "fuji",
chainId: 43113,
urls: {
apiURL:
"https://api.routescan.io/v2/network/testnet/evm/43113/etherscan",
browserURL: "https://testnet.snowtrace.io",
},
},
],
},
};
export default config;