Questions tagged [serialization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
42 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.
user avatar
5 votes
1 answer
258 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 ...
user avatar
0 votes
1 answer
65 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 ...
user avatar
1 vote
1 answer
74 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 ...
user avatar
2 votes
1 answer
112 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 ...
user avatar
2 votes
1 answer
87 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 ...
user avatar