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 110d09f commit 99603b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export async function resolveUserConfig(
if (networkConfig.type === "edr") {
const resolvedNetworkConfig: EdrNetworkConfig = {
type: "edr",
chainId: networkConfig.chainId,
chainId: networkConfig.chainId ?? 31337,
chainType: networkConfig.chainType,
from: networkConfig.from,
gas: resolveGasConfig(networkConfig.gas),
Expand All @@ -229,7 +229,7 @@ export async function resolveUserConfig(
// TODO: This isn't how it's called in v2
forkConfig: networkConfig.forkConfig,
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 99603b9

Please sign in to comment.