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

Swapline DEX on Base #7534

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
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 @@ -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
Expand Down Expand Up @@ -1077,4 +1094,4 @@ models:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('jojo_base_base_trades_seed')
seed_file: ref('jojo_base_base_trades_seed')
Original file line number Diff line number Diff line change
Expand Up @@ -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')
] %}
Expand Down
Original file line number Diff line number Diff line change
@@ -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')
)
}}
18 changes: 17 additions & 1 deletion dbt_subprojects/dex/seeds/trades/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -4788,4 +4804,4 @@ seeds:
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp
block_date: timestamp
Original file line number Diff line number Diff line change
@@ -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
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 @@ -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
- name: FundingRateArbitrage_evt_Swap
Loading