Questions tagged [pack]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

Packing and signing a payload in Taquito

I'm trying to call a contract method that checks a signature against the chain ID, contract address, caller, and params. The contract lives at KT1XoT3RTkXCN2y25e635WeEmjN4xszQWtq6 on mainnet, and here ...
user avatar
  • 115
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
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
88 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