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 fenix_blast_base_trades #6307

Merged
merged 4 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dex/models/dex_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ FROM (VALUES
, ('nuri', 'Nuri', 'Direct', 'nuriexchange')
, ('icecreamswap', 'IceCreamSwap', 'Direct', 'icecream_swap')
, ('thruster', 'Thruster Finance', 'Direct', 'ThrusterFi')
, ('fenix', 'Fenix Finance', 'Direct', 'FenixFinance')
) AS temp_table (project, name, marketplace_type, x_username)
15 changes: 15 additions & 0 deletions dex/models/trades/blast/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,18 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('thruster_blast_base_trades_seed')

- name: fenix_blast_base_trades
meta:
blockchain: blast
sector: dex
project: fenix
contributors: hosuke
config:
tags: [ 'blast', 'dex', 'trades', 'fenix' ]
description: "Fenix blast v2 base trades"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
1 change: 1 addition & 0 deletions dex/models/trades/blast/dex_blast_base_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ref('uniswap_v3_blast_base_trades')
, ref('uniswap_v2_blast_base_trades')
, ref('thruster_blast_base_trades')
, ref('fenix_blast_base_trades')
] %}

WITH base_union AS (
Expand Down
21 changes: 21 additions & 0 deletions dex/models/trades/blast/platforms/fenix_blast_base_trades.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'fenix_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_v2_trades(
blockchain = 'blast',
project = 'fenix',
version = '2',
Pair_evt_Swap = source('fenix_blast', 'Pair_evt_Swap'),
Factory_evt_PairCreated = source('fenix_blast', 'PairFactoryUpgradeable_evt_PairCreated')
)
}}
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 @@ -17,3 +17,7 @@ sources:
- name: ThrusterFactory_Point_3_Fee_evt_PairCreated
- name: ThrusterPair_V2_1_Fee_evt_Swap
- name: ThrusterFactory_1_Fee_evt_PairCreated
- name: fenix_blast
tables:
- name: Pair_evt_Swap
- name: PairFactoryUpgradeable_evt_PairCreated
Loading