From 00ca7566949404674a12e4983638955774f04685 Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Tue, 1 Oct 2024 16:31:14 -1000 Subject: [PATCH] Add missing depositTxWithNonce case to MarshalJSON --- core/types/transaction_marshalling.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index 253e4f03de..a07d65414c 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -174,6 +174,20 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) { } enc.IsSystemTx = &itx.IsSystemTransaction // other fields will show up as null. + + case *depositTxWithNonce: + enc.Gas = (*hexutil.Uint64)(&itx.Gas) + enc.Value = (*hexutil.Big)(itx.Value) + enc.Input = (*hexutil.Bytes)(&itx.Data) + enc.To = tx.To() + enc.SourceHash = &itx.SourceHash + enc.From = &itx.From + if itx.Mint != nil { + enc.Mint = (*hexutil.Big)(itx.Mint) + } + enc.IsSystemTx = &itx.IsSystemTransaction + enc.Nonce = (*hexutil.Uint64)(&itx.EffectiveNonce) + // other fields will show up as null. } return json.Marshal(&enc) }