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