Skip to content

Commit 43dc294

Browse files
committed
Add missing depositTxWithNonce case to MarshalJSON
1 parent 0d00593 commit 43dc294

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/types/transaction_marshalling.go

+14
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {
174174
}
175175
enc.IsSystemTx = &itx.IsSystemTransaction
176176
// other fields will show up as null.
177+
178+
case *depositTxWithNonce:
179+
enc.Gas = (*hexutil.Uint64)(&itx.Gas)
180+
enc.Value = (*hexutil.Big)(itx.Value)
181+
enc.Input = (*hexutil.Bytes)(&itx.Data)
182+
enc.To = tx.To()
183+
enc.SourceHash = &itx.SourceHash
184+
enc.From = &itx.From
185+
if itx.Mint != nil {
186+
enc.Mint = (*hexutil.Big)(itx.Mint)
187+
}
188+
enc.IsSystemTx = &itx.IsSystemTransaction
189+
enc.Nonce = (*hexutil.Uint64)(&itx.EffectiveNonce)
190+
// other fields will show up as null.
177191
}
178192
return json.Marshal(&enc)
179193
}

0 commit comments

Comments
 (0)