Skip to content

Commit

Permalink
blobGasPrice should be marshalled as hex (#10571)
Browse files Browse the repository at this point in the history
Cherry pick PR #10551 into the release branch
  • Loading branch information
yperbasis authored May 31, 2024
1 parent 7a39ee5 commit efed89b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eth/ethutils/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ func MarshalReceipt(
}

if !chainConfig.IsLondon(header.Number.Uint64()) {
fields["effectiveGasPrice"] = hexutil.Uint64(txn.GetPrice().Uint64())
fields["effectiveGasPrice"] = (*hexutil.Big)(txn.GetPrice().ToBig())
} else {
baseFee, _ := uint256.FromBig(header.BaseFee)
gasPrice := new(big.Int).Add(header.BaseFee, txn.GetEffectiveGasTip(baseFee).ToBig())
fields["effectiveGasPrice"] = hexutil.Uint64(gasPrice.Uint64())
fields["effectiveGasPrice"] = (*hexutil.Big)(gasPrice)
}

// Assign receipt status.
Expand All @@ -81,7 +81,7 @@ func MarshalReceipt(
if err != nil {
log.Error(err.Error())
}
fields["blobGasPrice"] = blobGasPrice
fields["blobGasPrice"] = (*hexutil.Big)(blobGasPrice.ToBig())
fields["blobGasUsed"] = hexutil.Uint64(misc.GetBlobGasUsed(numBlobs))
}
}
Expand Down

0 comments on commit efed89b

Please sign in to comment.