fix: update tycho-substreams version in all vm packages (#206)
This is needed after https://github.com/propeller-heads/tycho-protocol-sdk/pull/201 Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This commit is contained in:
94
substreams/Cargo.lock
generated
94
substreams/Cargo.lock
generated
@@ -220,9 +220,27 @@ dependencies = [
|
|||||||
"tiny-keccak",
|
"tiny-keccak",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ethereum-ambient"
|
||||||
|
version = "0.6.1"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"bytes",
|
||||||
|
"ethabi 18.0.0",
|
||||||
|
"hex",
|
||||||
|
"hex-literal 0.4.1",
|
||||||
|
"num-bigint",
|
||||||
|
"prost 0.11.9",
|
||||||
|
"quote",
|
||||||
|
"substreams",
|
||||||
|
"substreams-ethereum",
|
||||||
|
"tiny-keccak",
|
||||||
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-balancer-v2"
|
name = "ethereum-balancer-v2"
|
||||||
version = "0.2.4"
|
version = "0.2.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -236,12 +254,12 @@ dependencies = [
|
|||||||
"prost-types 0.12.6",
|
"prost-types 0.12.6",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-curve"
|
name = "ethereum-curve"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -257,7 +275,7 @@ dependencies = [
|
|||||||
"serde_qs",
|
"serde_qs",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -300,6 +318,26 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethereum-sfrax"
|
name = "ethereum-sfrax"
|
||||||
|
version = "0.1.2"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"ethabi 17.2.0",
|
||||||
|
"getrandom",
|
||||||
|
"hex",
|
||||||
|
"hex-literal 0.4.1",
|
||||||
|
"itertools 0.12.1",
|
||||||
|
"num-bigint",
|
||||||
|
"num-traits",
|
||||||
|
"prost 0.11.9",
|
||||||
|
"prost-types 0.11.9",
|
||||||
|
"regex",
|
||||||
|
"substreams",
|
||||||
|
"substreams-ethereum",
|
||||||
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ethereum-sfraxeth"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -315,27 +353,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ethereum-sfraxeth"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"ethabi 17.2.0",
|
|
||||||
"getrandom",
|
|
||||||
"hex",
|
|
||||||
"hex-literal 0.4.1",
|
|
||||||
"itertools 0.12.1",
|
|
||||||
"num-bigint",
|
|
||||||
"num-traits",
|
|
||||||
"prost 0.11.9",
|
|
||||||
"prost-types 0.11.9",
|
|
||||||
"regex",
|
|
||||||
"substreams",
|
|
||||||
"substreams-ethereum",
|
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -352,7 +370,7 @@ dependencies = [
|
|||||||
"serde-sibor",
|
"serde-sibor",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=3c08359)",
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -370,7 +388,7 @@ dependencies = [
|
|||||||
"serde_qs",
|
"serde_qs",
|
||||||
"substreams",
|
"substreams",
|
||||||
"substreams-ethereum",
|
"substreams-ethereum",
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=3c08359)",
|
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1375,24 +1393,6 @@ dependencies = [
|
|||||||
"syn 1.0.109",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "substreams-ethereum-ambient"
|
|
||||||
version = "0.5.2"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"bytes",
|
|
||||||
"ethabi 18.0.0",
|
|
||||||
"hex",
|
|
||||||
"hex-literal 0.4.1",
|
|
||||||
"num-bigint",
|
|
||||||
"prost 0.11.9",
|
|
||||||
"quote",
|
|
||||||
"substreams",
|
|
||||||
"substreams-ethereum",
|
|
||||||
"tiny-keccak",
|
|
||||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=f90c33b)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "substreams-ethereum-core"
|
name = "substreams-ethereum-core"
|
||||||
version = "0.9.13"
|
version = "0.9.13"
|
||||||
@@ -1646,8 +1646,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tycho-substreams"
|
name = "tycho-substreams"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=f90c33b#f90c33bcc229a1bca1fe86ee6fc4024cbdc25aeb"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethabi 18.0.0",
|
"ethabi 18.0.0",
|
||||||
"hex",
|
"hex",
|
||||||
@@ -1663,6 +1662,7 @@ 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=52d5021#52d502198e9aa964814ef5f139df0886c3eb7bb0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethabi 18.0.0",
|
"ethabi 18.0.0",
|
||||||
"hex",
|
"hex",
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "substreams-ethereum-ambient"
|
name = "ethereum-ambient"
|
||||||
version = "0.5.2"
|
version = "0.6.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "substreams_ethereum_ambient"
|
name = "ethereum_ambient"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "f90c33b" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
substreams = "0.5.22"
|
substreams = "0.5.22"
|
||||||
substreams-ethereum = "0.9.9"
|
substreams-ethereum = "0.9.9"
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ impl From<InterimContractChange> for ContractChange {
|
|||||||
.map(|(slot, value)| ContractSlot { slot, value: value.new_value })
|
.map(|(slot, value)| ContractSlot { slot, value: value.new_value })
|
||||||
.collect(),
|
.collect(),
|
||||||
change: value.change.into(),
|
change: value.change.into(),
|
||||||
|
token_balances: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "substreams_ethereum_ambient"
|
name: "ethereum_ambient"
|
||||||
version: v0.6.0
|
version: v0.6.1
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
@@ -14,7 +14,7 @@ protobuf:
|
|||||||
binaries:
|
binaries:
|
||||||
default:
|
default:
|
||||||
type: wasm/rust-v1
|
type: wasm/rust-v1
|
||||||
file: ../target/wasm32-unknown-unknown/release/substreams_ethereum_ambient.wasm
|
file: ../target/wasm32-unknown-unknown/release/ethereum_ambient.wasm
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
- name: map_pool_changes
|
- name: map_pool_changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-balancer-v2"
|
name = "ethereum-balancer-v2"
|
||||||
version = "0.2.4"
|
version = "0.2.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -19,7 +19,7 @@ bytes = "1.5.0"
|
|||||||
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 = "b8aeaa3" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
let contract_name = file_name.split('.').next().unwrap();
|
let contract_name = file_name.split('.').next().unwrap();
|
||||||
|
|
||||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
let input_path = format!("{abi_folder}/{file_name}");
|
||||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
let output_path = format!("{output_folder}/{contract_name}.rs");
|
||||||
|
|
||||||
mod_rs_content.push_str(&format!("pub mod {};\n", contract_name));
|
mod_rs_content.push_str(&format!("pub mod {contract_name};\n"));
|
||||||
|
|
||||||
if std::path::Path::new(&output_path).exists() {
|
if std::path::Path::new(&output_path).exists() {
|
||||||
continue;
|
continue;
|
||||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
|||||||
.write_to_file(&output_path)?;
|
.write_to_file(&output_path)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mod_rs_path = format!("{}/mod.rs", output_folder);
|
let mod_rs_path = format!("{output_folder}/mod.rs");
|
||||||
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
||||||
|
|
||||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||||
|
|||||||
@@ -60,24 +60,21 @@ pub fn address_map(
|
|||||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&create_call.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
("pool_type", "WeightedPoolFactoryV1".as_bytes()),
|
||||||
.with_tokens(&create_call.tokens)
|
("normalized_weights", &json_serialize_bigint_list(&create_call.weights)),
|
||||||
.with_attributes(&[
|
(
|
||||||
("pool_type", "WeightedPoolFactoryV1".as_bytes()),
|
"fee",
|
||||||
("normalized_weights", &json_serialize_bigint_list(&create_call.weights)),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
])
|
||||||
),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
("manual_updates", &[1u8]),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("cC508a455F5b0073973107Db6a878DdBDab957bC") => {
|
hex!("cC508a455F5b0073973107Db6a878DdBDab957bC") => {
|
||||||
@@ -88,28 +85,28 @@ pub fn address_map(
|
|||||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&create_call.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
("pool_type", "WeightedPoolFactoryV2".as_bytes()),
|
||||||
.with_tokens(&create_call.tokens)
|
(
|
||||||
.with_attributes(&[
|
"normalized_weights",
|
||||||
("pool_type", "WeightedPoolFactoryV2".as_bytes()),
|
&json_serialize_bigint_list(&create_call.normalized_weights),
|
||||||
(
|
),
|
||||||
"normalized_weights",
|
(
|
||||||
&json_serialize_bigint_list(&create_call.normalized_weights),
|
"rate_providers",
|
||||||
),
|
&json_serialize_address_list(&create_call.rate_providers),
|
||||||
("rate_providers", &json_serialize_address_list(&create_call.rate_providers)),
|
),
|
||||||
(
|
(
|
||||||
"fee",
|
"fee",
|
||||||
&create_call
|
&create_call
|
||||||
.swap_fee_percentage
|
.swap_fee_percentage
|
||||||
.to_signed_bytes_be(),
|
.to_signed_bytes_be(),
|
||||||
),
|
),
|
||||||
("manual_updates", &[1u8]),
|
("manual_updates", &[1u8]),
|
||||||
])
|
])
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("5Dd94Da3644DDD055fcf6B3E1aa310Bb7801EB8b") => {
|
hex!("5Dd94Da3644DDD055fcf6B3E1aa310Bb7801EB8b") => {
|
||||||
@@ -120,28 +117,28 @@ pub fn address_map(
|
|||||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&create_call.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
("pool_type", "WeightedPoolFactoryV3".as_bytes()),
|
||||||
.with_tokens(&create_call.tokens)
|
(
|
||||||
.with_attributes(&[
|
"normalized_weights",
|
||||||
("pool_type", "WeightedPoolFactoryV3".as_bytes()),
|
&json_serialize_bigint_list(&create_call.normalized_weights),
|
||||||
(
|
),
|
||||||
"normalized_weights",
|
(
|
||||||
&json_serialize_bigint_list(&create_call.normalized_weights),
|
"rate_providers",
|
||||||
),
|
&json_serialize_address_list(&create_call.rate_providers),
|
||||||
("rate_providers", &json_serialize_address_list(&create_call.rate_providers)),
|
),
|
||||||
(
|
(
|
||||||
"fee",
|
"fee",
|
||||||
&create_call
|
&create_call
|
||||||
.swap_fee_percentage
|
.swap_fee_percentage
|
||||||
.to_signed_bytes_be(),
|
.to_signed_bytes_be(),
|
||||||
),
|
),
|
||||||
("manual_updates", &[1u8]),
|
("manual_updates", &[1u8]),
|
||||||
])
|
])
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("897888115Ada5773E02aA29F775430BFB5F34c51") => {
|
hex!("897888115Ada5773E02aA29F775430BFB5F34c51") => {
|
||||||
@@ -152,28 +149,28 @@ pub fn address_map(
|
|||||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&create_call.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
("pool_type", "WeightedPoolFactoryV4".as_bytes()),
|
||||||
.with_tokens(&create_call.tokens)
|
(
|
||||||
.with_attributes(&[
|
"normalized_weights",
|
||||||
("pool_type", "WeightedPoolFactoryV4".as_bytes()),
|
&json_serialize_bigint_list(&create_call.normalized_weights),
|
||||||
(
|
),
|
||||||
"normalized_weights",
|
(
|
||||||
&json_serialize_bigint_list(&create_call.normalized_weights),
|
"rate_providers",
|
||||||
),
|
&json_serialize_address_list(&create_call.rate_providers),
|
||||||
("rate_providers", &json_serialize_address_list(&create_call.rate_providers)),
|
),
|
||||||
(
|
(
|
||||||
"fee",
|
"fee",
|
||||||
&create_call
|
&create_call
|
||||||
.swap_fee_percentage
|
.swap_fee_percentage
|
||||||
.to_signed_bytes_be(),
|
.to_signed_bytes_be(),
|
||||||
),
|
),
|
||||||
("manual_updates", &[1u8]),
|
("manual_updates", &[1u8]),
|
||||||
])
|
])
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("DB8d758BCb971e482B2C45f7F8a7740283A1bd3A") => {
|
hex!("DB8d758BCb971e482B2C45f7F8a7740283A1bd3A") => {
|
||||||
@@ -185,25 +182,25 @@ pub fn address_map(
|
|||||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&tokens_registered.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
("pool_type", "ComposableStablePoolFactory".as_bytes()),
|
||||||
.with_tokens(&tokens_registered.tokens)
|
("bpt", &pool_created.pool),
|
||||||
.with_attributes(&[
|
(
|
||||||
("pool_type", "ComposableStablePoolFactory".as_bytes()),
|
"fee",
|
||||||
("bpt", &pool_created.pool),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
(
|
||||||
.to_signed_bytes_be(),
|
"rate_providers",
|
||||||
),
|
&json_serialize_address_list(&create_call.rate_providers),
|
||||||
("rate_providers", &json_serialize_address_list(&create_call.rate_providers)),
|
),
|
||||||
("manual_updates", &[1u8]),
|
("manual_updates", &[1u8]),
|
||||||
])
|
])
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("813EE7a840CE909E7Fea2117A44a90b8063bd4fd") => {
|
hex!("813EE7a840CE909E7Fea2117A44a90b8063bd4fd") => {
|
||||||
@@ -215,32 +212,29 @@ pub fn address_map(
|
|||||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&tokens_registered.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
("pool_type", "ERC4626LinearPoolFactory".as_bytes()),
|
||||||
.with_tokens(&tokens_registered.tokens)
|
(
|
||||||
.with_attributes(&[
|
"upper_target",
|
||||||
("pool_type", "ERC4626LinearPoolFactory".as_bytes()),
|
&create_call
|
||||||
(
|
.upper_target
|
||||||
"upper_target",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.upper_target
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
("bpt", &pool_created.pool),
|
||||||
),
|
("main_token", &create_call.main_token),
|
||||||
("manual_updates", &[1u8]),
|
("wrapped_token", &create_call.wrapped_token),
|
||||||
("bpt", &pool_created.pool),
|
(
|
||||||
("main_token", &create_call.main_token),
|
"fee",
|
||||||
("wrapped_token", &create_call.wrapped_token),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
])
|
||||||
.to_signed_bytes_be(),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("5F43FBa61f63Fa6bFF101a0A0458cEA917f6B347") => {
|
hex!("5F43FBa61f63Fa6bFF101a0A0458cEA917f6B347") => {
|
||||||
@@ -252,32 +246,29 @@ pub fn address_map(
|
|||||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&tokens_registered.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
("pool_type", "EulerLinearPoolFactory".as_bytes()),
|
||||||
.with_tokens(&tokens_registered.tokens)
|
(
|
||||||
.with_attributes(&[
|
"upper_target",
|
||||||
("pool_type", "EulerLinearPoolFactory".as_bytes()),
|
&create_call
|
||||||
(
|
.upper_target
|
||||||
"upper_target",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.upper_target
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
("bpt", &pool_created.pool),
|
||||||
),
|
("main_token", &create_call.main_token),
|
||||||
("manual_updates", &[1u8]),
|
("wrapped_token", &create_call.wrapped_token),
|
||||||
("bpt", &pool_created.pool),
|
(
|
||||||
("main_token", &create_call.main_token),
|
"fee",
|
||||||
("wrapped_token", &create_call.wrapped_token),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
])
|
||||||
.to_signed_bytes_be(),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// ❌ Reading the deployed factory for Gearbox showcases that it's currently disabled
|
// ❌ Reading the deployed factory for Gearbox showcases that it's currently disabled
|
||||||
@@ -337,32 +328,29 @@ pub fn address_map(
|
|||||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&tokens_registered.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
("pool_type", "SiloLinearPoolFactory".as_bytes()),
|
||||||
.with_tokens(&tokens_registered.tokens)
|
(
|
||||||
.with_attributes(&[
|
"upper_target",
|
||||||
("pool_type", "SiloLinearPoolFactory".as_bytes()),
|
&create_call
|
||||||
(
|
.upper_target
|
||||||
"upper_target",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.upper_target
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
("bpt", &pool_created.pool),
|
||||||
),
|
("main_token", &create_call.main_token),
|
||||||
("manual_updates", &[1u8]),
|
("wrapped_token", &create_call.wrapped_token),
|
||||||
("bpt", &pool_created.pool),
|
(
|
||||||
("main_token", &create_call.main_token),
|
"fee",
|
||||||
("wrapped_token", &create_call.wrapped_token),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
])
|
||||||
.to_signed_bytes_be(),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
hex!("5F5222Ffa40F2AEd6380D022184D6ea67C776eE0") => {
|
hex!("5F5222Ffa40F2AEd6380D022184D6ea67C776eE0") => {
|
||||||
@@ -374,32 +362,29 @@ pub fn address_map(
|
|||||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&tokens_registered.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
("pool_type", "YearnLinearPoolFactory".as_bytes()),
|
||||||
.with_tokens(&tokens_registered.tokens)
|
(
|
||||||
.with_attributes(&[
|
"upper_target",
|
||||||
("pool_type", "YearnLinearPoolFactory".as_bytes()),
|
&create_call
|
||||||
(
|
.upper_target
|
||||||
"upper_target",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.upper_target
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
("bpt", &pool_created.pool),
|
||||||
),
|
("main_token", &create_call.main_token),
|
||||||
("manual_updates", &[1u8]),
|
("wrapped_token", &create_call.wrapped_token),
|
||||||
("bpt", &pool_created.pool),
|
(
|
||||||
("main_token", &create_call.main_token),
|
"fee",
|
||||||
("wrapped_token", &create_call.wrapped_token),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
])
|
||||||
.to_signed_bytes_be(),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// The `WeightedPool2TokenFactory` is a deprecated contract, but we've included
|
// The `WeightedPool2TokenFactory` is a deprecated contract, but we've included
|
||||||
@@ -412,24 +397,21 @@ pub fn address_map(
|
|||||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::new(
|
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||||
&(tx.into()),
|
.with_tokens(&create_call.tokens)
|
||||||
)
|
.with_attributes(&[
|
||||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
("pool_type", "WeightedPool2TokensFactory".as_bytes()),
|
||||||
.with_tokens(&create_call.tokens)
|
("weights", &json_serialize_bigint_list(&create_call.weights)),
|
||||||
.with_attributes(&[
|
(
|
||||||
("pool_type", "WeightedPool2TokensFactory".as_bytes()),
|
"fee",
|
||||||
("weights", &json_serialize_bigint_list(&create_call.weights)),
|
&create_call
|
||||||
(
|
.swap_fee_percentage
|
||||||
"fee",
|
.to_signed_bytes_be(),
|
||||||
&create_call
|
),
|
||||||
.swap_fee_percentage
|
("manual_updates", &[1u8]),
|
||||||
.to_signed_bytes_be(),
|
])
|
||||||
),
|
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||||
("manual_updates", &[1u8]),
|
|
||||||
])
|
|
||||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "ethereum_balancer_v2"
|
name: "ethereum_balancer_v2"
|
||||||
version: v0.2.4
|
version: v0.2.5
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-curve"
|
name = "ethereum-curve"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -18,7 +18,7 @@ hex = "0.4.3"
|
|||||||
bytes = "1.5.0"
|
bytes = "1.5.0"
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
num-bigint = "0.4.4"
|
num-bigint = "0.4.4"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "b8aeaa3" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_qs = "0.13.0"
|
serde_qs = "0.13.0"
|
||||||
itertools = "0.13.0"
|
itertools = "0.13.0"
|
||||||
|
|||||||
@@ -100,12 +100,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: hex::encode(component_id),
|
id: hex::encode(component_id),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: tokens.clone(),
|
tokens: tokens.clone(),
|
||||||
contracts: vec![
|
contracts: vec![
|
||||||
component_id.into(),
|
component_id.into(),
|
||||||
@@ -218,12 +212,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: hex::encode(component_id),
|
id: hex::encode(component_id),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: tokens.clone(),
|
tokens: tokens.clone(),
|
||||||
contracts: vec![component_id.into()],
|
contracts: vec![component_id.into()],
|
||||||
static_att: vec![
|
static_att: vec![
|
||||||
@@ -465,12 +453,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: hex::encode(component_id),
|
id: hex::encode(component_id),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: pool_added.coins.clone(),
|
tokens: pool_added.coins.clone(),
|
||||||
contracts: vec![component_id.into(), CRYPTO_SWAP_NG_FACTORY.into()],
|
contracts: vec![component_id.into(), CRYPTO_SWAP_NG_FACTORY.into()],
|
||||||
static_att: vec![
|
static_att: vec![
|
||||||
@@ -538,12 +520,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: hex::encode(component_id),
|
id: hex::encode(component_id),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: vec![pool_added.coin.clone(), lp_token.clone()],
|
tokens: vec![pool_added.coin.clone(), lp_token.clone()],
|
||||||
contracts: vec![
|
contracts: vec![
|
||||||
component_id.into(),
|
component_id.into(),
|
||||||
@@ -637,12 +613,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: tokens.clone(),
|
tokens: tokens.clone(),
|
||||||
contracts: vec![pool_added.pool, TRICRYPTO_FACTORY.into()],
|
contracts: vec![pool_added.pool, TRICRYPTO_FACTORY.into()],
|
||||||
static_att: vec![
|
static_att: vec![
|
||||||
@@ -758,12 +728,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: hex::encode(component_id),
|
id: hex::encode(component_id),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: tokens.clone(),
|
tokens: tokens.clone(),
|
||||||
contracts: vec![component_id.into()],
|
contracts: vec![component_id.into()],
|
||||||
static_att: vec![
|
static_att: vec![
|
||||||
@@ -903,12 +867,6 @@ pub fn address_map(
|
|||||||
Some((
|
Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: pool_added.coins.clone().into(),
|
tokens: pool_added.coins.clone().into(),
|
||||||
contracts: vec![pool_added.pool, TWOCRYPTO_FACTORY.into()],
|
contracts: vec![pool_added.pool, TWOCRYPTO_FACTORY.into()],
|
||||||
static_att: vec![
|
static_att: vec![
|
||||||
|
|||||||
@@ -48,12 +48,6 @@ fn create_component(
|
|||||||
Ok(Some((
|
Ok(Some((
|
||||||
ProtocolComponent {
|
ProtocolComponent {
|
||||||
id: pool.address.clone(),
|
id: pool.address.clone(),
|
||||||
tx: Some(Transaction {
|
|
||||||
to: tx.to.clone(),
|
|
||||||
from: tx.from.clone(),
|
|
||||||
hash: tx.hash.clone(),
|
|
||||||
index: tx.index.into(),
|
|
||||||
}),
|
|
||||||
tokens: pool
|
tokens: pool
|
||||||
.tokens
|
.tokens
|
||||||
.clone()
|
.clone()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "substreams_curve"
|
name: "substreams_curve"
|
||||||
version: v0.3.2
|
version: v0.3.3
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-sfrax"
|
name = "ethereum-sfrax"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -17,7 +17,7 @@ prost-types = "0.11"
|
|||||||
substreams = "0.5.22"
|
substreams = "0.5.22"
|
||||||
substreams-ethereum = "0.9.9"
|
substreams-ethereum = "0.9.9"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "b8aeaa3" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
itertools = "0.12.0"
|
itertools = "0.12.0"
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn map_components(
|
|||||||
// a log.address = vault_address is the deployment tx
|
// a log.address = vault_address is the deployment tx
|
||||||
if is_deployment_tx(tx, &vault_address) {
|
if is_deployment_tx(tx, &vault_address) {
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::at_contract(&vault_address, &tx.into())
|
ProtocolComponent::at_contract(&vault_address)
|
||||||
.with_tokens(&[
|
.with_tokens(&[
|
||||||
locked_asset.as_slice(),
|
locked_asset.as_slice(),
|
||||||
vault_address.as_slice(),
|
vault_address.as_slice(),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "ethereum_sfrax"
|
name: "ethereum_sfrax"
|
||||||
version: v0.1.0
|
version: v0.1.2
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethereum-sfraxeth"
|
name = "ethereum-sfraxeth"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -17,7 +17,7 @@ prost-types = "0.11"
|
|||||||
substreams = "0.5.22"
|
substreams = "0.5.22"
|
||||||
substreams-ethereum = "0.9.9"
|
substreams-ethereum = "0.9.9"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "b8aeaa3" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
itertools = "0.12.0"
|
itertools = "0.12.0"
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ pub fn map_components(
|
|||||||
// a log.address = vault_address is the deployment tx
|
// a log.address = vault_address is the deployment tx
|
||||||
if is_deployment_tx(tx, &vault_address) {
|
if is_deployment_tx(tx, &vault_address) {
|
||||||
Some(
|
Some(
|
||||||
ProtocolComponent::at_contract(&vault_address, &tx.into())
|
ProtocolComponent::at_contract(&vault_address)
|
||||||
.with_tokens(&[
|
.with_tokens(&[
|
||||||
locked_asset.as_slice(),
|
locked_asset.as_slice(),
|
||||||
vault_address.as_slice(),
|
vault_address.as_slice(),
|
||||||
@@ -120,7 +120,7 @@ pub fn store_reward_cycles(block_reward_cycles: BlockRewardCycles, store: StoreS
|
|||||||
let address_hex = format!("0x{}", hex::encode(&reward_cycle.vault_address));
|
let address_hex = format!("0x{}", hex::encode(&reward_cycle.vault_address));
|
||||||
store.set(
|
store.set(
|
||||||
reward_cycle.ord,
|
reward_cycle.ord,
|
||||||
format!("reward_cycle:{}", address_hex),
|
format!("reward_cycle:{address_hex}"),
|
||||||
&reward_cycle.next_reward_amount,
|
&reward_cycle.next_reward_amount,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -144,7 +144,7 @@ pub fn map_relative_balances(
|
|||||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||||
|
|
||||||
if store
|
if store
|
||||||
.get_last(format!("pool:{}", address_hex))
|
.get_last(format!("pool:{address_hex}"))
|
||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
substreams::log::info!(
|
substreams::log::info!(
|
||||||
@@ -177,7 +177,7 @@ pub fn map_relative_balances(
|
|||||||
let address_bytes_be = vault_log.address();
|
let address_bytes_be = vault_log.address();
|
||||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||||
if store
|
if store
|
||||||
.get_last(format!("pool:{}", address_hex))
|
.get_last(format!("pool:{address_hex}"))
|
||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
deltas.extend_from_slice(&[
|
deltas.extend_from_slice(&[
|
||||||
@@ -206,7 +206,7 @@ pub fn map_relative_balances(
|
|||||||
let address_bytes_be = vault_log.address();
|
let address_bytes_be = vault_log.address();
|
||||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||||
if store
|
if store
|
||||||
.get_last(format!("pool:{}", address_hex))
|
.get_last(format!("pool:{address_hex}"))
|
||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
// When the NextRewardsCycle event is emitted:
|
// When the NextRewardsCycle event is emitted:
|
||||||
@@ -221,7 +221,7 @@ pub fn map_relative_balances(
|
|||||||
if let Some(last_reward_amount) = reward_store
|
if let Some(last_reward_amount) = reward_store
|
||||||
.deltas
|
.deltas
|
||||||
.iter()
|
.iter()
|
||||||
.find(|el| el.key == format!("reward_cycle:{}", address_hex))
|
.find(|el| el.key == format!("reward_cycle:{address_hex}"))
|
||||||
.map(|el| el.old_value.clone())
|
.map(|el| el.old_value.clone())
|
||||||
{
|
{
|
||||||
substreams::log::info!(
|
substreams::log::info!(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
specVersion: v0.1.0
|
specVersion: v0.1.0
|
||||||
package:
|
package:
|
||||||
name: "ethereum_sfraxeth"
|
name: "ethereum_sfraxeth"
|
||||||
version: v0.1.0
|
version: v0.1.1
|
||||||
|
|
||||||
protobuf:
|
protobuf:
|
||||||
files:
|
files:
|
||||||
@@ -88,4 +88,4 @@ modules:
|
|||||||
type: proto:tycho.evm.v1.BlockChanges
|
type: proto:tycho.evm.v1.BlockChanges
|
||||||
|
|
||||||
params:
|
params:
|
||||||
map_components: "ac3E018457B222d93114458476f3E3416Abbe38F"
|
map_components: "ac3E018457B222d93114458476f3E3416Abbe38F"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
|||||||
substreams = "0.5.22"
|
substreams = "0.5.22"
|
||||||
substreams-ethereum = "0.9.9"
|
substreams-ethereum = "0.9.9"
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "3c08359" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
anyhow = "1.0.95"
|
anyhow = "1.0.95"
|
||||||
ethabi = "18.0.0"
|
ethabi = "18.0.0"
|
||||||
num-bigint = "0.4.6"
|
num-bigint = "0.4.6"
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
let contract_name = file_name.split('.').next().unwrap();
|
let contract_name = file_name.split('.').next().unwrap();
|
||||||
|
|
||||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
let input_path = format!("{abi_folder}/{file_name}");
|
||||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
let output_path = format!("{output_folder}/{contract_name}.rs");
|
||||||
|
|
||||||
mod_rs_content.push_str(&format!("pub mod {};\n", contract_name));
|
mod_rs_content.push_str(&format!("pub mod {contract_name};\n"));
|
||||||
|
|
||||||
if std::path::Path::new(&output_path).exists() {
|
if std::path::Path::new(&output_path).exists() {
|
||||||
continue;
|
continue;
|
||||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
|||||||
.write_to_file(&output_path)?;
|
.write_to_file(&output_path)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mod_rs_path = format!("{}/mod.rs", output_folder);
|
let mod_rs_path = format!("{output_folder}/mod.rs");
|
||||||
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
||||||
|
|
||||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
|||||||
substreams = "0.5.22"
|
substreams = "0.5.22"
|
||||||
substreams-ethereum = "0.9.9"
|
substreams-ethereum = "0.9.9"
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "3c08359" }
|
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "52d5021" }
|
||||||
anyhow = "1.0.95"
|
anyhow = "1.0.95"
|
||||||
ethabi = "18.0.0"
|
ethabi = "18.0.0"
|
||||||
num-bigint = "0.4.6"
|
num-bigint = "0.4.6"
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
let contract_name = file_name.split('.').next().unwrap();
|
let contract_name = file_name.split('.').next().unwrap();
|
||||||
|
|
||||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
let input_path = format!("{abi_folder}/{file_name}");
|
||||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
let output_path = format!("{output_folder}/{contract_name}.rs");
|
||||||
|
|
||||||
mod_rs_content.push_str(&format!("pub mod {};\n", contract_name));
|
mod_rs_content.push_str(&format!("pub mod {contract_name};\n"));
|
||||||
|
|
||||||
if std::path::Path::new(&output_path).exists() {
|
if std::path::Path::new(&output_path).exists() {
|
||||||
continue;
|
continue;
|
||||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
|||||||
.write_to_file(&output_path)?;
|
.write_to_file(&output_path)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mod_rs_path = format!("{}/mod.rs", output_folder);
|
let mod_rs_path = format!("{output_folder}/mod.rs");
|
||||||
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
let mut mod_rs_file = fs::File::create(mod_rs_path)?;
|
||||||
|
|
||||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||||
|
|||||||
Reference in New Issue
Block a user