Skip to content

Commit

Permalink
revert(blockifier): remove redundant blockifier transactions and rela…
Browse files Browse the repository at this point in the history
…ted fns
  • Loading branch information
avivg-starkware committed Nov 13, 2024
1 parent 2b4f533 commit 825bcf3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 477 deletions.
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

0 comments on commit 825bcf3

Please sign in to comment.