2

Using Taquito I can load the storage from a smart contract. This storage contains a map called token_info. If I call token_info.get('symbol'), I get a hex string of "4d494e". How do I convert this hex string to the ASCII string "MIN"?

I would prefer doing this conversion using the Taquito JavaScript library.

2

The bytes2Char function from the @taquito/utils package will convert these bytes to a string. The char2bytes is the counterpart that does the reverse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.