-
Notifications
You must be signed in to change notification settings - Fork 100
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
getnep11balances in TokensTrakcer doesn't return correct result compared with invoking tokensOf #754
Comments
NeoGo 0.99.2:
|
Notice that the
|
TokensTracker will deocde that Base64 ByteString. |
That's not the point, in your output you have
While NeoGo returns
And that's the correct answer (even though the symbol is bad, we're expecting something |
These are two absolutely different contracts, I find tokenid in |
Huh, thanks for clarification. I was then somewhat surprised that I don't see any tokens listed for
While there was something (the same token as in your
|
TokenId should be ByteString, I will close this. |
Hey guys, why if i do the rpc call "getnep11balances" on NEO-GO nodes i get a result with a set of data and if i do the same request to C# nodes i get it different? Example: Request body: The contracts that are returning different data here are BlackStoneShard and BoredDoge NFTs. @superboyiii @roman-khimov |
@mfbz, I don't have any obvious answer for this one. Take this token for example:
Block 1680095 really has one transaction, 0xb878b2ad81078522b5d2e98f5be89d635223ecf1aea5e43a0ed3a3e57c9b9122 and it has this event generated during the execution:
Which seems to be a valid event, so it should be processed correctly by TokensTracker. |
Yes, i agree with you. Another strange thing is that I just tried also with another contract (https://explorer.onegate.space/contractinfo/0xc09af9967175faca47d610716900f075bd8bf18a) that has basically the same Transfer method and NEP11 handling of the BlackStoneShard contract (https://explorer.onegate.space/contractinfo/0xdd191554eb403669221137aee0c424c27670cb2b) and it's correctly returned from getnep11balances. I think this issue should be reopened |
Thanks to NeoLine devs we found the cause of the problem. Basically BlackStoneShard Nft contract at the beginning had 2 balanceOf methods because i coded it with an overload to handle the case of requesting the balance of a key of a nft like in Ethereum EIP-1155 (https://eips.ethereum.org/EIPS/eip-1155). The fact of having 2 balanceOf methods caused the problem on the c# node. Now i removed the overload and saw that everything is working correctly. |
Reminds me of neo-project/neo#2355. In fact NeoGo uses In absence of neo-project/neo#2355 we probably should check for |
It's more heavyweight at the same time, but should be OK for the purpose. Inspired by neo-project/neo-modules#754 (comment)
It's more heavyweight at the same time, but should be OK for the purpose. Inspired by neo-project/neo-modules#754 (comment)
Describe the bug
getnep11balances
in TokensTrakcer doesn't return correct result compared with invokingtokensOf
To Reproduce
Steps to reproduce the behavior:
getnep11balances
on a T5 node like:return:
Only 1 NEP-11 token is returned.
2. invoke
tokensOf
like:return:
Go to
traverseiterator
and invokereturn:
Expected behavior
Should return the same amount of tokenid
Platform:
The text was updated successfully, but these errors were encountered: