Questions tagged [serialization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
28 views

How are sets serialized in Tezos?

The mathematical structure of a set is an unordered collection. If a set does not have an order, how are they serialized by the PACK instruction? According to this overview set is packable.
3
votes
1answer
135 views

How are Tezos operations encoded?

Given a transaction in its serialized format, how do you parse it to get the destination, the amount, and the other fields? I am not asking for library or RPC endpoint to achieve this but for an ...
0
votes
1answer
24 views

How are pairs serialized in Tezos?

Running the PACK operation on a tuple (represented as a pair in Michelson, I get $ ligo interpret -s pascaligo 'Bytes.pack((1, 2))' 0x05070700010002 The numbers 1 and 2 are serialized as 0001 and ...
1
vote
1answer
36 views

How are strings serialized in Tezos?

How are strings serialized to byte arrays? I understand that they are treated like strings, and that ASCII (or utf8) encoding is used. But what about the rest of the bytes, what do they mean? Running ...
2
votes
1answer
47 views

How are integers serialized in Tezos?

I think that the int, tez and nat are all serialized the same way. But what is the algorithm? I tried running some examples through the LIGO CLI but couldn't figure out the system $ ligo interpret -s ...
1
vote
1answer
42 views

How to call PACK in JavaScript

In my smart contract in LIGO I serialize some data using Bytes.pack which calls the underlying PACK Michelson instruction. In my case, the function signature is (nat, address, nat) -> bytes. Does ...