-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bridges of LI.FI across chains, the contract is LiFiDiamond_v2 #7172
Conversation
before we dig into the failing test, i think we need to redesign this pipeline a bit.
let's leave it at that for now, and revisit once all this in place 🙏 |
it's green check, so i guess i'm ready. |
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.
really clean code here, much appreciated!
left a few minor final changes below, please do implement when ready.
last thing: have you queried the data output yet, from CI pipeline?
https://github.com/duneanalytics/spellbook/actions/runs/12054789316/job/33613636277?pr=7172#step:12:32
you can query these tables on dune and ensure it looks as you expect, prior to merge 🙏
dbt_subprojects/daily_spellbook/macros/project/lifi/lifi_extract_bridge_data_macro.sql
Outdated
Show resolved
Hide resolved
...subprojects/daily_spellbook/models/_projects/lifi/LiFiDiamond_v2_evt_LiFiTransferStarted.sql
Outdated
Show resolved
Hide resolved
...subprojects/daily_spellbook/models/_projects/lifi/LiFiDiamond_v2_evt_LiFiTransferStarted.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_projects/lifi/schema.yml
Outdated
Show resolved
Hide resolved
I applied your suggestion. I checked the data output of CI pipeline, they were as expected. I want to add amount_usd to the output as what I do from line 223-427 in this query: https://dune.com/queries/4182530. The steps are:
How would you apply them in the models? |
dbt_subprojects/daily_spellbook/models/_projects/lifi/lifi_transfers.sql
Outdated
Show resolved
Hide resolved
for pricing, i would handle the way you are now. CTE which reads raw decoded data and pass into macro, then pass that CTE into new one with join to prices. i was thinking you could use a macro for the join to prices and have each model use it, but if your manual mapping of token addresses differs per chain, it may be more complex. to summarize:
|
Done, please review! |
dbt_subprojects/daily_spellbook/models/_projects/lifi/arbitrum/lifi_arbitrum_transfers.sql
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_projects/lifi/arbitrum/lifi_arbitrum_transfers.sql
Outdated
Show resolved
Hide resolved
@jeff-dude the test fails because decoded table notfound, which is weird. |
dbt_subprojects/daily_spellbook/models/_projects/lifi/lifi_transfers.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/macros/project/lifi/lifi_extract_bridge_data_macro.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_projects/lifi/arbitrum/lifi_arbitrum_transfers.sql
Outdated
Show resolved
Hide resolved
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.
this is looking clean now 🔥
thank you for the patience and iterating on changes, i'll get it prepped for merge!
Thank you for contributing to Spellbook 🪄
Please open the PR in draft and mark as ready when you want to request a review.
Description:
Extract bridge data from event
LiFiDiamond_v2_evt_LiFiTransferStarted
on each chain, then union across chains.quick links for more information: