Skip to content

CUR2-1149 Add kittypunch and flowswap to dex_flow.trades#9164

Closed
alicecha wants to merge 13 commits intomainfrom
CUR2-1149-flowswap
Closed

CUR2-1149 Add kittypunch and flowswap to dex_flow.trades#9164
alicecha wants to merge 13 commits intomainfrom
CUR2-1149-flowswap

Conversation

@alicecha
Copy link
Copy Markdown
Contributor

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

[...]


quick links for more information:

@github-actions github-actions Bot added WIP work in progress dbt: dex covers the DEX dbt subproject labels Dec 29, 2025
@alicecha
Copy link
Copy Markdown
Contributor Author

Tests for kittypunch v2 and flowswap v3:
--kittypunch v2
select 'prod query' as data_source, count() as num_trades, count(distinct tx_hash) num_txs from query_6309313
union ALL
select 'test CI model' as data_source, count(
) as num_trades, count(distinct tx_hash) as num_txs from test_schema.git_dunesql_8415d72_kittypunch_punchswap_v2_flow_base_trades

--flowswap v3
select 'prod query' as data_source, count() as num_trades, count(distinct tx_hash) num_txs from query_6433893
union all
select 'test CI model' as data_source, count(
) as num_trades, count(distinct tx_hash) as num_txs from test_schema.git_dunesql_8415d72_flowswap_v3_flow_base_trades

select project, count(*) from test_schema.git_dunesql_8415d72_dex_flow_base_trades where project in ('kittypunch', 'flowswap') group by 1

alicecha and others added 10 commits December 29, 2025 15:00
* created dex_gnosis_trades with enrichments at chain level

* created optimised chain-level macros for testing

* created dex_*_trades.sql for every chain, moving enrichment logic to chain level

* updated dex_trades to union from dex_*_trades chain-level models, and deleted multichain dex_base_trades model.

* refactored chains in dex.trades

* added chain-level tests for dex_*_trades models

* turned dex_trades into view and removed tests on dex_trades

* fixed data type in dex_*_trades column checks

* added dev_dates variable to streamline testing

* removed amount_usd test on base_trades

* set dev_dates to true for testing in CI

* Forced block_date to date and evt_index to bigint

* added block_month to unique key in dex_trades models

* removed column checks on dex_*_base_trades, replaced with checks on dex_*_trades

* remove dev_dates filtering for deployment
* convert to view

* Revert "convert to view"

This reverts commit 0b3a851.

* exclude for now
@jeff-dude
Copy link
Copy Markdown
Member

deprioritized. closing this for now, will be linked to linear if we ever need to reopen that task.

@jeff-dude jeff-dude closed this Apr 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 1, 2026
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 WIP work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants