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",
|
||||
]
|
||||
|
||||
[[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]]
|
||||
name = "ethereum-balancer-v2"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -236,12 +254,12 @@ dependencies = [
|
||||
"prost-types 0.12.6",
|
||||
"substreams",
|
||||
"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-curve"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -257,7 +275,7 @@ dependencies = [
|
||||
"serde_qs",
|
||||
"substreams",
|
||||
"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]]
|
||||
@@ -300,6 +318,26 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
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"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
@@ -315,27 +353,7 @@ dependencies = [
|
||||
"regex",
|
||||
"substreams",
|
||||
"substreams-ethereum",
|
||||
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
|
||||
]
|
||||
|
||||
[[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)",
|
||||
"tycho-substreams 0.2.1 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -352,7 +370,7 @@ dependencies = [
|
||||
"serde-sibor",
|
||||
"substreams",
|
||||
"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]]
|
||||
@@ -370,7 +388,7 @@ dependencies = [
|
||||
"serde_qs",
|
||||
"substreams",
|
||||
"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]]
|
||||
@@ -1375,24 +1393,6 @@ dependencies = [
|
||||
"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]]
|
||||
name = "substreams-ethereum-core"
|
||||
version = "0.9.13"
|
||||
@@ -1646,8 +1646,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tycho-substreams"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=f90c33b#f90c33bcc229a1bca1fe86ee6fc4024cbdc25aeb"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"ethabi 18.0.0",
|
||||
"hex",
|
||||
@@ -1663,6 +1662,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tycho-substreams"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=52d5021#52d502198e9aa964814ef5f139df0886c3eb7bb0"
|
||||
dependencies = [
|
||||
"ethabi 18.0.0",
|
||||
"hex",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "substreams-ethereum-ambient"
|
||||
version = "0.5.2"
|
||||
name = "ethereum-ambient"
|
||||
version = "0.6.1"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "substreams_ethereum_ambient"
|
||||
name = "ethereum_ambient"
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[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-ethereum = "0.9.9"
|
||||
prost = "0.11"
|
||||
|
||||
@@ -47,6 +47,7 @@ impl From<InterimContractChange> for ContractChange {
|
||||
.map(|(slot, value)| ContractSlot { slot, value: value.new_value })
|
||||
.collect(),
|
||||
change: value.change.into(),
|
||||
token_balances: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "substreams_ethereum_ambient"
|
||||
version: v0.6.0
|
||||
name: "ethereum_ambient"
|
||||
version: v0.6.1
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
@@ -14,7 +14,7 @@ protobuf:
|
||||
binaries:
|
||||
default:
|
||||
type: wasm/rust-v1
|
||||
file: ../target/wasm32-unknown-unknown/release/substreams_ethereum_ambient.wasm
|
||||
file: ../target/wasm32-unknown-unknown/release/ethereum_ambient.wasm
|
||||
|
||||
modules:
|
||||
- name: map_pool_changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ethereum-balancer-v2"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -19,7 +19,7 @@ bytes = "1.5.0"
|
||||
anyhow = "1.0.75"
|
||||
num-bigint = "0.4.4"
|
||||
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]
|
||||
anyhow = "1"
|
||||
|
||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
||||
|
||||
let contract_name = file_name.split('.').next().unwrap();
|
||||
|
||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
||||
let input_path = format!("{abi_folder}/{file_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() {
|
||||
continue;
|
||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
||||
.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)?;
|
||||
|
||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||
|
||||
@@ -60,10 +60,7 @@ pub fn address_map(
|
||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -88,10 +85,7 @@ pub fn address_map(
|
||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -100,7 +94,10 @@ pub fn address_map(
|
||||
"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",
|
||||
&create_call
|
||||
@@ -120,10 +117,7 @@ pub fn address_map(
|
||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -132,7 +126,10 @@ pub fn address_map(
|
||||
"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",
|
||||
&create_call
|
||||
@@ -152,10 +149,7 @@ pub fn address_map(
|
||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -164,7 +158,10 @@ pub fn address_map(
|
||||
"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",
|
||||
&create_call
|
||||
@@ -185,10 +182,7 @@ pub fn address_map(
|
||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&tokens_registered.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -200,7 +194,10 @@ pub fn address_map(
|
||||
.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]),
|
||||
])
|
||||
.as_swap_type("balancer_v2_pool", ImplementationType::Vm),
|
||||
@@ -215,10 +212,7 @@ pub fn address_map(
|
||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&tokens_registered.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -252,10 +246,7 @@ pub fn address_map(
|
||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&tokens_registered.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -337,10 +328,7 @@ pub fn address_map(
|
||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&tokens_registered.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -374,10 +362,7 @@ pub fn address_map(
|
||||
let tokens_registered = get_token_registered(tx, &pool_registered.pool_id);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool.clone(), VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&tokens_registered.tokens)
|
||||
.with_attributes(&[
|
||||
@@ -412,10 +397,7 @@ pub fn address_map(
|
||||
let pool_registered = get_pool_registered(tx, &pool_created.pool);
|
||||
|
||||
Some(
|
||||
ProtocolComponent::new(
|
||||
&format!("0x{}", hex::encode(pool_registered.pool_id)),
|
||||
&(tx.into()),
|
||||
)
|
||||
ProtocolComponent::new(&format!("0x{}", hex::encode(pool_registered.pool_id)))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "ethereum_balancer_v2"
|
||||
version: v0.2.4
|
||||
version: v0.2.5
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ethereum-curve"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -18,7 +18,7 @@ hex = "0.4.3"
|
||||
bytes = "1.5.0"
|
||||
anyhow = "1.0.75"
|
||||
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_qs = "0.13.0"
|
||||
itertools = "0.13.0"
|
||||
|
||||
@@ -100,12 +100,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![
|
||||
component_id.into(),
|
||||
@@ -218,12 +212,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![component_id.into()],
|
||||
static_att: vec![
|
||||
@@ -465,12 +453,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![component_id.into(), CRYPTO_SWAP_NG_FACTORY.into()],
|
||||
static_att: vec![
|
||||
@@ -538,12 +520,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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()],
|
||||
contracts: vec![
|
||||
component_id.into(),
|
||||
@@ -637,12 +613,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![pool_added.pool, TRICRYPTO_FACTORY.into()],
|
||||
static_att: vec![
|
||||
@@ -758,12 +728,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![component_id.into()],
|
||||
static_att: vec![
|
||||
@@ -903,12 +867,6 @@ pub fn address_map(
|
||||
Some((
|
||||
ProtocolComponent {
|
||||
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(),
|
||||
contracts: vec![pool_added.pool, TWOCRYPTO_FACTORY.into()],
|
||||
static_att: vec![
|
||||
|
||||
@@ -48,12 +48,6 @@ fn create_component(
|
||||
Ok(Some((
|
||||
ProtocolComponent {
|
||||
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
|
||||
.clone()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "substreams_curve"
|
||||
version: v0.3.2
|
||||
version: v0.3.3
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ethereum-sfrax"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -17,7 +17,7 @@ prost-types = "0.11"
|
||||
substreams = "0.5.22"
|
||||
substreams-ethereum = "0.9.9"
|
||||
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"
|
||||
anyhow = "1.0.75"
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn map_components(
|
||||
// a log.address = vault_address is the deployment tx
|
||||
if is_deployment_tx(tx, &vault_address) {
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&vault_address, &tx.into())
|
||||
ProtocolComponent::at_contract(&vault_address)
|
||||
.with_tokens(&[
|
||||
locked_asset.as_slice(),
|
||||
vault_address.as_slice(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "ethereum_sfrax"
|
||||
version: v0.1.0
|
||||
version: v0.1.2
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ethereum-sfraxeth"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -17,7 +17,7 @@ prost-types = "0.11"
|
||||
substreams = "0.5.22"
|
||||
substreams-ethereum = "0.9.9"
|
||||
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"
|
||||
anyhow = "1.0.75"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ pub fn map_components(
|
||||
// a log.address = vault_address is the deployment tx
|
||||
if is_deployment_tx(tx, &vault_address) {
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&vault_address, &tx.into())
|
||||
ProtocolComponent::at_contract(&vault_address)
|
||||
.with_tokens(&[
|
||||
locked_asset.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));
|
||||
store.set(
|
||||
reward_cycle.ord,
|
||||
format!("reward_cycle:{}", address_hex),
|
||||
format!("reward_cycle:{address_hex}"),
|
||||
&reward_cycle.next_reward_amount,
|
||||
);
|
||||
});
|
||||
@@ -144,7 +144,7 @@ pub fn map_relative_balances(
|
||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||
|
||||
if store
|
||||
.get_last(format!("pool:{}", address_hex))
|
||||
.get_last(format!("pool:{address_hex}"))
|
||||
.is_some()
|
||||
{
|
||||
substreams::log::info!(
|
||||
@@ -177,7 +177,7 @@ pub fn map_relative_balances(
|
||||
let address_bytes_be = vault_log.address();
|
||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||
if store
|
||||
.get_last(format!("pool:{}", address_hex))
|
||||
.get_last(format!("pool:{address_hex}"))
|
||||
.is_some()
|
||||
{
|
||||
deltas.extend_from_slice(&[
|
||||
@@ -206,7 +206,7 @@ pub fn map_relative_balances(
|
||||
let address_bytes_be = vault_log.address();
|
||||
let address_hex = format!("0x{}", hex::encode(address_bytes_be));
|
||||
if store
|
||||
.get_last(format!("pool:{}", address_hex))
|
||||
.get_last(format!("pool:{address_hex}"))
|
||||
.is_some()
|
||||
{
|
||||
// When the NextRewardsCycle event is emitted:
|
||||
@@ -221,7 +221,7 @@ pub fn map_relative_balances(
|
||||
if let Some(last_reward_amount) = reward_store
|
||||
.deltas
|
||||
.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())
|
||||
{
|
||||
substreams::log::info!(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "ethereum_sfraxeth"
|
||||
version: v0.1.0
|
||||
version: v0.1.1
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
|
||||
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
||||
substreams = "0.5.22"
|
||||
substreams-ethereum = "0.9.9"
|
||||
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"
|
||||
ethabi = "18.0.0"
|
||||
num-bigint = "0.4.6"
|
||||
|
||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
||||
|
||||
let contract_name = file_name.split('.').next().unwrap();
|
||||
|
||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
||||
let input_path = format!("{abi_folder}/{file_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() {
|
||||
continue;
|
||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
||||
.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)?;
|
||||
|
||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||
|
||||
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
||||
substreams = "0.5.22"
|
||||
substreams-ethereum = "0.9.9"
|
||||
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"
|
||||
ethabi = "18.0.0"
|
||||
num-bigint = "0.4.6"
|
||||
|
||||
@@ -26,10 +26,10 @@ fn main() -> Result<()> {
|
||||
|
||||
let contract_name = file_name.split('.').next().unwrap();
|
||||
|
||||
let input_path = format!("{}/{}", abi_folder, file_name);
|
||||
let output_path = format!("{}/{}.rs", output_folder, contract_name);
|
||||
let input_path = format!("{abi_folder}/{file_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() {
|
||||
continue;
|
||||
@@ -40,7 +40,7 @@ fn main() -> Result<()> {
|
||||
.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)?;
|
||||
|
||||
mod_rs_file.write_all(mod_rs_content.as_bytes())?;
|
||||
|
||||
Reference in New Issue
Block a user