Skip to content

Commit

Permalink
Added infusion dex on base chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason4276 committed Nov 28, 2024
1 parent a5039ee commit 497bad3
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dbt_subprojects/dex/models/trades/base/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -996,3 +996,20 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('xchange_base_base_trades_seed')

- name: infusion_base_base_trades
meta:
blockchain: base
sector: dex
project: infusion
contributors: jason
config:
tags: [ 'base', 'dex', 'trades', 'infusion' ]
description: "infusion base 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('infusion_base_base_trades_seed')
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
, ref('solidly_v3_base_base_trades')
, ref('swaap_v2_base_base_trades')
, ref('xchange_base_base_trades')
, ref('infusion_base_base_trades')
] %}

WITH base_union AS (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ config(
schema = 'infusion_base'
, alias = 'base_trades'
, materialized = 'infusion'
, 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 = 'base'
, project = 'infusion'
, version = '1'
, Pair_evt_Swap = source('infusion_base', 'Pair_evt_Swap')
, Factory_evt_PairCreated = source('infusion_base', 'PairFactory_evt_PairCreated')
)
}}
15 changes: 15 additions & 0 deletions dbt_subprojects/dex/seeds/trades/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4455,3 +4455,18 @@ seeds:
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp

- name: infusion_base_base_trades_seed
config:
column_types:
blockchain: varchar
project: varchar
version: varchar
tx_hash: varbinary
evt_index: uint256
block_number: uint256
token_bought_address: varbinary
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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
base,infusion,1,2024-11-28,0x7d88692c8f071f5cc7c08451d7f2cc493f745949cbc05e6579e73d292df47eb1,77,0x4200000000000000000000000000000000000006,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,22989322,10575964385728786,38099604

0 comments on commit 497bad3

Please sign in to comment.