From cbfdc88247a1acd77a149255be5e108a0a2c66d5 Mon Sep 17 00:00:00 2001 From: Nikita P Date: Sat, 9 Nov 2024 14:11:36 +0000 Subject: [PATCH] feat: fixed comments --- tests/test_2024_11_26.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/test_2024_11_26.py b/tests/test_2024_11_26.py index 760175a4..5f38091b 100644 --- a/tests/test_2024_11_26.py +++ b/tests/test_2024_11_26.py @@ -16,7 +16,7 @@ validate_node_operator_reward_address_set_event, NodeOperatorRewardAddressSetItem ) -from configs.config_mainnet import ( USDC_TOKEN ) +from configs.config_mainnet import ( USDC_TOKEN, USDT_TOKEN ) def test_vote(helpers, accounts, vote_ids_from_env, stranger): @@ -111,7 +111,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger): assert atc_spend_limit_after == atcSpendLimitAfterExpected assert interface.AllowedRecipientRegistry(atc_allowed_recipients_registry).isUnderSpendableBalance(atcSpendableBalanceAfter, 3) assert atcSpendableBalanceAfter == atcSpendLimitAfterExpected - limit_test(easy_track, int(atcSpendableBalanceAfter / (10**18)), atc_trusted_caller_acc, atc_top_up_evm_script_factory, atc_multisig_acc, stranger) + limit_test(easy_track, int(atcSpendableBalanceAfter / (10**18)), atc_trusted_caller_acc, atc_top_up_evm_script_factory, atc_multisig_acc, stranger, interface.Usdc(USDC_TOKEN)) # Item 2 pmlBudgetLimitAfter, pmlPeriodDurationMonthsAfter = interface.AllowedRecipientRegistry(pml_allowed_recipients_registry).getLimitParameters() @@ -122,8 +122,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger): assert pml_spend_limit_after == pmlSpendLimitAfterExpected assert interface.AllowedRecipientRegistry(pml_allowed_recipients_registry).isUnderSpendableBalance(pmlSpendableBalanceAfter, 3) assert pmlSpendableBalanceAfter == pmlSpendLimitAfterExpected - # TODO - #limit_test(easy_track, int(pmlSpendableBalanceAfter / (10**18)), pml_trusted_caller_acc, pml_top_up_evm_script_factory, pml_multisig_acc, stranger) + #limit_test(easy_track, int(pmlSpendableBalanceAfter / (10**18)), pml_trusted_caller_acc, pml_top_up_evm_script_factory, pml_multisig_acc, stranger, interface.Usdt(USDT_TOKEN)) # Item 3 tmcBudgetLimitAfter, tmcPeriodDurationMonthsAfter = interface.AllowedRecipientRegistry(tmc_allowed_recipients_registry).getLimitParameters() @@ -211,7 +210,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger): ) ) -def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_factory, multisig_acc, stranger): +def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_factory, multisig_acc, stranger, token): # can't spend more than 2M USDC at once max_usdc_spend_at_once = 2_000_000 * 10**6 @@ -224,7 +223,7 @@ def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_facto easy_track, trusted_caller_acc, top_up_evm_script_factory, - interface.Usdc(USDC_TOKEN), + token, [multisig_acc], [to_spend_usdc + 1], stranger, @@ -236,26 +235,20 @@ def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_facto easy_track, trusted_caller_acc, top_up_evm_script_factory, - interface.Usdc(USDC_TOKEN), + token, [multisig_acc], [min(max_usdc_spend_at_once, to_spend_usdc)], stranger, ) - print("HERE1") - print (max_usdc_spend_at_once) - print (to_spend_usdc) to_spend_usdc -= min(max_usdc_spend_at_once, to_spend_usdc) - - print ('NEXT') - # make sure there is nothing left so that you can't spend anymore with reverts("SUM_EXCEEDS_SPENDABLE_BALANCE"): create_and_enact_payment_motion( easy_track, trusted_caller_acc, top_up_evm_script_factory, - interface.Usdc(USDC_TOKEN), + token, [multisig_acc], [1], stranger,