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

Add dackieswap v3 to dex trades on Blast #6934

Merged
merged 9 commits into from
Oct 14, 2024
19 changes: 19 additions & 0 deletions dbt_subprojects/dex/models/trades/blast/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
@@ -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')
)
}}
15 changes: 15 additions & 0 deletions dbt_subprojects/dex/seeds/trades/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions sources/_sector/dex/trades/blast/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading