-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example on how to deserialize to TEP64 dictionary. #6
Comments
I was able to figure this out for the following cases: Where the You can call HydrateFromUri to pull additional attributes that will provide missing data to the metadata.
|
Hi, Some minor fixes in your code:
I think it should be BTW, LoadStringSnake takes a parameter to omit/skip check of 0x00 prefix (which I saw missing in many places). .
Don't forget to dispose self-created HttpClient |
Oh nice thanks for the tips! Yes temp HttpClient should be disposed. Appreciate the library. Off topic: Is there a way to subscribe to Blocks/Transactions using tonlib, such that I can grab Transactions for Accounts as they are emitted? |
No, there is no such functionality in tonlib. |
Hello! Thank you for your excellent library.
I'm trying to pull Jetton Master data, I am using the reference specification to assist me: https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md#specification
I have the following example:
First, I pull the
get_jetton_data
:Then, I want to deserialize the metadata cell to it's components, however I'm struggling to see how to do this.
Initially I want to decompose it to first grab the Decimals, where the case is there are onchain properties for, I am using this
jUSDT
token to test this:https://tonscan.com/EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA?tab=methods
This reports the following for
jetton_content
:Now I want to deserialize my
metadataCell
into a dictionary for me to extract the above representation, but I can't see how to do this. I can call LoadDict on the cell, which it should be, I get back a Cell.I then use the specification referenced for Token Data, that the key should be a SHA256 as a string, and the value should be serialized later (so I pull the Slice). This isn't working for me and fails to deserialize the dictionary (
No dictionary found
).Do you have any suggestions on how I can get this deserialized correctly, or at least get a reference to a
Dictionary<TKey,TValue>
for me to take this further?The text was updated successfully, but these errors were encountered: