Skip to content

Commit

Permalink
Make chainId optional in the EDR network configs
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Oct 28, 2024
1 parent d45ddce commit 91d0dc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,14 @@ export async function resolveUserConfig(
if (networkConfig.type === "edr") {
const resolvedNetworkConfig: EdrNetworkConfig = {
type: "edr",
chainId: networkConfig.chainId,
chainId: networkConfig.chainId ?? 31337,
chainType: networkConfig.chainType ?? "l1",
from: networkConfig.from,
gas: resolveGasConfig(networkConfig.gas),
gasMultiplier: networkConfig.gasMultiplier ?? 1,
gasPrice: resolveGasConfig(networkConfig.gasPrice),

hardfork: networkConfig.hardfork ?? "cancun",
networkId: networkConfig.networkId ?? networkConfig.chainId,
networkId: networkConfig.networkId ?? networkConfig.chainId ?? 31337,
blockGasLimit: networkConfig.blockGasLimit ?? 12_500_000,
minGasPrice: BigInt(networkConfig.minGasPrice ?? 0),
automine: networkConfig.automine ?? true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ declare module "../../../../types/config.js" {

export interface EdrNetworkUserConfig {
type: "edr";
chainId: number;
chainId?: number;
chainType?: ChainType;
from?: string;
gas?: GasUserConfig;
Expand Down

0 comments on commit 91d0dc4

Please sign in to comment.