From 6a139cdfc49061b3c795caf218ffe62593dbb20f Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Thu, 10 Oct 2024 11:44:18 -0400 Subject: [PATCH] fix: rebase change of style --- .../blockifier/src/test_utils/struct_impls.rs | 27 ++++++++++++++----- crates/tests-integration/src/state_reader.rs | 22 ++++++++++++--- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/crates/blockifier/src/test_utils/struct_impls.rs b/crates/blockifier/src/test_utils/struct_impls.rs index 15e9163ced..793969a09a 100644 --- a/crates/blockifier/src/test_utils/struct_impls.rs +++ b/crates/blockifier/src/test_utils/struct_impls.rs @@ -7,7 +7,11 @@ use starknet_api::block::{BlockHash, BlockNumber, BlockTimestamp, NonzeroGasPric use starknet_api::core::{ChainId, ClassHash, ContractAddress, Nonce, PatriciaKey}; use starknet_api::hash::StarkHash; use starknet_api::transaction::{ - Calldata, Fee, GasVectorComputationMode, TransactionHash, TransactionVersion, + Calldata, + Fee, + GasVectorComputationMode, + TransactionHash, + TransactionVersion, }; use starknet_api::{calldata, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; @@ -21,21 +25,32 @@ use crate::context::{BlockContext, ChainInfo, FeeTokenAddresses, TransactionCont use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::contract_class::{ContractClassV0, ContractClassV1, NativeContractClassV1}; use crate::execution::entry_point::{ - CallEntryPoint, EntryPointExecutionContext, EntryPointExecutionResult, + CallEntryPoint, + EntryPointExecutionContext, + EntryPointExecutionResult, }; use crate::fee::fee_utils::get_fee_by_gas_vector; use crate::fee::resources::TransactionResources; use crate::state::state_api::State; use crate::test_utils::{ - get_raw_contract_class, CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_TIMESTAMP, - DEFAULT_ETH_L1_DATA_GAS_PRICE, DEFAULT_ETH_L1_GAS_PRICE, DEFAULT_STRK_L1_DATA_GAS_PRICE, - DEFAULT_STRK_L1_GAS_PRICE, TEST_ERC20_CONTRACT_ADDRESS, TEST_ERC20_CONTRACT_ADDRESS2, + get_raw_contract_class, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_TIMESTAMP, + DEFAULT_ETH_L1_DATA_GAS_PRICE, + DEFAULT_ETH_L1_GAS_PRICE, + DEFAULT_STRK_L1_DATA_GAS_PRICE, + DEFAULT_STRK_L1_GAS_PRICE, + TEST_ERC20_CONTRACT_ADDRESS, + TEST_ERC20_CONTRACT_ADDRESS2, TEST_SEQUENCER_ADDRESS, }; use crate::transaction::objects::{DeprecatedTransactionInfo, FeeType, TransactionInfo}; use crate::transaction::transactions::L1HandlerTransaction; use crate::versioned_constants::{ - GasCosts, OsConstants, VersionedConstants, VERSIONED_CONSTANTS_LATEST_JSON, + GasCosts, + OsConstants, + VersionedConstants, + VERSIONED_CONSTANTS_LATEST_JSON, }; impl CallEntryPoint { diff --git a/crates/tests-integration/src/state_reader.rs b/crates/tests-integration/src/state_reader.rs index f71b75e423..3100b29ac8 100644 --- a/crates/tests-integration/src/state_reader.rs +++ b/crates/tests-integration/src/state_reader.rs @@ -6,8 +6,13 @@ use blockifier::abi::abi_utils::get_fee_token_var_address; use blockifier::context::{BlockContext, ChainInfo}; use blockifier::test_utils::contracts::FeatureContract; use blockifier::test_utils::{ - CairoVersion, BALANCE, CURRENT_BLOCK_TIMESTAMP, DEFAULT_ETH_L1_GAS_PRICE, - DEFAULT_STRK_L1_GAS_PRICE, DEFAULT_STRK_L2_GAS_PRICE, TEST_SEQUENCER_ADDRESS, + CairoVersion, + BALANCE, + CURRENT_BLOCK_TIMESTAMP, + DEFAULT_ETH_L1_GAS_PRICE, + DEFAULT_STRK_L1_GAS_PRICE, + DEFAULT_STRK_L2_GAS_PRICE, + TEST_SEQUENCER_ADDRESS, }; use blockifier::transaction::objects::FeeType; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; @@ -23,10 +28,19 @@ use papyrus_storage::state::StateStorageWriter; use papyrus_storage::test_utils::{get_test_storage, get_test_storage_with_config_by_scope}; use papyrus_storage::{StorageConfig, StorageReader, StorageWriter}; use starknet_api::block::{ - BlockBody, BlockHeader, BlockHeaderWithoutHash, BlockNumber, BlockTimestamp, GasPricePerToken, + BlockBody, + BlockHeader, + BlockHeaderWithoutHash, + BlockNumber, + BlockTimestamp, + GasPricePerToken, }; use starknet_api::core::{ - ClassHash, ContractAddress, Nonce, PatriciaKey, SequencerContractAddress, + ClassHash, + ContractAddress, + Nonce, + PatriciaKey, + SequencerContractAddress, }; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; use starknet_api::state::{StorageKey, ThinStateDiff};