graphql: fix GasPrice for blob and setcode transactions (#33542)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

Adds BlobTxType and SetCodeTxType to GasPrice switch case, aligning with
`MaxFeePerGas` and `MaxPriorityFeePerGas` handling.

Co-authored-by: m6xwzzz <maskk.weller@gmail.com>
This commit is contained in:
Mask Weller 2026-01-08 13:23:48 +07:00 committed by GitHub
parent 64d22fd7f7
commit a32851fac9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,7 +272,7 @@ func (t *Transaction) GasPrice(ctx context.Context) hexutil.Big {
return hexutil.Big{}
}
switch tx.Type() {
case types.DynamicFeeTxType:
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType:
if block != nil {
if baseFee, _ := block.BaseFeePerGas(ctx); baseFee != nil {
// price = min(gasTipCap + baseFee, gasFeeCap)