Skip to content

Commit

Permalink
Add viction known info
Browse files Browse the repository at this point in the history
  • Loading branch information
Hosuke committed Dec 11, 2024
1 parent 42cc9b8 commit b69918a
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 45 deletions.
15 changes: 0 additions & 15 deletions dbt_subprojects/dex/models/trades/viction/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ models:
data_tests:
- check_dex_info_relationship

- name: victionswap_viction_base_trades
meta:
blockchain: viction
sector: dex
project: victionswap
contributors: hosuke
config:
tags: [ 'viction', 'dex', 'trades', 'victionswap', 'v2' ]
description: "VictionSwap base trades"
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index

- name: baryon_viction_base_trades
meta:
blockchain: viction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
}}

{% set base_models = [
ref('victionswap_viction_base_trades')
, ref('baryon_viction_base_trades')
, ref('rabbitswap_viction_base_trades')
, ref('mori_viction_base_trades')
-- Pending for Swap event tables
ref('baryon_viction_base_trades'),
ref('rabbitswap_viction_base_trades')
-- Pending for contract deployment and event tables
-- ref('mori_viction_base_trades')
] %}

WITH base_union AS (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
TODO: This model is pending for Swap event table
Currently only PairCreated event is available
*/

{{
config(
schema = 'baryon_viction',
Expand All @@ -10,12 +15,34 @@
)
}}

/* Uncomment when Swap event table is available
{{
uniswap_compatible_v2_trades(
blockchain = 'viction',
project = 'baryon',
version = '2',
Pair_evt_Swap = source('baryon_viction', 'UniswapV2Pair_evt_Swap'),
Factory_evt_PairCreated = source('baryon_viction', 'UniswapV2Factory_evt_PairCreated')
Pair_evt_Swap = source('baryon_viction', 'CONTRACT_PAIR_evt_Swap'),
Factory_evt_PairCreated = source('baryon_viction', 'CONTRACT_FACTORY_evt_PairCreated')
)
}}
*/

-- Return empty result set for now
SELECT
'viction' as blockchain,
'baryon' as project,
'2' as version,
CAST(NULL as timestamp) as block_month,
CAST(NULL as date) as block_date,
CAST(NULL as timestamp) as block_time,
CAST(NULL as bigint) as block_number,
CAST(NULL as double) as token_bought_amount_raw,
CAST(NULL as double) as token_sold_amount_raw,
CAST(NULL as string) as token_bought_address,
CAST(NULL as string) as token_sold_address,
CAST(NULL as string) as taker,
CAST(NULL as string) as maker,
CAST(NULL as string) as project_contract_address,
CAST(NULL as string) as tx_hash,
CAST(NULL as integer) as evt_index
WHERE 1=0
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/*
TODO: This model is pending for Swap event table
Currently only PoolCreated event is available
*/

{{
config(
schema = 'rabbitswap_viction',
schema = 'rabbitswap_xyz_viction',
alias = 'base_trades',
materialized = 'incremental',
file_format = 'delta',
Expand All @@ -10,12 +15,34 @@
)
}}

/* Uncomment when Swap event table is available
{{
uniswap_compatible_v3_trades(
blockchain = 'viction',
project = 'rabbitswap',
version = '3',
Pair_evt_Swap = source('rabbitswap_viction', 'UniswapV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('rabbitswap_viction', 'UniswapV3Factory_evt_PoolCreated')
Pair_evt_Swap = source('rabbitswap_xyz_viction', 'RabbitSwapV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('rabbitswap_xyz_viction', 'RabbitSwapV3Factory_evt_PoolCreated')
)
}}
*/

-- Return empty result set for now
SELECT
'viction' as blockchain,
'rabbitswap' as project,
'3' as version,
CAST(NULL as timestamp) as block_month,
CAST(NULL as date) as block_date,
CAST(NULL as timestamp) as block_time,
CAST(NULL as bigint) as block_number,
CAST(NULL as double) as token_bought_amount_raw,
CAST(NULL as double) as token_sold_amount_raw,
CAST(NULL as string) as token_bought_address,
CAST(NULL as string) as token_sold_address,
CAST(NULL as string) as taker,
CAST(NULL as string) as maker,
CAST(NULL as string) as project_contract_address,
CAST(NULL as string) as tx_hash,
CAST(NULL as integer) as evt_index
WHERE 1=0

This file was deleted.

20 changes: 20 additions & 0 deletions sources/_sector/dex/trades/viction/_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2

sources:
- name: baryon_viction
tables:
- name: CONTRACT_FACTORY_evt_PairCreated
# Pending for Swap event table
# - name: CONTRACT_PAIR_evt_Swap

- name: rabbitswap_xyz_viction
tables:
- name: RabbitSwapV3Factory_evt_PoolCreated
# Pending for Swap event table
# - name: RabbitSwapV3Pool_evt_Swap

# Pending for contract deployment and event tables
# - name: mori_viction
# tables:
# - name: UniswapV3Pool_evt_Swap
# - name: UniswapV3Factory_evt_PoolCreated

0 comments on commit b69918a

Please sign in to comment.