fix: small fix and refactor after testing EkuboV2 (#188)

* fix: add `balance_owner` attribute for ekubo_v2 components

* refactor: rename `ekubo` into `ekubo-v2`

* refactor: freeze `substreams-helper` version in ekubo V2 module

* docs: improve integration test comment

* docs: add TODO to remove `balance_owner` in favor of `AccountBalances`

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This commit is contained in:
Zizou
2025-03-27 14:45:03 +01:00
committed by GitHub
parent e4609bed0b
commit 63f9c89429
31 changed files with 65 additions and 35 deletions

View File

@@ -0,0 +1,48 @@
use substreams_ethereum::pb::eth::v2::TransactionTrace;
use crate::pb::ekubo::Transaction;
#[path = "1_map_events.rs"]
mod map_events;
#[path = "2_map_components.rs"]
mod map_components;
#[path = "2_map_tick_changes.rs"]
mod map_tick_changes;
#[path = "2_store_active_ticks.rs"]
mod store_active_ticks;
#[path = "3_map_liquidity_changes.rs"]
mod map_liquidity_changes;
#[path = "3_store_pool_details.rs"]
mod store_pool_details;
#[path = "3_store_tick_liquidities.rs"]
mod store_tick_liquidities;
#[path = "4_map_balance_changes.rs"]
mod map_balance_changes;
#[path = "4_store_liquidities.rs"]
mod store_liquidities;
#[path = "5_store_balance_changes.rs"]
mod store_balance_changes;
#[path = "6_map_protocol_changes.rs"]
mod map_protocol_changes;
impl From<&TransactionTrace> for Transaction {
fn from(value: &TransactionTrace) -> Self {
Self {
hash: value.hash.clone(),
from: value.from.clone(),
to: value.to.clone(),
index: value.index.into(),
}
}
}
impl From<Transaction> for tycho_substreams::prelude::Transaction {
fn from(value: Transaction) -> Self {
Self { hash: value.hash, from: value.from, to: value.to, index: value.index }
}
}