feat: Add Balancer vault indexing
This commit is contained in:
committed by
Thales Lima
parent
a2e951aff3
commit
1bd5e39956
@@ -202,7 +202,8 @@ pub fn map_protocol_changes(
|
||||
|addr| {
|
||||
components_store
|
||||
.get_last(format!("pool:0x{0}", hex::encode(addr)))
|
||||
.is_some()
|
||||
.is_some() ||
|
||||
addr.eq(VAULT_ADDRESS)
|
||||
},
|
||||
&mut transaction_changes,
|
||||
);
|
||||
|
||||
@@ -70,6 +70,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
("pool_type", "WeightedPoolFactory".as_bytes()),
|
||||
@@ -96,6 +97,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
("pool_type", "ComposableStablePoolFactory".as_bytes()),
|
||||
@@ -116,6 +118,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
|
||||
.with_attributes(&[
|
||||
("pool_type", "ERC4626LinearPoolFactory".as_bytes()),
|
||||
@@ -142,6 +145,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
|
||||
.with_attributes(&[
|
||||
("pool_type", "EulerLinearPoolFactory".as_bytes()),
|
||||
@@ -216,6 +220,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
|
||||
.with_attributes(&[
|
||||
("pool_type", "SiloLinearPoolFactory".as_bytes()),
|
||||
@@ -242,6 +247,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
|
||||
.with_attributes(&[
|
||||
("pool_type", "YearnLinearPoolFactory".as_bytes()),
|
||||
@@ -270,6 +276,7 @@ pub fn address_map(
|
||||
|
||||
Some(
|
||||
ProtocolComponent::at_contract(&pool_created.pool, &(tx.into()))
|
||||
.with_contracts(&[pool_created.pool, VAULT_ADDRESS.to_vec()])
|
||||
.with_tokens(&create_call.tokens)
|
||||
.with_attributes(&[
|
||||
("pool_type", "WeightedPool2TokensFactory".as_bytes()),
|
||||
|
||||
@@ -19,7 +19,7 @@ binaries:
|
||||
modules:
|
||||
- name: map_components
|
||||
kind: map
|
||||
initialBlock: 12369300
|
||||
initialBlock: 12272146
|
||||
inputs:
|
||||
- source: sf.ethereum.type.v2.Block
|
||||
output:
|
||||
@@ -27,7 +27,7 @@ modules:
|
||||
|
||||
- name: store_components
|
||||
kind: store
|
||||
initialBlock: 12369300
|
||||
initialBlock: 12272146
|
||||
updatePolicy: add
|
||||
valueType: int64
|
||||
inputs:
|
||||
@@ -35,7 +35,7 @@ modules:
|
||||
|
||||
- name: map_relative_balances
|
||||
kind: map
|
||||
initialBlock: 12369300 # An arbitrary block that should change based on your requirements
|
||||
initialBlock: 12272146
|
||||
inputs:
|
||||
- source: sf.ethereum.type.v2.Block
|
||||
- store: store_components
|
||||
@@ -44,7 +44,7 @@ modules:
|
||||
|
||||
- name: store_balances
|
||||
kind: store
|
||||
initialBlock: 12369300
|
||||
initialBlock: 12272146
|
||||
updatePolicy: add
|
||||
valueType: bigint
|
||||
inputs:
|
||||
@@ -52,7 +52,7 @@ modules:
|
||||
|
||||
- name: map_protocol_changes
|
||||
kind: map
|
||||
initialBlock: 12369300
|
||||
initialBlock: 12272146
|
||||
inputs:
|
||||
- source: sf.ethereum.type.v2.Block
|
||||
- map: map_components
|
||||
|
||||
Reference in New Issue
Block a user