@@ -1034,17 +1034,7 @@ async fn test_v1_bound_accounts_cairo1() {
10341034
10351035 // Transfer funds to the account.
10361036 let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS . max_possible_fee ( max_tip) . 0 ;
1037- let transfer_tx_args = invoke_tx_args ! {
1038- sender_address: * FUNDED_ACCOUNT_ADDRESS ,
1039- nonce: nonce_manager. next( * FUNDED_ACCOUNT_ADDRESS ) ,
1040- calldata: create_calldata(
1041- * STRK_FEE_TOKEN_ADDRESS ,
1042- "transfer" ,
1043- & [ * * v1_bound_account_address, Felt :: from( transfer_amount) , Felt :: ZERO ]
1044- ) ,
1045- resource_bounds: * NON_TRIVIAL_RESOURCE_BOUNDS ,
1046- } ;
1047- test_manager. add_invoke_tx_from_args ( transfer_tx_args, & CHAIN_ID_FOR_TESTS , None ) ;
1037+ test_manager. add_fund_address_tx ( v1_bound_account_address, & mut nonce_manager, transfer_amount) ;
10481038
10491039 // Create an invoke tx, compute the hash, sign the hash and update the signature on the tx.
10501040 let invoke_tx_args = invoke_tx_args ! {
@@ -1627,18 +1617,8 @@ async fn test_new_class_flow(#[case] use_kzg_da: bool, #[case] n_blocks_in_multi
16271617 )
16281618 . unwrap ( ) ;
16291619 // Fund the address.
1630- let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS . max_possible_fee ( Tip ( 0 ) ) . 0 ;
1631- let transfer_tx_args = invoke_tx_args ! {
1632- sender_address: * FUNDED_ACCOUNT_ADDRESS ,
1633- nonce: nonce_manager. next( * FUNDED_ACCOUNT_ADDRESS ) ,
1634- calldata: create_calldata(
1635- * STRK_FEE_TOKEN_ADDRESS ,
1636- "transfer" ,
1637- & [ * * faulty_account_address, Felt :: from( transfer_amount) , Felt :: ZERO ]
1638- ) ,
1639- resource_bounds: * NON_TRIVIAL_RESOURCE_BOUNDS ,
1640- } ;
1641- test_manager. add_invoke_tx_from_args ( transfer_tx_args, & CHAIN_ID_FOR_TESTS , None ) ;
1620+ test_manager
1621+ . add_fund_address_tx_with_default_amount ( faulty_account_address, & mut nonce_manager) ;
16421622
16431623 // Create a DeployAccount transaction.
16441624 let deploy_tx_args = deploy_account_tx_args ! {
@@ -1789,18 +1769,8 @@ async fn test_deprecated_tx_info() {
17891769 . unwrap ( ) ;
17901770
17911771 // Fund the address.
1792- let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS . max_possible_fee ( Tip ( 0 ) ) . 0 ;
1793- let transfer_tx_args = invoke_tx_args ! {
1794- sender_address: * FUNDED_ACCOUNT_ADDRESS ,
1795- nonce: nonce_manager. next( * FUNDED_ACCOUNT_ADDRESS ) ,
1796- calldata: create_calldata(
1797- * STRK_FEE_TOKEN_ADDRESS ,
1798- "transfer" ,
1799- & [ * * tx_info_account_address, Felt :: from( transfer_amount) , Felt :: ZERO ]
1800- ) ,
1801- resource_bounds: * NON_TRIVIAL_RESOURCE_BOUNDS ,
1802- } ;
1803- test_manager. add_invoke_tx_from_args ( transfer_tx_args, & CHAIN_ID_FOR_TESTS , None ) ;
1772+ test_manager
1773+ . add_fund_address_tx_with_default_amount ( tx_info_account_address, & mut nonce_manager) ;
18041774
18051775 // Deploy the account.
18061776 let deploy_tx_args = deploy_account_tx_args ! {
@@ -2078,18 +2048,8 @@ async fn test_block_info(#[values(true, false)] is_cairo0: bool) {
20782048 . unwrap ( ) ;
20792049
20802050 // Fund the address.
2081- let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS . max_possible_fee ( Tip ( 0 ) ) . 0 ;
2082- let transfer_tx_args = invoke_tx_args ! {
2083- sender_address: * FUNDED_ACCOUNT_ADDRESS ,
2084- nonce: nonce_manager. next( * FUNDED_ACCOUNT_ADDRESS ) ,
2085- calldata: create_calldata(
2086- * STRK_FEE_TOKEN_ADDRESS ,
2087- "transfer" ,
2088- & [ * * block_info_account_address, Felt :: from( transfer_amount) , Felt :: ZERO ]
2089- ) ,
2090- resource_bounds: * NON_TRIVIAL_RESOURCE_BOUNDS ,
2091- } ;
2092- test_manager. add_invoke_tx_from_args ( transfer_tx_args, & CHAIN_ID_FOR_TESTS , None ) ;
2051+ test_manager
2052+ . add_fund_address_tx_with_default_amount ( block_info_account_address, & mut nonce_manager) ;
20932053
20942054 // Deploy the contract using a DeployAccount transaction.
20952055 let deploy_account_tx_args = deploy_account_tx_args ! {
@@ -2166,18 +2126,7 @@ async fn test_initial_sierra_gas() {
21662126 . await ;
21672127
21682128 // Fund the account.
2169- let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS . max_possible_fee ( Tip ( 0 ) ) . 0 ;
2170- let fund_tx_args = invoke_tx_args ! {
2171- sender_address: * FUNDED_ACCOUNT_ADDRESS ,
2172- nonce: nonce_manager. next( * FUNDED_ACCOUNT_ADDRESS ) ,
2173- calldata: create_calldata(
2174- * STRK_FEE_TOKEN_ADDRESS ,
2175- "transfer" ,
2176- & [ * * account_address, Felt :: from( transfer_amount) , Felt :: ZERO ]
2177- ) ,
2178- resource_bounds: * NON_TRIVIAL_RESOURCE_BOUNDS ,
2179- } ;
2180- test_manager. add_invoke_tx_from_args ( fund_tx_args, & CHAIN_ID_FOR_TESTS , None ) ;
2129+ test_manager. add_fund_address_tx_with_default_amount ( account_address, & mut nonce_manager) ;
21812130
21822131 // Test invoke gas limits.
21832132 let os_constants = & VersionedConstants :: latest_constants ( ) . os_constants ;
0 commit comments