From 549e2d788dcadedcf09204f93247d45a75b9329b Mon Sep 17 00:00:00 2001 From: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Date: Thu, 30 May 2024 11:41:48 +0200 Subject: [PATCH] blobGasPrice should be marshalled as hex --- eth/ethutils/receipt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth/ethutils/receipt.go b/eth/ethutils/receipt.go index 43fa46f168b..2caa571290e 100644 --- a/eth/ethutils/receipt.go +++ b/eth/ethutils/receipt.go @@ -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. @@ -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)) } }