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 1 commit
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
17 changes: 17 additions & 0 deletions models/_sector/dex/trades/optimism/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,20 @@ models:
- coves1
- 1
- 2

- 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 @@ -28,3 +28,6 @@ sources:
- name: ClipperPackedExchange_evt_Swapped
- name: ClipperPackedVerifiedExchange_evt_Swapped
- name: ClipperCove_evt_CoveSwapped
- name: opx_finance_optimism
tables:
- name: Router_evt_Swap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
, ref('wardenswap_optimism_base_trades')
, ref('dodo_optimism_base_trades')
, ref('clipper_optimism_base_trades')
, ref('opx_finance_optimism_base_trades')
] %}

WITH base_union AS (
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')
)
}}
11 changes: 0 additions & 11 deletions models/opx_finance/optimism/opx_finance_optimism_sources.yml

This file was deleted.