Skip to content

Commit ee75cc9

Browse files
committed
Simplify creation of ChainConfig
1 parent fd7d892 commit ee75cc9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

services/requester/requester.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,6 @@ func (e *EVM) EstimateGas(
347347
return 0, err
348348
}
349349
blockNumber, blockTime := new(big.Int).SetUint64(targetBlock.Height), targetBlock.Timestamp
350-
emulatorConfig := emulator.NewConfig(
351-
emulator.WithChainID(e.config.EVMNetworkID),
352-
emulator.WithBlockNumber(blockNumber),
353-
emulator.WithBlockTime(blockTime),
354-
)
355350

356351
if blockOverrides != nil {
357352
if blockOverrides.Number != nil {
@@ -361,7 +356,8 @@ func (e *EVM) EstimateGas(
361356
blockTime = uint64(*blockOverrides.Time)
362357
}
363358
}
364-
if emulatorConfig.ChainConfig.IsOsaka(blockNumber, blockTime) {
359+
chainConfig := emulator.MakeChainConfig(e.config.EVMNetworkID)
360+
if chainConfig.IsOsaka(blockNumber, blockTime) {
365361
passingGasLimit = gethParams.MaxTxGas
366362
}
367363
}

0 commit comments

Comments
 (0)