diff --git a/crates/blockifier/src/concurrency/versioned_state_test.rs b/crates/blockifier/src/concurrency/versioned_state_test.rs index 1439e1dfa2..52c5621968 100644 --- a/crates/blockifier/src/concurrency/versioned_state_test.rs +++ b/crates/blockifier/src/concurrency/versioned_state_test.rs @@ -12,7 +12,7 @@ use starknet_api::core::{ PatriciaKey, }; use starknet_api::test_utils::NonceManager; -use starknet_api::transaction::{Calldata, ContractAddressSalt, ValidResourceBounds}; +use starknet_api::transaction::{ContractAddressSalt, ValidResourceBounds}; use starknet_api::{ calldata, class_hash, diff --git a/crates/blockifier/src/execution/stack_trace_test.rs b/crates/blockifier/src/execution/stack_trace_test.rs index bee3b05bcb..dff6a9804c 100644 --- a/crates/blockifier/src/execution/stack_trace_test.rs +++ b/crates/blockifier/src/execution/stack_trace_test.rs @@ -3,7 +3,6 @@ use regex::Regex; use rstest::rstest; use starknet_api::core::{calculate_contract_address, Nonce}; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, Fee, TransactionSignature, diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs index 22af1be493..fbbeeaf610 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs @@ -2,7 +2,6 @@ use pretty_assertions::assert_eq; use starknet_api::core::ContractAddress; use starknet_api::execution_utils::format_panic_data; use starknet_api::state::StorageKey; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; use test_case::test_case; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs index f8e095daa2..e6eda072d6 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs @@ -6,7 +6,6 @@ use pretty_assertions::assert_eq; use starknet_api::core::PatriciaKey; use starknet_api::execution_utils::format_panic_data; use starknet_api::state::StorageKey; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt, patricia_key}; use test_case::test_case; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs index 633a06fd26..e202fa8ac2 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs @@ -1,5 +1,4 @@ use starknet_api::execution_utils::format_panic_data; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use test_case::test_case; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs index 117be720b9..efde0be56f 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs @@ -1,4 +1,3 @@ -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use test_case::test_case; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs index bffb68bb18..adf201b162 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs @@ -1,5 +1,4 @@ use starknet_api::state::StorageKey; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use test_case::test_case; diff --git a/crates/blockifier/src/test_utils/prices.rs b/crates/blockifier/src/test_utils/prices.rs index 444c118f26..53686869fb 100644 --- a/crates/blockifier/src/test_utils/prices.rs +++ b/crates/blockifier/src/test_utils/prices.rs @@ -4,7 +4,6 @@ use cached::proc_macro::cached; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use starknet_api::core::ContractAddress; use starknet_api::test_utils::invoke::InvokeTxArgs; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use crate::abi::abi_utils::{get_fee_token_var_address, selector_from_name}; diff --git a/crates/blockifier/src/test_utils/struct_impls.rs b/crates/blockifier/src/test_utils/struct_impls.rs index 5d6b86450e..ca373e5ba4 100644 --- a/crates/blockifier/src/test_utils/struct_impls.rs +++ b/crates/blockifier/src/test_utils/struct_impls.rs @@ -5,7 +5,7 @@ use serde_json::Value; use starknet_api::block::{BlockHash, BlockNumber, BlockTimestamp, NonzeroGasPrice}; use starknet_api::core::{ChainId, ClassHash, ContractAddress, Nonce, PatriciaKey}; use starknet_api::hash::StarkHash; -use starknet_api::transaction::{Calldata, Fee, TransactionHash, TransactionVersion}; +use starknet_api::transaction::{Fee, TransactionHash, TransactionVersion}; use starknet_api::{calldata, contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; diff --git a/crates/blockifier/src/test_utils/transfers_generator.rs b/crates/blockifier/src/test_utils/transfers_generator.rs index 8833e73a12..77f26a6c28 100644 --- a/crates/blockifier/src/test_utils/transfers_generator.rs +++ b/crates/blockifier/src/test_utils/transfers_generator.rs @@ -2,7 +2,7 @@ use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use starknet_api::core::ContractAddress; use starknet_api::test_utils::NonceManager; -use starknet_api::transaction::{Calldata, Fee, TransactionVersion}; +use starknet_api::transaction::{Fee, TransactionVersion}; use starknet_api::{calldata, felt, invoke_tx_args}; use starknet_types_core::felt::Felt; diff --git a/crates/blockifier/src/transaction/test_utils.rs b/crates/blockifier/src/transaction/test_utils.rs index c370b084cc..8c20c7f843 100644 --- a/crates/blockifier/src/transaction/test_utils.rs +++ b/crates/blockifier/src/transaction/test_utils.rs @@ -7,7 +7,6 @@ use starknet_api::test_utils::invoke::InvokeTxArgs; use starknet_api::test_utils::NonceManager; use starknet_api::transaction::{ AllResourceBounds, - Calldata, ContractAddressSalt, Fee, GasVectorComputationMode, diff --git a/crates/native_blockifier/src/state_readers/papyrus_state_test.rs b/crates/native_blockifier/src/state_readers/papyrus_state_test.rs index e999276084..499f753b13 100644 --- a/crates/native_blockifier/src/state_readers/papyrus_state_test.rs +++ b/crates/native_blockifier/src/state_readers/papyrus_state_test.rs @@ -15,7 +15,6 @@ use papyrus_storage::state::StateStorageWriter; use starknet_api::block::BlockNumber; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; use starknet_api::state::{StateDiff, StorageKey}; -use starknet_api::transaction::Calldata; use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; diff --git a/crates/papyrus_execution/src/test_utils.rs b/crates/papyrus_execution/src/test_utils.rs index d76341d08e..557384ea36 100644 --- a/crates/papyrus_execution/src/test_utils.rs +++ b/crates/papyrus_execution/src/test_utils.rs @@ -34,7 +34,6 @@ use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContract use starknet_api::state::{ContractClass, StateNumber, ThinStateDiff}; use starknet_api::test_utils::read_json_file; use starknet_api::transaction::{ - Calldata, DeclareTransactionV0V1, DeclareTransactionV2, DeployAccountTransaction, diff --git a/crates/papyrus_rpc/tests/gateway_integration_test.rs b/crates/papyrus_rpc/tests/gateway_integration_test.rs index 0872a3b06d..b59a02436e 100644 --- a/crates/papyrus_rpc/tests/gateway_integration_test.rs +++ b/crates/papyrus_rpc/tests/gateway_integration_test.rs @@ -10,13 +10,7 @@ use papyrus_rpc::{ TransactionVersion1RPC0_8, }; use starknet_api::core::{ChainId, ContractAddress, EntryPointSelector, Nonce, PatriciaKey}; -use starknet_api::transaction::{ - Calldata, - Fee, - Transaction, - TransactionOptions, - TransactionSignature, -}; +use starknet_api::transaction::{Fee, Transaction, TransactionOptions, TransactionSignature}; use starknet_api::transaction_hash::get_transaction_hash; use starknet_api::{calldata, contract_address, felt, patricia_key}; use starknet_client::writer::objects::transaction::InvokeTransaction as SNClientInvokeTransaction; diff --git a/crates/starknet_api/src/transaction.rs b/crates/starknet_api/src/transaction.rs index 928a92079e..113cba3907 100644 --- a/crates/starknet_api/src/transaction.rs +++ b/crates/starknet_api/src/transaction.rs @@ -895,7 +895,7 @@ pub struct Calldata(pub Arc>); #[macro_export] macro_rules! calldata { ( $( $x:expr ),* ) => { - Calldata(vec![$($x),*].into()) + $crate::transaction::Calldata(vec![$($x),*].into()) }; }