Normalizing relative ERC20 Balances
Converting relative balance changes into absolute balance values.
1. Index relative balance changes
#[substreams::handlers::map]
pub fn map_relative_balances(
block: eth::v2::Block,
components_store: StoreGetInt64,
) -> Result<BlockBalanceDeltas, anyhow::Error> {
todo!()
}2. Aggregate balances with an additive store
#[substreams::handlers::store]
pub fn store_balances(deltas: BlockBalanceDeltas, store: StoreAddBigInt) {
tycho_substreams::balances::store_balance_changes(deltas, store);
}3. Combine absolute values with component and address
Last updated