Ekubo Integration (#172)

* fix: Implement ethereum-ekubo

* fix: Remove unnecessary store

* fix: Correct balance accounting

* Adjust deltas by fee at PositionUpdated event

* Add partial Ekubo integration

* Generalize Hexable

* Native Ekubo integration

* cargo fmt & clippy

---------

Co-authored-by: kayibal <alan@datarevenue.com>
Co-authored-by: Zizou <111426680+zizou0x@users.noreply.github.com>
This commit is contained in:
die-herdplatte
2025-03-27 18:29:39 +07:00
committed by GitHub
parent 002d42d100
commit e4609bed0b
31 changed files with 6735 additions and 24 deletions

View File

@@ -1,20 +1,9 @@
use ethabi::ethereum_types::Address;
use substreams::Hex;
pub trait Hexable {
fn to_hex(&self) -> String;
}
impl Hexable for Vec<u8> {
impl<T: AsRef<[u8]>> Hexable for T {
fn to_hex(&self) -> String {
let mut str = Hex::encode(self);
str.insert_str(0, "0x");
str
}
}
impl Hexable for Address {
fn to_hex(&self) -> String {
self.as_bytes().to_vec().to_hex()
format!("0x{}", hex::encode(self))
}
}