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 opx_finance to dex.trades_beta #5106

Merged
merged 4 commits into from
Jan 9, 2024
Merged
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
28 changes: 25 additions & 3 deletions models/_sector/dex/trades/optimism/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ models:
- elastic
- elastic_2


- name: velodrome_optimism_base_trades
meta:
blockchain: optimism
Expand All @@ -267,7 +268,8 @@ models:
version:
- 1
- 2



- name: synthetix_optimism_base_trades
meta:
blockchain: optimism
Expand All @@ -284,7 +286,8 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('synthetix_optimism_base_trades_seed')



- name: openxswap_optimism_base_trades
meta:
blockchain: optimism
Expand All @@ -301,7 +304,8 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('openxswap_optimism_base_trades_seed')



- name: openocean_optimism_base_trades
meta:
blockchain: optimism
Expand All @@ -318,3 +322,21 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('openocean_optimism_base_trades_seed')


- name: opx_finance_optimism_base_trades
meta:
blockchain: optimism
sector: dex
project: opx_finance
contributors: kaiblade, tomfutago
config:
tags: [ 'optimism', 'dex', 'trades', 'opx_finance' ]
description: "OPX Finance optimism base trades"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('opx_finance_optimism_base_trades_seed')
3 changes: 3 additions & 0 deletions models/_sector/dex/trades/optimism/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ sources:
- name: ClipperPackedExchange_evt_Swapped
- name: ClipperPackedVerifiedExchange_evt_Swapped
- name: ClipperCove_evt_CoveSwapped
- name: opx_finance_optimism
tables:
- name: Router_evt_Swap
- name: velodrome_optimism
tables:
- name: Pair_evt_Swap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
, ref('dodo_optimism_base_trades')
, ref('kyberswap_optimism_base_trades')
, ref('clipper_optimism_base_trades')
, ref('opx_finance_optimism_base_trades')
, ref('velodrome_optimism_base_trades')
, ref('synthetix_optimism_base_trades')
, ref('openxswap_optimism_base_trades')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{
config(
schema = 'opx_finance_optimism',
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')]
)
}}

{{
generic_spot_compatible_trades(
blockchain = 'optimism',
project = 'opx_finance',
version = '1',
source_evt_swap = source('opx_finance_optimism', 'Router_evt_Swap')
)
}}
3 changes: 0 additions & 3 deletions models/opx_finance/optimism/opx_finance_optimism_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ sources:
description: >
Decoded event table for swaps on opx_finance
tables:
- name: Router_evt_Swap
loaded_at_field: evt_block_time

- name: Vault_evt_CollectMarginFees
loaded_at_field: evt_block_time

Expand Down