Skip to content

Commit

Permalink
stateoverrides to estimategasbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Code0x2 committed Nov 4, 2023
1 parent 49846f9 commit e3cff33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2698,8 +2698,8 @@ type EstimateGasBundleArgs struct {
Coinbase *string `json:"coinbase"`
Timestamp *uint64 `json:"timestamp"`
Timeout *int64 `json:"timeout"`
//SimulationLogs bool `json:"simulationLogs"`
CreateAccessList bool `json:"createAccessList"`
StateOverrides *StateOverride `json:"stateOverrides"`
CreateAccessList bool `json:"createAccessList"`
}

// callbundle, but doesnt require signing
Expand All @@ -2721,6 +2721,10 @@ func (s *SearcherAPI) EstimateGasBundle(ctx context.Context, args EstimateGasBun
if state == nil || err != nil {
return nil, err
}
if err := args.StateOverrides.Apply(state); err != nil {
return nil, err
}

blockNumber := big.NewInt(int64(args.BlockNumber))
timestamp := parent.Time + 1
if args.Timestamp != nil {
Expand Down

0 comments on commit e3cff33

Please sign in to comment.