diff --git a/models/_sector/dex/trades/scroll/_schema.yml b/models/_sector/dex/trades/scroll/_schema.yml index 171f0f923e3..f6e682514bb 100644 --- a/models/_sector/dex/trades/scroll/_schema.yml +++ b/models/_sector/dex/trades/scroll/_schema.yml @@ -88,7 +88,7 @@ models: - tx_hash - evt_index - check_dex_base_trades_seed: - seed_file: ref('syncswap_scroll_base_trades_seed') + seed_file: ref('syncswap_scroll_base_trades_seed') - name: nuri_scroll_base_trades meta: @@ -103,6 +103,23 @@ models: - dbt_utils.unique_combination_of_columns: combination_of_columns: - tx_hash - - evt_index + - evt_index + - check_dex_base_trades_seed: + seed_file: ref('nuri_scroll_base_trades_seed') + + - name: icecreamswap_v2_scroll_base_trades + meta: + blockchain: scroll + sector: dex + project: icecreamswap + contributors: intensodefi + config: + tags: [ 'scroll', 'dex', 'trades', 'icecreamswap' ] + description: "icecreamswap v2 scroll base trades" + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - tx_hash + - evt_index - check_dex_base_trades_seed: - seed_file: ref('nuri_scroll_base_trades_seed') \ No newline at end of file + seed_file: ref('icecreamswap_scroll_base_trades_seed') diff --git a/models/_sector/dex/trades/scroll/dex_scroll_base_trades.sql b/models/_sector/dex/trades/scroll/dex_scroll_base_trades.sql index 6b303cf1ca7..fc0fe4f8733 100644 --- a/models/_sector/dex/trades/scroll/dex_scroll_base_trades.sql +++ b/models/_sector/dex/trades/scroll/dex_scroll_base_trades.sql @@ -11,7 +11,8 @@ , ref('zebra_scroll_base_trades') , ref('scrollswap_scroll_base_trades') , ref('syncswap_v1_scroll_base_trades') - , ref('nuri_scroll_base_trades') + , ref('nuri_scroll_base_trades') + , ref('icecreamswap_v2_scroll_base_trades') ] %} WITH base_union AS ( @@ -35,7 +36,7 @@ WITH base_union AS ( , project_contract_address , tx_hash , evt_index - FROM + FROM {{ base_model }} {% if not loop.last %} UNION ALL diff --git a/models/_sector/dex/trades/scroll/platforms/icecreamswap_v2_scroll_base_trades.sql b/models/_sector/dex/trades/scroll/platforms/icecreamswap_v2_scroll_base_trades.sql new file mode 100644 index 00000000000..62f0a193833 --- /dev/null +++ b/models/_sector/dex/trades/scroll/platforms/icecreamswap_v2_scroll_base_trades.sql @@ -0,0 +1,20 @@ +{{ config( + schema = 'icecreamswap_v2_scroll' + , 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 = 'scroll' + , project = 'icecreamswap' + , version = '2' + , Pair_evt_Swap = source('icecreamswap_v2_scroll', 'UniswapV2Pair_evt_Swap') + , Factory_evt_PairCreated = source('icecreamswap_v2_scroll', 'UniswapV2Factory_evt_PairCreated') + ) +}} diff --git a/seeds/_sector/dex/_schema.yml b/seeds/_sector/dex/_schema.yml index 2c6c8156c2e..8dbacdc915b 100644 --- a/seeds/_sector/dex/_schema.yml +++ b/seeds/_sector/dex/_schema.yml @@ -2189,7 +2189,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: hashflow_optimism_base_trades_seed config: column_types: @@ -2219,7 +2219,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: baseswap_base_base_trades_seed config: column_types: @@ -2264,7 +2264,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: smardex_base_base_trades_seed config: column_types: @@ -2309,7 +2309,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: chainhop_optimism_base_trades_seed config: column_types: @@ -2324,7 +2324,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: fraxswap_arbitrum_base_trades_seed config: column_types: @@ -2384,7 +2384,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: apeswap_arbitrum_base_trades_seed config: column_types: @@ -2414,7 +2414,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: smardex_arbitrum_base_trades_seed config: column_types: @@ -2459,7 +2459,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swaap_v2_arbitrum_base_trades_seed config: column_types: @@ -2489,7 +2489,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: woofi_arbitrum_base_trades_seed config: column_types: @@ -2564,7 +2564,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: plantbaseswap_base_base_trades_seed config: column_types: @@ -2594,7 +2594,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: derpdex_base_base_trades_seed config: column_types: @@ -2609,7 +2609,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: torus_base_base_trades_seed config: column_types: @@ -2655,7 +2655,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: throne_exchange_v2_base_base_trades_seed config: @@ -2746,7 +2746,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: autotronic_base_base_trades_seed config: column_types: @@ -2806,7 +2806,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: sharkyswap_arbitrum_base_trades_seed config: column_types: @@ -2866,7 +2866,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: auragi_arbitrum_base_trades_seed config: column_types: @@ -2926,7 +2926,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: oasisswap_base_base_trades_seed config: column_types: @@ -2941,7 +2941,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: leetswap_v2_base_base_trades_seed config: column_types: @@ -2986,7 +2986,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: openocean_base_base_trades_seed config: column_types: @@ -3031,7 +3031,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: alienbase_base_base_trades_seed config: column_types: @@ -3046,7 +3046,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: swapbased_base_base_trades_seed config: column_types: @@ -3061,7 +3061,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: gridex_base_base_trades_seed config: column_types: @@ -3106,7 +3106,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: solidly_base_base_trades_seed config: column_types: @@ -3121,7 +3121,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: energon_base_base_trades_seed config: column_types: @@ -3136,7 +3136,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: voltswap_base_base_trades_seed config: column_types: @@ -3151,7 +3151,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: crescentswap_base_base_trades_seed config: column_types: @@ -3196,7 +3196,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: uniswap_zksync_base_trades_seed config: column_types: @@ -3211,7 +3211,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: uniswap_zora_base_trades_seed config: column_types: @@ -3226,7 +3226,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: syncswap_zksync_base_trades_seed config: column_types: @@ -3271,7 +3271,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: mute_zksync_base_trades_seed config: column_types: @@ -3331,7 +3331,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: zkswap_finance_zksync_base_trades_seed config: column_types: @@ -3346,7 +3346,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: gemswap_zksync_base_trades_seed config: column_types: @@ -3361,7 +3361,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: vesync_zksync_base_trades_seed config: column_types: @@ -3376,7 +3376,7 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp - + - name: dracula_finance_zksync_base_trades_seed config: column_types: @@ -3496,3 +3496,18 @@ seeds: token_bought_amount_raw: uint256 token_sold_amount_raw: uint256 block_date: timestamp + + - name: icecreamswap_scroll_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 diff --git a/seeds/_sector/dex/icecreamswap_scroll_base_trades_seed.csv b/seeds/_sector/dex/icecreamswap_scroll_base_trades_seed.csv new file mode 100644 index 00000000000..cfc32ccc77d --- /dev/null +++ b/seeds/_sector/dex/icecreamswap_scroll_base_trades_seed.csv @@ -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 +scroll,icecreamswap,2,2024-06-08,0x1690ce888089c354603aa64c052831bebbf6a44083c0ea2fa87cd08791202743,5,0x40375C92d9FAf44d2f9db9Bd9ba41a3317a2404f,0x5300000000000000000000000000000000000004,6371161,9974969540567703,5672100000000 diff --git a/sources/_sector/dex/trades/scroll/_sources.yml b/sources/_sector/dex/trades/scroll/_sources.yml index dce53b7b0ff..cf76a366b10 100644 --- a/sources/_sector/dex/trades/scroll/_sources.yml +++ b/sources/_sector/dex/trades/scroll/_sources.yml @@ -27,3 +27,7 @@ sources: tables: - name: ClPoolFactory_evt_PoolCreated - name: ClPool_evt_Swap + - name: icecreamswap_v2_scroll + tables: + - name: UniswapV2Factory_evt_PairCreated + - name: UniswapV2Pair_evt_Swap