@@ -24,6 +24,7 @@ mod token_bridge_admin_test {
2424 ITokenBridgeAdminDispatcher , ITokenBridgeAdminDispatcherTrait
2525 };
2626
27+ const DEFAULT_DEPOSITOR_ETH_ADDRESS : felt252 = 7 ;
2728 // TODO change the name of deploy_and_prepare.
2829
2930 // Deploys the token bridge and sets the caller as the App Governer (and as App Role Admin).
@@ -189,14 +190,19 @@ mod token_bridge_admin_test {
189190 #[available_gas(30000000)]
190191 fn test_successful_initiate_token_withdraw_with_limits_one_withdrawal () {
191192 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
192-
193+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
193194 let token_bridge_address = deploy_token_bridge ();
194195
195196 // Deploy a new token and deposit funds to this token.
196197 let l2_recipient = initial_owner ();
197198 let amount_to_deposit = default_amount ();
198199 deploy_new_token_and_deposit (
199- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
200+ : token_bridge_address ,
201+ : l1_bridge_address ,
202+ : l1_token ,
203+ : depositor ,
204+ : l2_recipient ,
205+ : amount_to_deposit
200206 );
201207
202208 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -218,14 +224,19 @@ mod token_bridge_admin_test {
218224 #[available_gas(30000000)]
219225 fn test_successful_initiate_token_withdraw_with_limits_two_withdrawals () {
220226 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
221-
227+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
222228 let token_bridge_address = deploy_token_bridge ();
223229
224230 // Deploy a new token and deposit funds to this token.
225231 let l2_recipient = initial_owner ();
226232 let amount_to_deposit = default_amount ();
227233 deploy_new_token_and_deposit (
228- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
234+ : token_bridge_address ,
235+ : l1_bridge_address ,
236+ : l1_token ,
237+ : depositor ,
238+ : l2_recipient ,
239+ : amount_to_deposit
229240 );
230241
231242 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -258,14 +269,19 @@ mod token_bridge_admin_test {
258269 #[available_gas(30000000)]
259270 fn test_successful_initiate_token_withdraw_with_and_without_limits () {
260271 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
261-
272+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
262273 let token_bridge_address = deploy_token_bridge ();
263274
264275 // Deploy a new token and deposit funds to this token.
265276 let l2_recipient = initial_owner ();
266277 let amount_to_deposit = default_amount ();
267278 deploy_new_token_and_deposit (
268- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
279+ : token_bridge_address ,
280+ : l1_bridge_address ,
281+ : l1_token ,
282+ : depositor ,
283+ : l2_recipient ,
284+ : amount_to_deposit
269285 );
270286
271287 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -312,14 +328,19 @@ mod token_bridge_admin_test {
312328 #[should_panic(expected: (' LIMIT_EXCEEDED' , ' ENTRYPOINT_FAILED' ,))]
313329 fn test_failed_initiate_token_withdraw_with_and_without_limits () {
314330 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
315-
331+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
316332 let token_bridge_address = deploy_token_bridge ();
317333
318334 // Deploy a new token and deposit funds to this token.
319335 let l2_recipient = initial_owner ();
320336 let amount_to_deposit = default_amount ();
321337 deploy_new_token_and_deposit (
322- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
338+ : token_bridge_address ,
339+ : l1_bridge_address ,
340+ : l1_token ,
341+ : depositor ,
342+ : l2_recipient ,
343+ : amount_to_deposit
323344 );
324345
325346 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -357,7 +378,7 @@ mod token_bridge_admin_test {
357378 #[available_gas(30000000)]
358379 fn test_successful_initiate_token_withdraw_with_limits_different_days () {
359380 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
360-
381+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
361382 let token_bridge_address = deploy_token_bridge ();
362383 set_caller_as_app_role_admin_app_governor (: token_bridge_address );
363384 let token_bridge_admin = get_token_bridge_admin (: token_bridge_address );
@@ -367,7 +388,12 @@ mod token_bridge_admin_test {
367388 let l2_recipient = initial_owner ();
368389 let amount_to_deposit = default_amount ();
369390 deploy_new_token_and_deposit (
370- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
391+ : token_bridge_address ,
392+ : l1_bridge_address ,
393+ : l1_token ,
394+ : depositor ,
395+ : l2_recipient ,
396+ : amount_to_deposit
371397 );
372398
373399 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -406,14 +432,19 @@ mod token_bridge_admin_test {
406432 #[available_gas(30000000)]
407433 fn test_successful_initiate_token_withdraw_with_limits_same_day_differnet_time () {
408434 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
409-
435+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
410436 let token_bridge_address = deploy_token_bridge ();
411437
412438 // Deploy a new token and deposit funds to this token.
413439 let l2_recipient = initial_owner ();
414440 let amount_to_deposit = default_amount ();
415441 deploy_new_token_and_deposit (
416- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
442+ : token_bridge_address ,
443+ : l1_bridge_address ,
444+ : l1_token ,
445+ : depositor ,
446+ : l2_recipient ,
447+ : amount_to_deposit
417448 );
418449
419450 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -453,14 +484,19 @@ mod token_bridge_admin_test {
453484 #[should_panic(expected: (' LIMIT_EXCEEDED' , ' ENTRYPOINT_FAILED' ,))]
454485 fn test_failed_initiate_token_withdraw_limit_exceeded_one_withdrawal () {
455486 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
456-
487+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
457488 let token_bridge_address = deploy_token_bridge ();
458489
459490 // Deploy a new token and deposit funds to this token.
460491 let l2_recipient = initial_owner ();
461492 let amount_to_deposit = default_amount ();
462493 deploy_new_token_and_deposit (
463- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
494+ : token_bridge_address ,
495+ : l1_bridge_address ,
496+ : l1_token ,
497+ : depositor ,
498+ : l2_recipient ,
499+ : amount_to_deposit
464500 );
465501
466502 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -481,14 +517,19 @@ mod token_bridge_admin_test {
481517 #[should_panic(expected: (' LIMIT_EXCEEDED' , ' ENTRYPOINT_FAILED' ,))]
482518 fn test_failed_initiate_token_withdraw_limit_exceeded_two_withdrawals () {
483519 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
484-
520+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
485521 let token_bridge_address = deploy_token_bridge ();
486522
487523 // Deploy a new token and deposit funds to this token.
488524 let l2_recipient = initial_owner ();
489525 let amount_to_deposit = default_amount ();
490526 deploy_new_token_and_deposit (
491- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
527+ : token_bridge_address ,
528+ : l1_bridge_address ,
529+ : l1_token ,
530+ : depositor ,
531+ : l2_recipient ,
532+ : amount_to_deposit
492533 );
493534
494535 enable_withdrawal_limit (: token_bridge_address , : l1_token );
@@ -517,14 +558,19 @@ mod token_bridge_admin_test {
517558 #[should_panic(expected: (' LIMIT_EXCEEDED' , ' ENTRYPOINT_FAILED' ,))]
518559 fn test_failed_initiate_token_withdraw_limit_exceeded_same_day_different_time () {
519560 let (l1_bridge_address , l1_token , l1_recipient ) = get_default_l1_addresses ();
520-
561+ let depositor = EthAddress { address : DEFAULT_DEPOSITOR_ETH_ADDRESS };
521562 let token_bridge_address = deploy_token_bridge ();
522563
523564 // Deploy a new token and deposit funds to this token.
524565 let l2_recipient = initial_owner ();
525566 let amount_to_deposit = default_amount ();
526567 deploy_new_token_and_deposit (
527- : token_bridge_address , : l1_bridge_address , : l1_token , : l2_recipient , : amount_to_deposit
568+ : token_bridge_address ,
569+ : l1_bridge_address ,
570+ : l1_token ,
571+ : depositor ,
572+ : l2_recipient ,
573+ : amount_to_deposit
528574 );
529575
530576 // Limit the withdrawal amount.
0 commit comments