Open livingroot opened 3 months ago
If you need to access Jetton contract data, such as the name, symbol, or decimals, you'll encounter an issue because the GetJettonDataAtBlock method currently only refers to the NFT package and parses NFT data.
https://github.com/xssnick/tonutils-go/blob/9db1a1391b6c8007f5d2e6ee812aeb55764c50c8/ton/jetton/jetton.go#L137-L140
So ContentOnchain in a ContentFromCell for jetton method must look like that:
ContentOnchain: &ContentOnchain{ Address: string(getOnchainVal(dict, "address")), Name: string(getOnchainVal(dict, "name")), Symbol: string(getOnchainVal(dict, "symbol")), Decimals: string(getOnchainVal(dict, "decimals")), Image: string(getOnchainVal(dict, "image")), Description: string(getOnchainVal(dict, "description")), attributes: dict, },
I plan to create a pull request later unless someone else addresses this first.
Hi, you can use GetAttribute("address") and etc to get any param
GetAttribute("address")
If you need to access Jetton contract data, such as the name, symbol, or decimals, you'll encounter an issue because the GetJettonDataAtBlock method currently only refers to the NFT package and parses NFT data.
https://github.com/xssnick/tonutils-go/blob/9db1a1391b6c8007f5d2e6ee812aeb55764c50c8/ton/jetton/jetton.go#L137-L140
So ContentOnchain in a ContentFromCell for jetton method must look like that:
I plan to create a pull request later unless someone else addresses this first.