Questions tagged [bytes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

Need help on translating code to convert packed address to string

There is a code on this link (https://tezos.stackexchange.com/a/5908/8795) that decodes a packed address using code that is taken from PyTezos . I am trying to achieve the same using smartpy inside a ...
Kin's user avatar
  • 184
0 votes
1 answer
51 views

How do you submit a pair when calling an entrypoint on a contract with Taquito?

I am trying to submit a Pair of Bytes in a contract call with Taquito but am receiving an error. The contract interaction documentation does not go into exactly how to submit a Pair, but it does go ...
0x10's user avatar
  • 359
2 votes
2 answers
161 views

How do you convert a string sent to an entrypoint into its byte representation?

I want to turn a string into the 0x byte format inside an entrypoint. If I try to use sp.pack() the actual value I want gets prepended with pack instructions as detailed here I'm looking for a runtime ...
0x10's user avatar
  • 359
2 votes
1 answer
93 views

Why does `sp.pack('some string')` prepend `0x05010000002e` before the actual bytes?

If I pass in the string QmbPAr5RcCZZDRsNKnf2p1t6GK3Qu7oDH39HCK3aewUq3w to the sp.pack method in an entrypoint and perform and sp.trace in smartpy I expect to get the following bytes: ...
0x10's user avatar
  • 359
1 vote
1 answer
89 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 ...
Thorkil Værge's user avatar
3 votes
1 answer
127 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 ...
Thorkil Værge's user avatar