Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(blockifier): remove redundant blockifier transactions and related fns #1831

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 2 additions & 27 deletions crates/blockifier/src/transaction/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ use starknet_api::transaction::fields::{
TransactionSignature,
ValidResourceBounds,
};
use starknet_api::transaction::{
InvokeTransactionV0,
InvokeTransactionV1,
InvokeTransactionV3,
TransactionHash,
TransactionVersion,
};
use starknet_api::transaction::TransactionVersion;
use starknet_api::{calldata, declare_tx_args, deploy_account_tx_args, felt, invoke_tx_args};
use starknet_types_core::felt::Felt;
use strum::IntoEnumIterator;
Expand Down Expand Up @@ -52,7 +46,7 @@ use crate::transaction::account_transaction::AccountTransaction;
use crate::transaction::constants;
use crate::transaction::objects::{FeeType, TransactionExecutionInfo, TransactionExecutionResult};
use crate::transaction::transaction_types::TransactionType;
use crate::transaction::transactions::{ExecutableTransaction, InvokeTransaction};
use crate::transaction::transactions::ExecutableTransaction;

// Corresponding constants to the ones in faulty_account.
pub const VALID: u64 = 0;
Expand All @@ -64,25 +58,6 @@ pub const GET_BLOCK_NUMBER: u64 = 5;
pub const GET_BLOCK_TIMESTAMP: u64 = 6;
pub const GET_SEQUENCER_ADDRESS: u64 = 7;

macro_rules! impl_from_versioned_tx {
($(($specified_tx_type:ty, $enum_variant:ident)),*) => {
$(impl From<$specified_tx_type> for InvokeTransaction {
fn from(tx: $specified_tx_type) -> Self {
Self::new(
starknet_api::transaction::InvokeTransaction::$enum_variant(tx),
TransactionHash::default(),
)
}
})*
};
}

impl_from_versioned_tx!(
(InvokeTransactionV0, V0),
(InvokeTransactionV1, V1),
(InvokeTransactionV3, V3)
);

/// Test fixtures.

#[fixture]
Expand Down
Loading
Loading