Skip to content

Commit

Permalink
add zkswap_finance_v3 to trades (#7212)
Browse files Browse the repository at this point in the history
* add zkswap_finance_v3 to trades

* update filter from seed file for zkSwapFinance exchange v2
  • Loading branch information
ZkSwapFinance authored Dec 3, 2024
1 parent 6ca1262 commit cc584ea
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
21 changes: 21 additions & 0 deletions dbt_subprojects/dex/models/trades/zksync/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,27 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('zkswap_finance_zksync_base_trades_seed')
filter:
version: 1

- name: zkswap_finance_v3_zksync_base_trades
meta:
blockchain: zksync
sector: dex
project: zkswap_finance
contributors: lgingerich
config:
tags: [ 'zksync', 'dex', 'trades', 'zkswap_finance' ]
description: "zkSwap Finance V3 zksync 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('zkswap_finance_zksync_base_trades_seed')
filter:
version: 3

- name: gemswap_zksync_base_trades
meta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
, ref('ezkalibur_v2_zksync_base_trades')
, ref('wagmi_v1_zksync_base_trades')
, ref('zkswap_finance_zksync_base_trades')
, ref('zkswap_finance_v3_zksync_base_trades')
, ref('gemswap_zksync_base_trades')
, ref('vesync_v1_zksync_base_trades')
, ref('dracula_finance_zksync_base_trades')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'zkswap_finance_v3_zksync',
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_v3_trades(
blockchain = 'zksync',
project = 'zkswap_finance',
version = '3',
Pair_evt_Swap = source('zkswap_finance_v3_zksync', 'ZFV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('zkswap_finance_v3_zksync', 'ZFV3Factory_evt_PoolCreated')
)
}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
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
zksync,zkswap_finance,1,2024-03-27,0xd9904a2f5ba6123080822d41c3392f43b5596df070405119282e3d3dacebb060,210,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,0x493257fd37edb34451f62edf8d2a0c418852ba4c,30012651,94688371,94714471
zksync,zkswap_finance,1,2024-03-27,0xd595017ca2937ee8117721601605d373d2b9db4bc4fc68af2d676a25aa6531cc,593,0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,29979948,5030613878243119,17996667
zksync,zkswap_finance,1,2024-03-27,0xd595017ca2937ee8117721601605d373d2b9db4bc4fc68af2d676a25aa6531cc,593,0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,29979948,5030613878243119,17996667
zksync,zkswap_finance,3,2024-11-18,0x7615aa106eafd199cbc0a6a51e75c07c756385110479502c45b96bc0a4a39dd0,8,0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,49213495,193306889452386,600000
zksync,zkswap_finance,3,2024-11-18,0xb564f0dc2228961852024f8ad26619bd44bf2e5bc916918e783b04650d5a1f80,19,0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4,0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,49255134,100000,32122756733450
4 changes: 4 additions & 0 deletions sources/_sector/dex/trades/zksync/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ sources:
tables:
- name: ZFPair_evt_Swap
- name: Factory_evt_PairCreated
- name: zkswap_finance_v3_zksync
tables:
- name: ZFV3Pool_evt_Swap
- name: ZFV3Factory_evt_PoolCreated
- name: gemswap_zksync
tables:
- name: ZGemPair_evt_Swap
Expand Down

0 comments on commit cc584ea

Please sign in to comment.