16
16
validate_node_operator_reward_address_set_event ,
17
17
NodeOperatorRewardAddressSetItem
18
18
)
19
- from configs .config_mainnet import ( USDC_TOKEN )
19
+ from configs .config_mainnet import ( USDC_TOKEN , USDT_TOKEN )
20
20
21
21
22
22
def test_vote (helpers , accounts , vote_ids_from_env , stranger ):
@@ -111,7 +111,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
111
111
assert atc_spend_limit_after == atcSpendLimitAfterExpected
112
112
assert interface .AllowedRecipientRegistry (atc_allowed_recipients_registry ).isUnderSpendableBalance (atcSpendableBalanceAfter , 3 )
113
113
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 ) )
115
115
116
116
# Item 2
117
117
pmlBudgetLimitAfter , pmlPeriodDurationMonthsAfter = interface .AllowedRecipientRegistry (pml_allowed_recipients_registry ).getLimitParameters ()
@@ -122,8 +122,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
122
122
assert pml_spend_limit_after == pmlSpendLimitAfterExpected
123
123
assert interface .AllowedRecipientRegistry (pml_allowed_recipients_registry ).isUnderSpendableBalance (pmlSpendableBalanceAfter , 3 )
124
124
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))
127
126
128
127
# Item 3
129
128
tmcBudgetLimitAfter , tmcPeriodDurationMonthsAfter = interface .AllowedRecipientRegistry (tmc_allowed_recipients_registry ).getLimitParameters ()
@@ -211,7 +210,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, stranger):
211
210
)
212
211
)
213
212
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 ):
215
214
216
215
# can't spend more than 2M USDC at once
217
216
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
224
223
easy_track ,
225
224
trusted_caller_acc ,
226
225
top_up_evm_script_factory ,
227
- interface . Usdc ( USDC_TOKEN ) ,
226
+ token ,
228
227
[multisig_acc ],
229
228
[to_spend_usdc + 1 ],
230
229
stranger ,
@@ -236,26 +235,20 @@ def limit_test(easy_track, to_spend, trusted_caller_acc, top_up_evm_script_facto
236
235
easy_track ,
237
236
trusted_caller_acc ,
238
237
top_up_evm_script_factory ,
239
- interface . Usdc ( USDC_TOKEN ) ,
238
+ token ,
240
239
[multisig_acc ],
241
240
[min (max_usdc_spend_at_once , to_spend_usdc )],
242
241
stranger ,
243
242
)
244
- print ("HERE1" )
245
- print (max_usdc_spend_at_once )
246
- print (to_spend_usdc )
247
243
to_spend_usdc -= min (max_usdc_spend_at_once , to_spend_usdc )
248
244
249
-
250
- print ('NEXT' )
251
-
252
245
# make sure there is nothing left so that you can't spend anymore
253
246
with reverts ("SUM_EXCEEDS_SPENDABLE_BALANCE" ):
254
247
create_and_enact_payment_motion (
255
248
easy_track ,
256
249
trusted_caller_acc ,
257
250
top_up_evm_script_factory ,
258
- interface . Usdc ( USDC_TOKEN ) ,
251
+ token ,
259
252
[multisig_acc ],
260
253
[1 ],
261
254
stranger ,
0 commit comments