-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(blockifier): account_tx from enum to struct w api::executabl…
…e_tx
- Loading branch information
1 parent
7a0a1f9
commit 2330759
Showing
17 changed files
with
205 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
use starknet_api::contract_class::ClassInfo; | ||
use starknet_api::executable_transaction::{AccountTransaction as Transaction, DeclareTransaction}; | ||
use starknet_api::test_utils::declare::DeclareTxArgs; | ||
|
||
use crate::transaction::account_transaction::AccountTransaction; | ||
use crate::transaction::transactions::DeclareTransaction; | ||
|
||
pub fn declare_tx(declare_tx_args: DeclareTxArgs, class_info: ClassInfo) -> AccountTransaction { | ||
let tx_hash = declare_tx_args.tx_hash; | ||
let declare_tx = starknet_api::test_utils::declare::declare_tx(declare_tx_args); | ||
// TODO(AvivG): use starknet_api::test_utils::declare::executable_declare_tx to | ||
// create executable_declare. | ||
let executable_declare = DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap(); | ||
|
||
executable_declare.into() | ||
let executable_tx = | ||
Transaction::Declare(DeclareTransaction { tx: declare_tx, tx_hash, class_info }); | ||
|
||
executable_tx.into() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.