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 Icecreamswap v2 trades on Scroll to dex.trades #6116

Closed
Closed
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
23 changes: 20 additions & 3 deletions models/_sector/dex/trades/scroll/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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')
seed_file: ref('icecreamswap_scroll_base_trades_seed')
5 changes: 3 additions & 2 deletions models/_sector/dex/trades/scroll/dex_scroll_base_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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')
)
}}
Loading
Loading