Create a workspace and make clippy happy.

This commit is contained in:
kayibal
2024-03-14 00:19:54 +00:00
parent e62cc13c0b
commit 425628ae97
11 changed files with 222 additions and 1345 deletions

View File

@@ -172,7 +172,7 @@ pub fn map_changes(
let tx = tx_component.tx.as_ref().unwrap();
transaction_contract_changes
.entry(tx.index)
.or_insert_with(|| TransactionContractChanges::new(&tx))
.or_insert_with(|| TransactionContractChanges::new(tx))
.component_changes
.extend_from_slice(&tx_component.components);
});
@@ -188,7 +188,7 @@ pub fn map_changes(
.entry(tx.index)
.or_insert_with(|| TransactionContractChanges::new(&tx))
.balance_changes
.extend(balances.into_iter().map(|(_, change)| change));
.extend(balances.into_values());
});
// Extract and insert any storage changes that happened for any of the components.
@@ -196,7 +196,7 @@ pub fn map_changes(
&block,
|addr| {
components_store
.get_last(format!("pool:{0}", hex::encode(&addr)))
.get_last(format!("pool:{0}", hex::encode(addr)))
.is_some()
},
&mut transaction_contract_changes,

View File

@@ -53,7 +53,7 @@ pub fn address_map(
abi::weighted_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&create_call.tokens)
.with_attributes(&[
("pool_type", "WeightedPoolFactory".as_bytes()),
@@ -72,7 +72,7 @@ pub fn address_map(
abi::composable_stable_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&create_call.tokens)
.with_attributes(&[("pool_type", "ComposableStablePoolFactory".as_bytes())])
.as_swap_type("balancer_pool", ImplementationType::Vm),
@@ -85,7 +85,7 @@ pub fn address_map(
abi::erc_linear_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
.with_attributes(&[
("pool_type", "ERC4626LinearPoolFactory".as_bytes()),
@@ -104,7 +104,7 @@ pub fn address_map(
abi::euler_linear_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
.with_attributes(&[
("pool_type", "EulerLinearPoolFactory".as_bytes()),
@@ -170,7 +170,7 @@ pub fn address_map(
abi::silo_linear_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
.with_attributes(&[
("pool_type", "SiloLinearPoolFactory".as_bytes()),
@@ -189,7 +189,7 @@ pub fn address_map(
abi::yearn_linear_pool_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&[create_call.main_token, create_call.wrapped_token])
.with_attributes(&[
("pool_type", "YearnLinearPoolFactory".as_bytes()),
@@ -210,7 +210,7 @@ pub fn address_map(
abi::weighted_pool_tokens_factory::events::PoolCreated::match_and_decode(log)?;
Some(
ProtocolComponent::at_contract(&pool_created.pool, &tx)
ProtocolComponent::at_contract(&pool_created.pool, tx)
.with_tokens(&create_call.tokens)
.with_attributes(&[
("pool_type", "WeightedPool2TokensFactory".as_bytes()),