Skip to content

Commit

Permalink
Add flashliquidity dex to trades (#7219)
Browse files Browse the repository at this point in the history
* Add flashliquidity dex

* updated csv file

* update sql file

---------

Co-authored-by: jeff-dude <[email protected]>
  • Loading branch information
archie17277 and jeff-dude authored Dec 3, 2024
1 parent 1a26cde commit 6ca1262
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 2 deletions.
1 change: 1 addition & 0 deletions dbt_subprojects/dex/models/dex_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,6 @@ FROM (VALUES
, ('kaia_swap', 'KaiaSwap', 'Direct', 'KaiaSwap')
, ('defi_kingdoms', 'DeFi Kingdoms', 'Direct', 'DeFiKingdoms')
, ('hyperjump', 'HyperJump', 'Direct', 'Hyperjump_fi')
, ('flashliquidity', 'Flashliquidity', 'Direct', 'flashliquidity')
, ('akronswap', 'Akronswap', 'Direct', 'AkronFinance')
) AS temp_table (project, name, marketplace_type, x_username)
19 changes: 18 additions & 1 deletion dbt_subprojects/dex/models/trades/base/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,23 @@ models:
- check_dex_base_trades_seed:
seed_file: ref('xchange_base_base_trades_seed')

- name: flashliquidity_base_base_trades
meta:
blockchain: base
sector: dex
project: flashliquidity
contributors: archie
config:
tags: [ 'base', 'dex', 'trades', 'flashliquidity' ]
description: "flashliquidity base base trades"
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('flashliquidity_base_base_trades_seed')

- name: akronswap_base_base_trades
meta:
blockchain: base
Expand All @@ -1012,4 +1029,4 @@ models:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('akronswap_base_base_trades_seed')
seed_file: ref('akronswap_base_base_trades_seed')
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
, ref('solidly_v3_base_base_trades')
, ref('swaap_v2_base_base_trades')
, ref('xchange_base_base_trades')
, ref('flashliquidity_base_base_trades')
, ref('akronswap_base_base_trades')
] %}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'flashliquidity_base',
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 = 'base',
project = 'flashliquidity',
version = '1',
Pair_evt_Swap = source('flashliquidity_base', 'FlashLiquidityPair_evt_Swap'),
Factory_evt_PairCreated = source('flashliquidity_base', 'FlashLiquidityFactory_evt_PairCreated')
)
}}
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 @@ -4456,6 +4456,21 @@ seeds:
token_sold_amount_raw: uint256
block_date: timestamp

- name: flashliquidity_base_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

- name: akronswap_base_base_trades_seed
config:
column_types:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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
base,flashliquidity_base,1,2024-01-02,0xe9bf79692277d80abe35da70d44e6a4fe1154bff25cd435fcf257f5981ed8f46,18,0x4200000000000000000000000000000000000006,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,8695071,2074983733705749,5000000
base,flashliquidity_base,1,2024-01-10,0xcbd2ef2440ad8f360b33a58423960d9cd3073317448e6e5364e76af316776046,37,0x4200000000000000000000000000000000000006,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,9028475,2434495227355002,5652787
6 changes: 5 additions & 1 deletion sources/_sector/dex/trades/base/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ sources:
tables:
- name: XchangePair_evt_Swap
- name: XchangeFactory_evt_PairCreated
- name: flashliquidity_base
tables:
- name: FlashLiquidityPair_evt_Swap
- name: FlashLiquidityFactory_evt_PairCreated
- name: akronswap_base
tables:
- name: UniswapV2Pair_evt_Swap
- name: UniswapV2Factory_evt_PairCreated
- name: UniswapV2Factory_evt_PairCreated

0 comments on commit 6ca1262

Please sign in to comment.