Skip to content

Commit cbfdc88

Browse files
author
Nikita P
committed
feat: fixed comments
1 parent 5e91ebf commit cbfdc88

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

tests/test_2024_11_26.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
validate_node_operator_reward_address_set_event,
1717
NodeOperatorRewardAddressSetItem
1818
)
19-
from configs.config_mainnet import ( USDC_TOKEN )
19+
from configs.config_mainnet import ( USDC_TOKEN, USDT_TOKEN )
2020

2121

2222
def test_vote(helpers, accounts, vote_ids_from_env, stranger):
@@ -111,7 +111,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
111111
assert atc_spend_limit_after == atcSpendLimitAfterExpected
112112
assert interface.AllowedRecipientRegistry(atc_allowed_recipients_registry).isUnderSpendableBalance(atcSpendableBalanceAfter, 3)
113113
assert atcSpendableBalanceAfter == atcSpendLimitAfterExpected
114-
limit_test(easy_track, int(atcSpendableBalanceAfter / (10**18)), atc_trusted_caller_acc, atc_top_up_evm_script_factory, atc_multisig_acc, stranger)
114+
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))
115115

116116
# Item 2
117117
pmlBudgetLimitAfter, pmlPeriodDurationMonthsAfter = interface.AllowedRecipientRegistry(pml_allowed_recipients_registry).getLimitParameters()
@@ -122,8 +122,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
122122
assert pml_spend_limit_after == pmlSpendLimitAfterExpected
123123
assert interface.AllowedRecipientRegistry(pml_allowed_recipients_registry).isUnderSpendableBalance(pmlSpendableBalanceAfter, 3)
124124
assert pmlSpendableBalanceAfter == pmlSpendLimitAfterExpected
125-
# TODO
126-
#limit_test(easy_track, int(pmlSpendableBalanceAfter / (10**18)), pml_trusted_caller_acc, pml_top_up_evm_script_factory, pml_multisig_acc, stranger)
125+
#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))
127126

128127
# Item 3
129128
tmcBudgetLimitAfter, tmcPeriodDurationMonthsAfter = interface.AllowedRecipientRegistry(tmc_allowed_recipients_registry).getLimitParameters()
@@ -211,7 +210,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
211210
)
212211
)
213212

214-
def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_factory, multisig_acc, stranger):
213+
def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_factory, multisig_acc, stranger, token):
215214

216215
# can't spend more than 2M USDC at once
217216
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
224223
easy_track,
225224
trusted_caller_acc,
226225
top_up_evm_script_factory,
227-
interface.Usdc(USDC_TOKEN),
226+
token,
228227
[multisig_acc],
229228
[to_spend_usdc + 1],
230229
stranger,
@@ -236,26 +235,20 @@ def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_facto
236235
easy_track,
237236
trusted_caller_acc,
238237
top_up_evm_script_factory,
239-
interface.Usdc(USDC_TOKEN),
238+
token,
240239
[multisig_acc],
241240
[min(max_usdc_spend_at_once, to_spend_usdc)],
242241
stranger,
243242
)
244-
print("HERE1")
245-
print (max_usdc_spend_at_once)
246-
print (to_spend_usdc)
247243
to_spend_usdc -= min(max_usdc_spend_at_once, to_spend_usdc)
248244

249-
250-
print ('NEXT')
251-
252245
# make sure there is nothing left so that you can't spend anymore
253246
with reverts("SUM_EXCEEDS_SPENDABLE_BALANCE"):
254247
create_and_enact_payment_motion(
255248
easy_track,
256249
trusted_caller_acc,
257250
top_up_evm_script_factory,
258-
interface.Usdc(USDC_TOKEN),
251+
token,
259252
[multisig_acc],
260253
[1],
261254
stranger,

0 commit comments

Comments
 (0)