Skip to content

Commit

Permalink
Add missing depositTxWithNonce case to MarshalJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Oct 2, 2024
1 parent 6523d8e commit 00ca756
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 00ca756

Please sign in to comment.