What's a good way to store a string in a contract?
I want to store it in 32 bytes, in UTF-8, which equals the same amount of characters.
However, in JavaScript, it's a bit of a hassle due to the maximum of 53 bits for a number.
Is there a more straightforward way to do this?
Or perhaps there's already an out-of-the-box utility in the "ton-core" package?
Jun 21, 2023, 10:00 AM
You can use Buffer which is basically an array of bytes
There are also functions like .storeStringRefTail in Builder objects that are used to store strings in cells (ton-core)
Jun 21, 2023, 10:23 AM
How can I extract data from a contract using the method_id when the data I passed is a 64-byte buffer?
In the example contract, there are only showcases for int, unfortunately for me 😔
In the example contract, there are only showcases for int, unfortunately for me 😔
Jun 21, 2023, 4:09 PM