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 (#10506)

Cherry pick PR #10452 into the release branch

Co-authored-by: mars <marshalys@gmail.com>
  • Loading branch information
yperbasis and marshalys authored May 27, 2024
1 parent 7b5653b commit d3af203
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 d3af203

Please sign in to comment.