99import pytest
1010from algokit_utils import AlgoAmount , AlgorandClient , AssetCreateParams , PaymentParams
1111from algopy import arc4
12- from algosdk .atomic_transaction_composer import TransactionWithSigner
1312
1413from tests .artifacts .Arc4ABIMethod .contract import (
1514 AnotherStruct ,
@@ -43,10 +42,8 @@ def funded_account(algorand: AlgorandClient, context: _algopy_testing.AlgopyTest
4342 min_spending_balance = algokit_utils .AlgoAmount (micro_algo = _FUNDED_ACCOUNT_SPENDING ),
4443 )
4544 # ensure context has the same account with matching balance
46- context .any .account (
47- account .address , balance = algopy .Global .min_balance + _FUNDED_ACCOUNT_SPENDING
48- )
49- return account .address
45+ context .any .account (account .addr , balance = algopy .Global .min_balance + _FUNDED_ACCOUNT_SPENDING )
46+ return account .addr
5047
5148
5249@pytest .fixture ()
@@ -130,15 +127,13 @@ def test_app_args_is_correct_with_txn(
130127 get_avm_result (
131128 "with_txn" ,
132129 value = "hello" ,
133- pay = TransactionWithSigner (
134- txn = algorand .create_transaction .payment (
135- PaymentParams (
136- sender = localnet_creator_address ,
137- receiver = localnet_creator_address ,
138- amount = AlgoAmount (micro_algo = 123 ),
139- )
140- ),
141- signer = algorand .account .get_signer (localnet_creator_address ),
130+ pay = algorand .create_transaction .payment (
131+ PaymentParams (
132+ sender = localnet_creator_address ,
133+ receiver = localnet_creator_address ,
134+ amount = AlgoAmount (micro_algo = 123 ),
135+ signer = algorand .account .get_signer (localnet_creator_address ),
136+ )
142137 ),
143138 arr = [1 , 2 ],
144139 )
@@ -174,9 +169,7 @@ def test_app_args_is_correct_with_asset(
174169 sender = localnet_creator_address ,
175170 total = 123 ,
176171 )
177- ).confirmation [
178- "asset-index"
179- ] # type: ignore[call-overload]
172+ ).asset_id
180173
181174 # act
182175 get_avm_result ("with_asset" , value = "hello" , asset = asa_id , arr = [1 , 2 ])
@@ -343,15 +336,13 @@ def test_prepare_txns_with_complex(
343336 get_avm_result (
344337 "complex_sig" ,
345338 struct1 = ((1 , "2" ), (1 , "2" ), 3 , 4 ),
346- txn = TransactionWithSigner (
347- txn = algorand .create_transaction .payment (
348- PaymentParams (
349- sender = localnet_creator_address ,
350- receiver = localnet_creator_address ,
351- amount = AlgoAmount (micro_algo = 123 ),
352- )
339+ txn = algorand .create_transaction .payment (
340+ PaymentParams (
341+ sender = localnet_creator_address ,
342+ receiver = localnet_creator_address ,
343+ amount = AlgoAmount (micro_algo = 123 ),
344+ signer = algorand .account .get_signer (localnet_creator_address ),
353345 ),
354- signer = algorand .account .get_signer (localnet_creator_address ),
355346 ),
356347 acc = funded_account ,
357348 five = [5 ],
@@ -394,9 +385,7 @@ def test_app_args_is_correct_with_index_resource_encoding( # noqa: PLR0913
394385 sender = localnet_creator_address ,
395386 total = 123 ,
396387 )
397- ).confirmation [
398- "asset-index"
399- ] # type: ignore[call-overload]
388+ ).asset_id
400389
401390 # act
402391 contract .echo_resource_by_index (
@@ -424,7 +413,7 @@ def test_app_args_is_correct_with_index_resource_encoding( # noqa: PLR0913
424413 ]
425414 assert app_args [0 ] == arc4 .arc4_signature (SignaturesContract .echo_resource_by_index )
426415
427- assert result == [ asa_id , other_app_id , funded_account ]
416+ assert result == ( asa_id , other_app_id , funded_account )
428417
429418
430419def test_app_args_is_correct_with_value_resource_encoding ( # noqa: PLR0913
@@ -444,9 +433,7 @@ def test_app_args_is_correct_with_value_resource_encoding( # noqa: PLR0913
444433 sender = localnet_creator_address ,
445434 total = 123 ,
446435 )
447- ).confirmation [
448- "asset-index"
449- ] # type: ignore[call-overload]
436+ ).asset_id
450437
451438 asset = context .any .asset (asset_id = asa_id , total = algopy .UInt64 (123 ))
452439 app = context .ledger .get_app (other_app_id )
@@ -477,4 +464,4 @@ def test_app_args_is_correct_with_value_resource_encoding( # noqa: PLR0913
477464 ]
478465 assert app_args [0 ] == arc4 .arc4_signature (SignaturesContract .echo_resource_by_value )
479466
480- assert result == [ asset .id , app .id , acc ]
467+ assert result == ( asset .id , app .id , acc )
0 commit comments