-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fixing Solana NFT Token Classification + Retrieving Missing DEX Trades #7746
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
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
|
thank you for proposing this fix. i wanted to ensure you were aware and able to test the output of your change, in the table built during CI builds attached to PR. you can find table name here, then query on dune to test it's as expected. since this is upstream of many important solana spells, we should be doing in-depth testing here to ensure it does what is intended. in addition to testing the table directly, we can also compile queries from downstream spells which join to it to ensure results downstream are also as expected. it looks like you have a bit of the lineage in mind in the PR description, so would be nice if we could test those with this CI table in place of the prod table for joins. we can filter on just a few days of data to make queries run a bit faster to iterate checks. for a visual of what is all downstream of this, can see list here. we don't need to test them all, but ones such as |
|
@jeff-dude the fixed worked as expected and is filtering now the Fungible Token in the example: New model: Old model: But the problem is that I still see some Fungible tokens, probably coming from the other CTEs. I changed the way to filter the Fungible Tokens in my last commit. After this new model is finished to compile, can you please compile also |
|
on your local setup, you can run |


Description:
We were investigating some missing trades from the dex_solana.trades table. Example: Solscan Link
We found out that these trades were being filtered because, in the
dex_solana.tradesdbt transformation. We have the condition 'fungible' (source). This is in fact a fungible token, so it shouldn't be filtered.The problem is that the
solana_utils_token_accountsdbt transformation is marking some account tokens as 'nft' when it shouldn't be (source).The exact issue lies in the
tokens_solana_nfttransformation:According to Metaplex docs, inside the createArgs, we can find the following TokenStandards:
There are no filters in the CTE query executed against the
mpl_token_metadata_solana.mpl_token_metadata_call_createtable source, so it retrieves all token accounts, including fungible tokens like the example below.Solution:
Adding a WHERE condition to filter only token accounts related to non-fungible tokens will ensure that these fungible
quick links for more information: