From ef985f5ff43bbaa19136a5afdff4c1d5bfcb4b56 Mon Sep 17 00:00:00 2001 From: Louise Poole Date: Fri, 25 Oct 2024 15:32:26 +0200 Subject: [PATCH] fix(usv2): correctly encode the component_id in balances --- .../ethereum-uniswap-v2/src/modules/1_map_pool_created.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/substreams/ethereum-uniswap-v2/src/modules/1_map_pool_created.rs b/substreams/ethereum-uniswap-v2/src/modules/1_map_pool_created.rs index adc0703..4b783f8 100644 --- a/substreams/ethereum-uniswap-v2/src/modules/1_map_pool_created.rs +++ b/substreams/ethereum-uniswap-v2/src/modules/1_map_pool_created.rs @@ -4,7 +4,6 @@ use ethabi::ethereum_types::Address; use serde::Deserialize; use substreams::prelude::BigInt; use substreams_ethereum::pb::eth::v2::{self as eth}; - use substreams_helper::{event_handler::EventHandler, hex::Hexable}; use crate::abi::factory::events::PairCreated; @@ -86,12 +85,12 @@ fn get_pools(block: ð::Block, new_pools: &mut Vec, params BalanceChange { token: event.token0, balance: BigInt::from(0).to_signed_bytes_be(), - component_id: event.pair.clone(), + component_id: event.pair.to_hex().as_bytes().to_vec(), }, BalanceChange { token: event.token1, balance: BigInt::from(0).to_signed_bytes_be(), - component_id: event.pair, + component_id: event.pair.to_hex().as_bytes().to_vec(), }, ], })