Merge pull request #81 from propeller-heads/zz/fix-balancer-balance-bug
fix(balancer-susbtreams): fix a bug with pool id in case of `Swap` event
This commit is contained in:
2
substreams/Cargo.lock
generated
2
substreams/Cargo.lock
generated
@@ -210,7 +210,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-balancer"
|
name = "ethereum-balancer"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ pub mod balances;
|
|||||||
pub mod contract;
|
pub mod contract;
|
||||||
mod mock_store;
|
mod mock_store;
|
||||||
pub mod models;
|
pub mod models;
|
||||||
|
#[allow(clippy::too_long_first_doc_paragraph)]
|
||||||
mod pb;
|
mod pb;
|
||||||
|
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-balancer"
|
name = "ethereum-balancer"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|||||||
@@ -90,10 +90,10 @@ pub fn map_relative_balances(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if let Some(ev) = abi::vault::events::Swap::match_and_decode(vault_log.log) {
|
} else if let Some(ev) = abi::vault::events::Swap::match_and_decode(vault_log.log) {
|
||||||
let component_id = format!("0x{}", hex::encode(&ev.pool_id[..20]));
|
let component_id = format!("0x{}", hex::encode(ev.pool_id));
|
||||||
|
|
||||||
if store
|
if store
|
||||||
.get_last(format!("pool:{}", component_id))
|
.get_last(format!("pool:{}", &component_id[..42]))
|
||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
deltas.extend_from_slice(&[
|
deltas.extend_from_slice(&[
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "ethereum_balancer"
|
name: "ethereum_balancer"
|
||||||
version: v0.2.0
|
version: v0.2.1
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
|
|||||||
Reference in New Issue
Block a user