Skip to content

Commit

Permalink
fix eth_call 'method handler crashed' error when tx has set maxFeePer…
Browse files Browse the repository at this point in the history
…BlobGas (#10452)

`maxFeePerBlobGas` is nil, can not call SetFromBig directly
  • Loading branch information
marshalys authored and yperbasis committed May 27, 2024
1 parent b0df97f commit 2356ac3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion turbo/adapter/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ func (args *CallArgs) ToMessage(globalGasCap uint64, baseFee *uint256.Int) (type
}
}
if args.MaxFeePerBlobGas != nil {
maxFeePerBlobGas.SetFromBig(args.MaxFeePerBlobGas.ToInt())
blobFee, overflow := uint256.FromBig(args.MaxFeePerBlobGas.ToInt())
if overflow {
return types.Message{}, fmt.Errorf("args.MaxFeePerBlobGas higher than 2^256-1")
}
maxFeePerBlobGas = blobFee
}
}

Expand Down

0 comments on commit 2356ac3

Please sign in to comment.