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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user