diff --git a/dbt_subprojects/dex/models/trades/base/_schema.yml b/dbt_subprojects/dex/models/trades/base/_schema.yml index ec236a1577b..44e9a179d75 100644 --- a/dbt_subprojects/dex/models/trades/base/_schema.yml +++ b/dbt_subprojects/dex/models/trades/base/_schema.yml @@ -1045,6 +1045,23 @@ models: - check_dex_base_trades_seed: seed_file: ref('akronswap_base_base_trades_seed') + - name: swapline_base_base_trades + meta: + blockchain: base + sector: dex + project: swapline + contributors: princi + config: + tags: [ 'base', 'dex', 'trades', 'swapline' ] + description: "swapline 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('swapline_base_base_trades_seed') + - name: otsea_base_base_trades meta: blockchain: base @@ -1077,4 +1094,4 @@ models: - tx_hash - evt_index - check_dex_base_trades_seed: - seed_file: ref('jojo_base_base_trades_seed') \ No newline at end of file + seed_file: ref('jojo_base_base_trades_seed') diff --git a/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql b/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql index 799a0ccac65..f229b0c73a1 100644 --- a/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql +++ b/dbt_subprojects/dex/models/trades/base/dex_base_base_trades.sql @@ -54,6 +54,7 @@ , ref('infusion_base_base_trades') , ref('flashliquidity_base_base_trades') , ref('akronswap_base_base_trades') + , ref('swapline_base_base_trades') , ref('jojo_base_base_trades') , ref('otsea_base_base_trades') ] %} diff --git a/dbt_subprojects/dex/models/trades/base/platforms/swapline_base_base_trades.sql b/dbt_subprojects/dex/models/trades/base/platforms/swapline_base_base_trades.sql new file mode 100644 index 00000000000..4091207de97 --- /dev/null +++ b/dbt_subprojects/dex/models/trades/base/platforms/swapline_base_base_trades.sql @@ -0,0 +1,21 @@ +{{ + config( + schema = 'swapline_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 = 'swapline', + version = '1', + Pair_evt_Swap = source('swapline_base', 'LBPair_evt_Swap'), + Factory_evt_PairCreated = source('swapline_base', 'LBFactory_evt_LBPairCreated') + ) +}} \ No newline at end of file diff --git a/dbt_subprojects/dex/seeds/trades/_schema.yml b/dbt_subprojects/dex/seeds/trades/_schema.yml index d6fa4aa1185..70f2256b967 100644 --- a/dbt_subprojects/dex/seeds/trades/_schema.yml +++ b/dbt_subprojects/dex/seeds/trades/_schema.yml @@ -4665,6 +4665,21 @@ seeds: token_sold_amount_raw: uint256 block_date: timestamp + - name: swapline_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: otsea_base_base_trades_seed config: column_types: @@ -4679,6 +4694,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp + - name: jojo_base_base_trades_seed config: @@ -4788,4 +4804,4 @@ seeds: token_sold_address: varbinary token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 - block_date: timestamp \ No newline at end of file + block_date: timestamp diff --git a/dbt_subprojects/dex/seeds/trades/swapline_base_base_trades_seed.csv b/dbt_subprojects/dex/seeds/trades/swapline_base_base_trades_seed.csv new file mode 100644 index 00000000000..65963b15e8b --- /dev/null +++ b/dbt_subprojects/dex/seeds/trades/swapline_base_base_trades_seed.csv @@ -0,0 +1,2 @@ +blockchain,project,version,block_month,block_date,block_time,block_number,token_sold_amount_raw,token_bought_amount_raw,token_sold_address,token_bought_address,maker,taker,project_contract_address,tx_hash,evt_index +base,swapline,1,2024-10-01 00:00,2024-10-11 00:00,2024-10-11 11:52,20929092,0,7956190551055,0xfdf03f9b84babb7d8bf2fd583a85ba3858abd4c4,0xfdf03f9b84babb7d8bf2fd583a85ba3858abd4c4,0xb0385062b7516893e53aba24584b93fb20a3029f,0x19ceead7105607cd444f5ad10dd51356436095a1,0xe16d9cabbf84a8598e678e858d0e5000b279cb55,0xe51cb694f4c97883d1e9a695c044fae6d31da3d1ea12be3a1d11569c9772b90b,287 \ No newline at end of file diff --git a/sources/_sector/dex/trades/base/_sources.yml b/sources/_sector/dex/trades/base/_sources.yml index 2aa7e289fad..3fec7c1ea73 100644 --- a/sources/_sector/dex/trades/base/_sources.yml +++ b/sources/_sector/dex/trades/base/_sources.yml @@ -201,10 +201,14 @@ sources: tables: - name: UniswapV2Pair_evt_Swap - name: UniswapV2Factory_evt_PairCreated + - name: swapline_base + tables: + - name: LBPair_evt_Swap + - name: LBFactory_evt_LBPairCreated - name: otsea_base tables: - name: OTSeaV2_evt_SwappedTokensForETH - name: OTSeaV2_evt_SwappedETHForTokens - name: jojo_base tables: - - name: FundingRateArbitrage_evt_Swap \ No newline at end of file + - name: FundingRateArbitrage_evt_Swap