Skip to content

Commit

Permalink
refactor: rename invoke generator
Browse files Browse the repository at this point in the history
deploy support is coming soon
  • Loading branch information
Gilad Chase committed Jul 11, 2024
1 parent 7c08d83 commit d4a0080
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/mempool_test_utils/src/starknet_api_test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub fn invoke_tx(cairo_version: CairoVersion) -> RPCTransaction {

MultiAccountTransactionGenerator::new_for_account_contracts([default_account])
.account_with_id(0)
.generate_default()
.generate_default_invoke()
}

// TODO: when moving this to Starknet API crate, move this const into a module alongside
Expand All @@ -136,9 +136,9 @@ type AccountId = u16;
/// use mempool_test_utils::starknet_api_test_utils::MultiAccountTransactionGenerator;
///
/// let mut tx_generator = MultiAccountTransactionGenerator::new(2); // Initialize with 2 accounts.
/// let account_0_tx_with_nonce_0 = tx_generator.account_with_id(0).generate_default();
/// let account_1_tx_with_nonce_0 = tx_generator.account_with_id(1).generate_default();
/// let account_0_tx_with_nonce_1 = tx_generator.account_with_id(0).generate_default();
/// let account_0_tx_with_nonce_0 = tx_generator.account_with_id(0).generate_default_invoke();
/// let account_1_tx_with_nonce_0 = tx_generator.account_with_id(1).generate_default_invoke();
/// let account_0_tx_with_nonce_1 = tx_generator.account_with_id(0).generate_default_invoke();
/// ```
// Note: when moving this to starknet api crate, see if blockifier's
// [blockifier::transaction::test_utils::FaultyAccountTxCreatorArgs] can be made to use this.
Expand Down Expand Up @@ -183,7 +183,7 @@ pub struct AccountTransactionGenerator<'a> {

impl<'a> AccountTransactionGenerator<'a> {
/// Generate a valid `RPCTransaction` with default parameters.
pub fn generate_default(&mut self) -> RPCTransaction {
pub fn generate_default_invoke(&mut self) -> RPCTransaction {
let invoke_args = invoke_tx_args!(
sender_address: self.sender_address(),
resource_bounds: executable_resource_bounds_mapping(),
Expand Down

0 comments on commit d4a0080

Please sign in to comment.