-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add odos v2 to dex_aggregator for avalanche #9125
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
base: main
Are you sure you want to change the base?
Add odos v2 to dex_aggregator for avalanche #9125
Conversation
Updated model metadata and descriptions for odos_avalanche_c_trades. Adjusted contributors, sector, tags, and version, along with adding and modifying column descriptions.
PR SummaryAdds Odos v2 Avalanche C-Chain trades model and source, integrates it into
Written by Cursor Bugbot for commit 134fa21. Configure here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment @cursor review or bugbot run to trigger another review on this PR
| CAST(ARRAY[-1] AS ARRAY<bigint>) AS trace_address | ||
| FROM | ||
| dexs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing required columns in avalanche trades model
The odos_avalanche_c_trades model is missing 8 columns that odos_trades.sql expects to select via UNION ALL: token_bought_symbol, token_sold_symbol, token_pair, token_bought_amount, token_sold_amount, amount_usd, tx_from, and tx_to. Other chains (ethereum, base, arbitrum) have an odos_v2_*_trades intermediate model that joins with token metadata, prices, and transactions tables to compute these columns. The avalanche model directly queries raw event data without these joins, causing a schema mismatch that will fail the UNION operation.
Additional Locations (1)
discochuck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed [odos_avalanche_c_trades.sql] to [odos_v2_avalanche_c_trades.sql]
will need to add a [odos_avalanche_c_trades.sql] separately per cursor autobot:
--snip
Bug: Missing required columns in avalanche trades model
The odos_avalanche_c_trades model is missing 8 columns that odos_trades.sql expects to select via UNION ALL: token_bought_symbol, token_sold_symbol, token_pair, token_bought_amount, token_sold_amount, amount_usd, tx_from, and tx_to. Other chains (ethereum, base, arbitrum) have an odos_v2_*_trades intermediate model that joins with token metadata, prices, and transactions tables to compute these columns. The avalanche model directly queries raw event data without these joins, causing a schema mismatch that will fail the UNION operation.
--snip
Thank you for contributing to Spellbook 🪄
Please open the PR in draft and mark as ready when you want to request a review.
Description:
Attempting to add Odos v2 to dex_aggregator for Avalanche blockchain.
quick links for more information: