Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Feb 21, 2024
1 parent 63ea22e commit 1b12e13
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions crates/katana/primitives/src/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use derive_more::{AsRef, Deref};
use derive_more::{AsRef, Deref, From};
use ethers::types::H256;
use starknet::core::types::{DataAvailabilityMode, ResourceBoundsMapping};

Expand Down Expand Up @@ -47,7 +47,7 @@ impl<'a> From<TxRef<'a>> for Tx {
}

/// Represents a transaction that has all the necessary data to be executed.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, From)]
pub enum ExecutableTx {
Invoke(InvokeTx),
L1Handler(L1HandlerTx),
Expand Down Expand Up @@ -505,27 +505,3 @@ impl From<&ExecutableTxWithHash> for TxWithHash {
Self { hash: tx.hash, transaction: tx.tx_ref().into() }
}
}

impl From<L1HandlerTx> for ExecutableTx {
fn from(tx: L1HandlerTx) -> Self {
ExecutableTx::L1Handler(tx)
}
}

impl From<DeclareTxWithClass> for ExecutableTx {
fn from(tx: DeclareTxWithClass) -> Self {
ExecutableTx::Declare(tx)
}
}

impl From<InvokeTx> for ExecutableTx {
fn from(tx: InvokeTx) -> Self {
ExecutableTx::Invoke(tx)
}
}

impl From<DeployAccountTx> for ExecutableTx {
fn from(tx: DeployAccountTx) -> Self {
ExecutableTx::DeployAccount(tx)
}
}

0 comments on commit 1b12e13

Please sign in to comment.