fix(balancer): index PoolBalanceManaged balance changes

This commit is contained in:
zizou
2024-10-17 12:49:03 +02:00
parent eac73e4b8e
commit 18f4446344
4 changed files with 14 additions and 3 deletions

2
substreams/Cargo.lock generated
View File

@@ -222,7 +222,7 @@ dependencies = [
[[package]]
name = "ethereum-balancer"
version = "0.2.1"
version = "0.2.2"
dependencies = [
"anyhow",
"bytes",

View File

@@ -1,6 +1,6 @@
[package]
name = "ethereum-balancer"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
[lib]

View File

@@ -113,6 +113,17 @@ pub fn map_relative_balances(
},
]);
}
} else if let Some(ev) =
abi::vault::events::PoolBalanceManaged::match_and_decode(vault_log.log)
{
let component_id = format!("0x{}", hex::encode(ev.pool_id));
deltas.extend_from_slice(&[BalanceDelta {
ord: vault_log.ordinal(),
tx: Some(vault_log.receipt.transaction.into()),
token: ev.token.to_vec(),
delta: ev.cash_delta.to_signed_bytes_be(),
component_id: component_id.as_bytes().to_vec(),
}]);
}
deltas

View File

@@ -1,7 +1,7 @@
specVersion: v0.1.0
package:
name: "ethereum_balancer"
version: v0.2.1
version: v0.2.2
protobuf:
files: