Skip to content
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

DUX-798 ronin: initiate katana dex #7280

Merged
merged 6 commits into from
Dec 10, 2024
Merged

DUX-798 ronin: initiate katana dex #7280

merged 6 commits into from
Dec 10, 2024

Conversation

jeff-dude
Copy link
Member

No description provided.

@jeff-dude jeff-dude added WIP work in progress dbt: dex covers the DEX dbt subproject labels Dec 9, 2024
@jeff-dude jeff-dude requested a review from Hosuke December 9, 2024 21:48
@jeff-dude jeff-dude added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Dec 9, 2024
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @Hosuke
i made a decision to not use the uni v2 macro here, as many column names have _ prefix and i didn't want to modify the macro for lots of if blockchain = 'ronin' then _ + type of logic. it would also then run all models which use the macro both in CI and prod.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we'd still want to use the macro we can perform any needed column renames in a CTE and then pass the cte references in the macro.

with evt_swap as (
  select
  _amount1Out as amount1Out
  ,_amount1In as amount1In
  ,...
  )
, evt_paircreated as (
  select
  ...
  )

{{
    uniswap_compatible_v2_trades(
        blockchain = 'ronin',
        project = 'katana',
        version = '1',
        Pair_evt_Swap = 'evt_swap`,
        Factory_evt_PairCreated = 'evt_paircreated'
    )
}}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both approaches are ok for me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually started down this approach via CTE renames, but then also realized the source tables we pass in have {{ }} wrapped around them in the macro itself. i don't think passing a CTE into there will work with those in place.

my suggestion is we get this integrated, then consider a cleanup on the macro to prepare for these edge cases.

@jeff-dude
Copy link
Member Author

CI is likely to fail on node crash. successful run can be found in commit logs.

@jeff-dude jeff-dude changed the title ronin: initiate katana dex DUX-798 ronin: initiate katana dex Dec 9, 2024
@jeff-dude jeff-dude marked this pull request as ready for review December 10, 2024 00:02
Copy link
Collaborator

@Hosuke Hosuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.✅

@jeff-dude jeff-dude added ready-for-merging and removed ready-for-review this PR development is complete, please review labels Dec 10, 2024
@jeff-dude jeff-dude merged commit 39d38e9 into main Dec 10, 2024
1 of 2 checks passed
@jeff-dude jeff-dude deleted the katana-dex branch December 10, 2024 19:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dbt: dex covers the DEX dbt subproject ready-for-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants