Skip to content

Commit

Permalink
Fix gas estimation (#153)
Browse files Browse the repository at this point in the history
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
  • Loading branch information
boyuan-chen and CAPtheorem authored May 8, 2022
1 parent 883d8e5 commit 3f9f3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion l2geth/internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
// If gas price is 0 or nil, the returned gas limit doesn't include the
// l1 security fee
gasPrice := new(big.Int)
price, err := b.SuggestPrice(ctx)
price, err := b.SuggestL2GasPrice(context.Background())
if err == nil && isFeeTokenUpdate {
if args.GasPrice == nil {
// gasPrice is used to calculate the l2ExtraFee
Expand Down

0 comments on commit 3f9f3e7

Please sign in to comment.