Questions tagged [bytes]
The bytes tag has no usage guidance.
4
questions
2
votes
2
answers
77
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 ...
2
votes
1
answer
55
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:
...
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 ...
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 ...