Skip to content

Commit c9edf23

Browse files
committed
Add Avalanche Fuji and Arbitrum Sepolia network configurations to Hardhat
1 parent 5916825 commit c9edf23

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

packages/smart-contract/hardhat.config.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
import '@nomicfoundation/hardhat-toolbox';
22
import { HardhatUserConfig } from 'hardhat/config';
33
import { env } from './config/env';
4+
import { HARDHAT_NETWORK_MNEMONIC } from 'hardhat/internal/core/config/default-config';
45

56
const privateKey = env.WALLET_PRIVATE_KEY;
67

8+
// Avalanche Fuji specific configuration
9+
const fujiBaseConfig = {
10+
gasPrice: 25_000_000_000, // 25 Gwei default
11+
blockGasLimit: 8_000_000,
12+
chainId: 43113,
13+
};
14+
15+
// Arbitrum Sepolia specific configuration
16+
const arbitrumSepoliaBaseConfig = {
17+
gasPrice: 100_000_000, // 0.1 Gwei default (Arbitrum has lower gas prices)
18+
blockGasLimit: 30_000_000, // Arbitrum has higher block gas limits
19+
chainId: 421614,
20+
};
21+
722
const config: HardhatUserConfig = {
823
networks: {
924
hardhat: {
@@ -18,6 +33,22 @@ const config: HardhatUserConfig = {
1833
gasPrice: 0,
1934
accounts: privateKey ? [privateKey] : [],
2035
},
36+
// Add Fuji as a network
37+
avalancheFujiTestnet: {
38+
url: env.RPC_URL || 'https://api.avax-test.network/ext/bc/C/rpc',
39+
accounts: {
40+
mnemonic: env.MNEMONIC || HARDHAT_NETWORK_MNEMONIC,
41+
},
42+
...fujiBaseConfig,
43+
},
44+
// Add Arbitrum Sepolia as a network
45+
'arbitrum-sepolia': {
46+
url: env.RPC_URL || 'https://sepolia-rollup.arbitrum.io/rpc',
47+
accounts: {
48+
mnemonic: env.MNEMONIC || HARDHAT_NETWORK_MNEMONIC,
49+
},
50+
...arbitrumSepoliaBaseConfig,
51+
},
2152
// poco-chain native config
2253
'dev-native': {
2354
chainId: 65535,

0 commit comments

Comments
 (0)