Skip to content

Commit d3af203

Browse files
yperbasismarshalys
andauthored
fix eth_call 'method handler crashed' error when tx has set maxFeePerBlobGas (#10506)
Cherry pick PR #10452 into the release branch Co-authored-by: mars <marshalys@gmail.com>
1 parent 7b5653b commit d3af203

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

turbo/adapter/ethapi/api.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ func (args *CallArgs) ToMessage(globalGasCap uint64, baseFee *uint256.Int) (type
133133
}
134134
}
135135
if args.MaxFeePerBlobGas != nil {
136-
maxFeePerBlobGas.SetFromBig(args.MaxFeePerBlobGas.ToInt())
136+
blobFee, overflow := uint256.FromBig(args.MaxFeePerBlobGas.ToInt())
137+
if overflow {
138+
return types.Message{}, fmt.Errorf("args.MaxFeePerBlobGas higher than 2^256-1")
139+
}
140+
maxFeePerBlobGas = blobFee
137141
}
138142
}
139143

0 commit comments

Comments
 (0)