diff --git a/dbt_subprojects/dex/models/trades/blast/_schema.yml b/dbt_subprojects/dex/models/trades/blast/_schema.yml index 5ba04fe97f9..64c779dc3ec 100644 --- a/dbt_subprojects/dex/models/trades/blast/_schema.yml +++ b/dbt_subprojects/dex/models/trades/blast/_schema.yml @@ -110,3 +110,22 @@ models: seed_file: ref('dackieswap_v2_blast_base_trades_seed') filter: version: 2 + + - name: dackieswap_v3_blast_base_trades + meta: + blockchain: blast + sector: dex + project: dackieswap + contributors: theresearchersg + config: + tags: [ 'arbitrum', 'dex', 'trades', 'dackieswap' ] + description: "dackieswap v3 arbitrum base trades" + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - tx_hash + - evt_index + - check_dex_base_trades_seed: + seed_file: ref('dackieswap_v3_blast_base_trades_seed') + filter: + version: 3 diff --git a/dbt_subprojects/dex/models/trades/blast/dex_blast_base_trades.sql b/dbt_subprojects/dex/models/trades/blast/dex_blast_base_trades.sql index af77e58ba2d..160bcc89b27 100644 --- a/dbt_subprojects/dex/models/trades/blast/dex_blast_base_trades.sql +++ b/dbt_subprojects/dex/models/trades/blast/dex_blast_base_trades.sql @@ -12,6 +12,7 @@ , ref('blasterswap_blast_base_trades') , ref('fenix_blast_base_trades') , ref('dackieswap_v2_blast_base_trades') + , ref('dackieswap_v3_blast_base_trades') ] %} WITH base_union AS ( diff --git a/dbt_subprojects/dex/models/trades/blast/platforms/dackieswap_v3_blast_base_trades.sql b/dbt_subprojects/dex/models/trades/blast/platforms/dackieswap_v3_blast_base_trades.sql new file mode 100644 index 00000000000..276d50b7771 --- /dev/null +++ b/dbt_subprojects/dex/models/trades/blast/platforms/dackieswap_v3_blast_base_trades.sql @@ -0,0 +1,21 @@ +{{ + config( + schema = 'dackieswap_v3_blast', + alias = 'base_trades', + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['tx_hash', 'evt_index'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] + ) +}} + +{{ + uniswap_compatible_v3_trades( + blockchain = 'blast', + project = 'dackieswap', + version = '3', + Pair_evt_Swap = source('dackieswap_v3_blast', 'DackieV3Pool_evt_Swap'), + Factory_evt_PoolCreated = source('dackieswap_v3_blast', 'DackieV3Factory_evt_PoolCreated') + ) +}} diff --git a/dbt_subprojects/dex/seeds/trades/_schema.yml b/dbt_subprojects/dex/seeds/trades/_schema.yml index 8e4e076e7f2..e53947ed195 100644 --- a/dbt_subprojects/dex/seeds/trades/_schema.yml +++ b/dbt_subprojects/dex/seeds/trades/_schema.yml @@ -4200,3 +4200,18 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp + + - name: dackieswap_v3_blast_base_trades_seed + config: + column_types: + blockchain: varchar + project: varchar + version: varchar + tx_hash: varbinary + evt_index: uint256 + block_number: uint256 + token_bought_address: varbinary + token_sold_address: varbinary + token_bought_amount_raw: uint256 + token_sold_amount_raw: uint256 + block_date: timestamp diff --git a/dbt_subprojects/dex/seeds/trades/dackieswap_v3_blast_base_trades_seed.csv b/dbt_subprojects/dex/seeds/trades/dackieswap_v3_blast_base_trades_seed.csv new file mode 100644 index 00000000000..760f26d9077 --- /dev/null +++ b/dbt_subprojects/dex/seeds/trades/dackieswap_v3_blast_base_trades_seed.csv @@ -0,0 +1,2 @@ +blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw +blast,dackiswap,3,2024-09-20,0x0a50c902ed23519767bb86e1432deb16896684d5ff2765f62aff22334b04ad87,2293,0x4300000000000000000000000000000000000004,0x4300000000000000000000000000000000000003,8997584,101417298998914,252167587928063562 diff --git a/sources/_sector/dex/trades/blast/_sources.yml b/sources/_sector/dex/trades/blast/_sources.yml index 5a5f59164d2..6f0b21b9c2f 100644 --- a/sources/_sector/dex/trades/blast/_sources.yml +++ b/sources/_sector/dex/trades/blast/_sources.yml @@ -32,3 +32,7 @@ sources: tables: - name: DackieFactory_evt_PairCreated - name: DackiePair_evt_Swap + - name: dackieswap_v3_blast + tables: + - name: DackieV3Factory_evt_PoolCreated + - name: DackieV3Pool_evt_Swap