Anoma.Node.Examples.Serializing.Structs.Mempool (Anoma v0.34.0)
I define examples on how to serialize common structs to json. I am merely a test suite, rather than examples.
Summary
Functions
Serialize an empty Tx struct.
I create an event, and put in a noun as the vm result, tx result, and code. These nouns are arbitrary chosen, they just have to be a noun.
I create an event, and put in a noun as the vm result. I then assert that this is properly serialized into json as jammed noun.
Functions
@spec tx() :: Anoma.Node.Transaction.Mempool.Tx.t()
Serialize an empty Tx struct.
@spec tx_with_nouns() :: Anoma.Node.Transaction.Mempool.Tx.t()
I create an event, and put in a noun as the vm result, tx result, and code. These nouns are arbitrary chosen, they just have to be a noun.
I then assert that this is properly serialized into json as jammed noun.
@spec tx_with_vm_result() :: Anoma.Node.Transaction.Mempool.Tx.t()
I create an event, and put in a noun as the vm result. I then assert that this is properly serialized into json as jammed noun.