Skip to content
Closed
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
1 change: 1 addition & 0 deletions dbt_subprojects/dex/models/dex_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ FROM (VALUES
, ('solidlizard', 'SolidLizard', 'Direct', 'solidlizardfi')
, ('pharaoh', 'Pharaoh', 'Direct', 'PharaohExchange')
, ('ramses', 'Ramses', 'Direct', 'ramses')
, ('ramsesxyz', 'Ramses', 'Direct', 'ramses')
, ('scale', 'Scale', 'Direct', 'scale')
, ('baseswap', 'Baseswap', 'Direct', 'Baseswap')
, ('oasisswap', 'OasisSwap', 'Direct', 'OasisSwapDEX')
Expand Down
42 changes: 42 additions & 0 deletions dbt_subprojects/dex/models/trades/hyperevm/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,45 @@ models:
seed_file: ref('balancer_hyperevm_base_trades_seed')
filter:
version: 3

- name: ramsesxyz_legacy_hyperevm_base_trades
meta:
blockchain: hyperevm
sector: dex
project: ramsesxyz
contributors: discochuck
config:
tags: [ 'hyperevm', 'dex', 'trades', 'ramsesxyz', 'uniswap', 'v2' ]
description: "Ramses legacy (uni v2) HyperEVM base trades"
data_tests:
- dbt_utils.unique_combination_of_columns:
arguments:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
arguments:
seed_file: ref('ramsesxyz_hyperevm_base_trades_seed')
filter:
version: legacy

- name: ramsesxyz_cl_hyperevm_base_trades
meta:
blockchain: hyperevm
sector: dex
project: ramsesxyz
contributors: discochuck
config:
tags: [ 'hyperevm', 'dex', 'trades', 'ramsesxyz', 'uniswap', 'v3' ]
description: "Ramses concentrated liquidity HyperEVM base trades"
data_tests:
- dbt_utils.unique_combination_of_columns:
arguments:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
arguments:
seed_file: ref('ramsesxyz_hyperevm_base_trades_seed')
filter:
version: cl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
, ref('hyperswap_v3_hyperevm_base_trades')
, ref('hybra_v3_hyperevm_base_trades')
, ref('balancer_v3_hyperevm_base_trades')
, ref('ramsesxyz_legacy_hyperevm_base_trades')
, ref('ramsesxyz_cl_hyperevm_base_trades')
] %}
{{ dex_base_trades_macro(
blockchain = 'hyperevm',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{
config(
schema = 'ramsesxyz_cl_hyperevm',
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')]
)
}}

WITH base_trades AS (
{{
uniswap_compatible_v3_trades(
blockchain = 'hyperevm',
project = 'ramsesxyz',
version = 'cl',
Pair_evt_Swap = source('ramsesxyz_hyperevm', 'ramsesv3pool_evt_swap'),
Factory_evt_PoolCreated = source('ramsesxyz_hyperevm', 'ramsesv3factory_evt_poolcreated')
)
}}
),

deduplicated_trades AS (
SELECT *,
ROW_NUMBER() OVER (PARTITION BY tx_hash, evt_index ORDER BY block_time) as rn
FROM base_trades
)

SELECT
blockchain,
project,
version,
block_month,
block_date,
block_time,
block_number,
token_bought_amount_raw,
token_sold_amount_raw,
token_bought_address,
token_sold_address,
taker,
maker,
project_contract_address,
tx_hash,
evt_index
FROM deduplicated_trades
WHERE rn = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

sources:
- name: ramsesxyz_hyperevm
tables:
- name: pair_evt_swap
- name: pairfactory_evt_paircreated
- name: ramsesv3pool_evt_swap
- name: ramsesv3factory_evt_poolcreated
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{
config(
schema = 'ramsesxyz_legacy_hyperevm',
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')]
)
}}

WITH base_trades AS (
{{
uniswap_compatible_v2_trades(
blockchain = 'hyperevm',
project = 'ramsesxyz',
version = 'legacy',
Pair_evt_Swap = source('ramsesxyz_hyperevm', 'pair_evt_swap'),
Factory_evt_PairCreated = source('ramsesxyz_hyperevm', 'pairfactory_evt_paircreated')
)
}}
),

deduplicated_trades AS (
SELECT *,
ROW_NUMBER() OVER (PARTITION BY tx_hash, evt_index ORDER BY block_time) as rn
FROM base_trades
)

SELECT
blockchain,
project,
version,
block_month,
block_date,
block_time,
block_number,
token_bought_amount_raw,
token_sold_amount_raw,
token_bought_address,
token_sold_address,
taker,
maker,
project_contract_address,
tx_hash,
evt_index
FROM deduplicated_trades
WHERE rn = 1
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 @@ -5869,6 +5869,21 @@ seeds:
token_sold_amount_raw: uint256
block_date: timestamp

- name: ramsesxyz_hyperevm_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

- name: izumi_finance_plume_base_trades_seed
config:
column_types:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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
hyperevm,ramsesxyz,legacy,2026-06-10,0x15655fb220fbb3c2eb192cf0d81772357a19be6cbaa8a1e8887fe683d4fb129b,33,0x9fdbda0a5e284c32744d2f17ee5c74b284993463,0x5555555555555555555555555555555555555555,37412533,138,1430907193393152
hyperevm,ramsesxyz,cl,2026-06-11,0xe860f4583f0ae2844a9875f38c68c2e8e0101b9b7c1deee12c631f55322fb384,37,0xb88339cb7199b77e23db6e890353e22632ba630f,0xbe6727b535545c67d5caa73dea54865b92cf7907,37541285,92905750,56503139916979162
2 changes: 1 addition & 1 deletion sources/_sector/dex/trades/hyperevm/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ sources:
- name: hybra_hyperevm
tables:
- name: uniswapv3pool_evt_swap
- name: uniswapv3factory_evt_poolcreated
- name: uniswapv3factory_evt_poolcreated
Loading