Skip to content

Commit

Permalink
Remove estimate gas with block overrides (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiepnv90 authored Nov 28, 2024
1 parent 9d456b5 commit 60071aa
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/eth/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,6 @@ func (s *Simulator) CallContract(
return s.gethClient.CallContract(ctx, msg, blockNumber, overrides)
}

func (s *Simulator) EstimateGasWithBlockOverrides(
ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int,
overrides *map[common.Address]gethclient.OverrideAccount,
blockOverrides gethclient.BlockOverrides,
) (uint64, error) {
var gas hexutil.Uint64
err := s.c.CallContext(
ctx, &gas, "eth_estimateGas", mev.ToCallArg(msg),
toBlockNumArg(blockNumber), overrides, blockOverrides,
)

return uint64(gas), err
}

func toBlockNumArg(number *big.Int) string {
if number == nil {
return "latest"
Expand Down

0 comments on commit 60071aa

Please sign in to comment.