Remove TransactionWrapper from SDK & Balancer.
This type is not needed anymore.
This commit is contained in:
@@ -2,5 +2,3 @@ pub mod balances;
|
|||||||
pub mod contract;
|
pub mod contract;
|
||||||
mod mock_store;
|
mod mock_store;
|
||||||
pub mod pb;
|
pub mod pb;
|
||||||
// TODO: consider removing this module, after integrating with balancer
|
|
||||||
pub mod utils;
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
use crate::pb::tycho::evm::v1::Transaction;
|
|
||||||
|
|
||||||
/// This struct purely exists to spoof the `PartialEq` trait for `Transaction` so we can use it in
|
|
||||||
/// a later groupby operation.
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct TransactionWrapper(Transaction);
|
|
||||||
|
|
||||||
impl TransactionWrapper {
|
|
||||||
pub fn new(tx: Transaction) -> Self {
|
|
||||||
Self(tx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl PartialEq for TransactionWrapper {
|
|
||||||
fn eq(&self, other: &Self) -> bool {
|
|
||||||
self.0.hash == other.0.hash
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<TransactionWrapper> for Transaction {
|
|
||||||
fn from(value: TransactionWrapper) -> Self {
|
|
||||||
value.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,17 +18,6 @@ use tycho_substreams::pb::tycho::evm::v1::{
|
|||||||
|
|
||||||
const VAULT_ADDRESS: &[u8] = &hex!("BA12222222228d8Ba445958a75a0704d566BF2C8");
|
const VAULT_ADDRESS: &[u8] = &hex!("BA12222222228d8Ba445958a75a0704d566BF2C8");
|
||||||
|
|
||||||
/// This struct purely exists to spoof the `PartialEq` trait for `Transaction` so we can use it in
|
|
||||||
/// a later groupby operation.
|
|
||||||
#[derive(Debug)]
|
|
||||||
struct TransactionWrapper(tycho::Transaction);
|
|
||||||
|
|
||||||
impl PartialEq for TransactionWrapper {
|
|
||||||
fn eq(&self, other: &Self) -> bool {
|
|
||||||
self.0.hash == other.0.hash
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[substreams::handlers::map]
|
#[substreams::handlers::map]
|
||||||
pub fn map_pools_created(block: eth::v2::Block) -> Result<BlockTransactionProtocolComponents> {
|
pub fn map_pools_created(block: eth::v2::Block) -> Result<BlockTransactionProtocolComponents> {
|
||||||
// Gather contract changes by indexing `PoolCreated` events and analysing the `Create` call
|
// Gather contract changes by indexing `PoolCreated` events and analysing the `Create` call
|
||||||
|
|||||||
Reference in New Issue
Block a user