fix(balancer_v2): skip adding zero address rate_provider entrypoints (#224)
This commit is contained in:
36
substreams/Cargo.lock
generated
36
substreams/Cargo.lock
generated
@@ -235,12 +235,12 @@ dependencies = [
|
|||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tiny-keccak",
|
"tiny-keccak",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-balancer-v2"
|
name = "ethereum-balancer-v2"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"ethabi 18.0.0",
|
"ethabi 18.0.0",
|
||||||
@@ -250,7 +250,7 @@ dependencies = [
|
|||||||
"num-bigint",
|
"num-bigint",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=51995f9)",
|
"tycho-substreams 0.2.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -271,7 +271,7 @@ dependencies = [
|
|||||||
"serde_qs",
|
"serde_qs",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -308,7 +308,7 @@ dependencies = [
|
|||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"substreams-helper 0.0.2 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"substreams-helper 0.0.2 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -348,7 +348,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -368,7 +368,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -385,7 +385,7 @@ dependencies = [
|
|||||||
"serde-sibor",
|
"serde-sibor",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -403,7 +403,7 @@ dependencies = [
|
|||||||
"serde_qs",
|
"serde_qs",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
"tycho-substreams 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1669,7 +1669,23 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tycho-substreams"
|
name = "tycho-substreams"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=51995f9#51995f9731ecf549a5ae68c281906c90efe9909a"
|
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021#52d502198e9aa964814ef5f139df0886c3eb7bb0"
|
||||||
|
dependencies = [
|
||||||
|
"ethabi 18.0.0",
|
||||||
|
"hex",
|
||||||
|
"itertools 0.12.1",
|
||||||
|
"num-bigint",
|
||||||
|
"prost 0.11.9",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"substreams",
|
||||||
|
"substreams-ethereum",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tycho-substreams"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?tag=0.4.0#cfbf6812bdc9503ff51debcf5e171cd680b4d694"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethabi 18.0.0",
|
"ethabi 18.0.0",
|
||||||
"hex",
|
"hex",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-balancer-v2"
|
name = "ethereum-balancer-v2"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -15,7 +15,7 @@ hex = "0.4.3"
|
|||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
num-bigint = "0.4.4"
|
num-bigint = "0.4.4"
|
||||||
itertools = "0.12.0"
|
itertools = "0.12.0"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "51995f9" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", tag = "0.4.0" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use tycho_substreams::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub const VAULT_ADDRESS: &[u8] = &hex!("BA12222222228d8Ba445958a75a0704d566BF2C8");
|
pub const VAULT_ADDRESS: &[u8] = &hex!("BA12222222228d8Ba445958a75a0704d566BF2C8");
|
||||||
|
pub const ZERO_ADDRESS: &[u8] = &[0u8; 20];
|
||||||
|
|
||||||
#[substreams::handlers::map]
|
#[substreams::handlers::map]
|
||||||
pub fn map_components(block: eth::v2::Block) -> Result<BlockTransactionProtocolComponents> {
|
pub fn map_components(block: eth::v2::Block) -> Result<BlockTransactionProtocolComponents> {
|
||||||
@@ -214,6 +215,11 @@ pub fn map_protocol_changes(
|
|||||||
|
|
||||||
if let Some(rate_providers) = rate_providers {
|
if let Some(rate_providers) = rate_providers {
|
||||||
for rate_provider in rate_providers {
|
for rate_provider in rate_providers {
|
||||||
|
if rate_provider == ZERO_ADDRESS {
|
||||||
|
// Skipped: is not a rate provider
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let trace_data = TraceData::Rpc(RpcTraceData {
|
let trace_data = TraceData::Rpc(RpcTraceData {
|
||||||
caller: None,
|
caller: None,
|
||||||
calldata: hex::decode("679aefce").unwrap(), // getRate()
|
calldata: hex::decode("679aefce").unwrap(), // getRate()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "ethereum_balancer_v2"
|
name: "ethereum_balancer_v2"
|
||||||
version: v0.3.1
|
version: v0.3.2
|
||||||
url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-balancer-v2"
|
url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-balancer-v2"
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
|
|||||||
Reference in New Issue
Block a user