Open munanadi opened 2 years ago
Hey @pisomanik , In API, for now, we have only the support of the contracts that implement Events NEP. So, wrap.near is not in the response for sure. We remember about it, we have a plan to support it separately.
If it's OK, could you please share your account_id? It would be nice to test on it later.
Thank you for your readiness to contribute! I'll try to write some docs and write down the issues that I have in todos/in my head 🙂
The account Id I used is spoiler.near
.
Yes wrap.near
doesn't show up but it is rather straightforward to query for that because we know the account id. It becomes hard for finding the other tokens for a given account id.
Is there any other way to find tokens given only an account id? Yep, docs and todo will help a lot. Thanks! Meanwhile, I'll source dive and do what I can.
We've introduced Events NEP, but not all the contracts updated to it, unfortunately. Theoretically, any account_id could deploy the contract and we will miss the updates from it.
The DB collects all the valid events, so we can easily find all the contracts that follow Events NEP. Please share contract_ids that you know who implement the core standard, but does not implement Events (if you will find them accidentally by any chance). I know about wrap.near and aurora.
The good news here is that the vast majority of the new contracts are built based on our SDK, it implements the Events perfectly, so it shouldn't be a problem with the new contracts. For the old ones, we are trying to find the solution right now.
Some of the common tokens I found are
dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near
which is USDTa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near
is USDC if I'm not wrongAlso, is there a better way to find out what tokens belong to an account right now?
One way that kinda works is using https://api.kitwallet.app/account/{ACCOUNT_ID}/likelyTokens
but this has some exceptions too.
@pisomanik Those are Aurora-bridged tokens and we are surely working on adding the support with custom indexing
@frol Ahh Aurora backed tokens. Now it makes sense. Thank you for the explanations. Appreciate it.
@pisomanik you helped a lot by providing your account_id. It's perfect for testing purposes: you have just the right number of different transactions to check the code 👍
I prefer to keep this issue open till we release the legacy support!
Using the endpoint `/accounts/
{account_id}
/coins
Only tokens like
USNor
wNEAR` show up andtokens like
USDT
andUSDC
are ignored which is not the case onwallet.near.org
as shown below ![image](https://user-images.githubusercontent.com/22261173/177594238-73c6b7bf-ab95-4e38-9468-f62e4f5c0990.png)Does this happen because of the spec differences in both?
Also, Would like to contribute and help. Please help with resources I can get started with.