@@ -318,14 +318,17 @@ describe("SpokePool Relayer Logic", async function () {
318318 describe ( "fillV3Relay" , function ( ) {
319319 it ( "fills are not paused" , async function ( ) {
320320 await spokePool . pauseFills ( true ) ;
321- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( relayData , consts . repaymentChainId ) ) . to . be . revertedWith (
322- "FillsArePaused"
323- ) ;
321+ await expect (
322+ spokePool
323+ . connect ( relayer )
324+ . fillV3Relay ( relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
325+ ) . to . be . revertedWith ( "FillsArePaused" ) ;
324326 } ) ;
325327 it ( "reentrancy protected" , async function ( ) {
326328 const functionCalldata = spokePool . interface . encodeFunctionData ( "fillV3Relay" , [
327329 relayData ,
328330 consts . repaymentChainId ,
331+ hexZeroPadAddressLowercase ( relayer . address ) ,
329332 ] ) ;
330333 await expect ( spokePool . connect ( relayer ) . callback ( functionCalldata ) ) . to . be . revertedWith (
331334 "ReentrancyGuard: reentrant call"
@@ -338,19 +341,21 @@ describe("SpokePool Relayer Logic", async function () {
338341 exclusiveRelayer : hexZeroPadAddress ( recipient . address ) ,
339342 exclusivityDeadline : relayData . fillDeadline ,
340343 } ;
341- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( _relayData , consts . repaymentChainId ) ) . to . be . revertedWith (
342- "NotExclusiveRelayer"
343- ) ;
344+ await expect (
345+ spokePool
346+ . connect ( relayer )
347+ . fillV3Relay ( _relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
348+ ) . to . be . revertedWith ( "NotExclusiveRelayer" ) ;
344349
345350 // Can send it after exclusivity deadline
346351 await expect (
347- spokePool . connect ( relayer ) . fillV3Relay (
348- {
349- ... _relayData ,
350- exclusivityDeadline : 0 ,
351- } ,
352- consts . repaymentChainId
353- )
352+ spokePool
353+ . connect ( relayer )
354+ . fillV3Relay (
355+ { ... _relayData , exclusivityDeadline : 0 } ,
356+ consts . repaymentChainId ,
357+ hexZeroPadAddressLowercase ( relayer . address )
358+ )
354359 ) . to . not . be . reverted ;
355360 } ) ;
356361 it ( "if no exclusive relayer is set, exclusivity deadline can be in future" , async function ( ) {
@@ -361,7 +366,11 @@ describe("SpokePool Relayer Logic", async function () {
361366 } ;
362367
363368 // Can send it after exclusivity deadline
364- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( _relayData , consts . repaymentChainId ) ) . to . not . be . reverted ;
369+ await expect (
370+ spokePool
371+ . connect ( relayer )
372+ . fillV3Relay ( _relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
373+ ) . to . not . be . reverted ;
365374 } ) ;
366375 it ( "can have empty exclusive relayer before exclusivity deadline" , async function ( ) {
367376 const _relayData = {
@@ -371,10 +380,18 @@ describe("SpokePool Relayer Logic", async function () {
371380 } ;
372381
373382 // Can send it before exclusivity deadline if exclusive relayer is empty
374- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( _relayData , consts . repaymentChainId ) ) . to . not . be . reverted ;
383+ await expect (
384+ spokePool
385+ . connect ( relayer )
386+ . fillV3Relay ( _relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
387+ ) . to . not . be . reverted ;
375388 } ) ;
376389 it ( "calls _fillRelayV3 with expected params" , async function ( ) {
377- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( relayData , consts . repaymentChainId ) )
390+ await expect (
391+ spokePool
392+ . connect ( relayer )
393+ . fillV3Relay ( relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
394+ )
378395 . to . emit ( spokePool , "FilledV3Relay" )
379396 . withArgs (
380397 hexZeroPadAddressLowercase ( relayData . inputToken ) ,
@@ -430,6 +447,7 @@ describe("SpokePool Relayer Logic", async function () {
430447 . fillV3RelayWithUpdatedDeposit (
431448 _relayData ,
432449 consts . repaymentChainId ,
450+ hexZeroPadAddressLowercase ( relayer . address ) ,
433451 updatedOutputAmount ,
434452 hexZeroPadAddress ( updatedRecipient ) ,
435453 updatedMessage ,
@@ -445,6 +463,7 @@ describe("SpokePool Relayer Logic", async function () {
445463 exclusivityDeadline : 0 ,
446464 } ,
447465 consts . repaymentChainId ,
466+ hexZeroPadAddressLowercase ( relayer . address ) ,
448467 updatedOutputAmount ,
449468 hexZeroPadAddress ( updatedRecipient ) ,
450469 updatedMessage ,
@@ -464,6 +483,7 @@ describe("SpokePool Relayer Logic", async function () {
464483 . fillV3RelayWithUpdatedDeposit (
465484 relayData ,
466485 consts . repaymentChainId ,
486+ hexZeroPadAddressLowercase ( relayer . address ) ,
467487 updatedOutputAmount ,
468488 hexZeroPadAddress ( updatedRecipient ) ,
469489 updatedMessage ,
@@ -508,6 +528,7 @@ describe("SpokePool Relayer Logic", async function () {
508528 . fillV3RelayWithUpdatedDeposit (
509529 { ...relayData , depositor : hexZeroPadAddress ( relayer . address ) } ,
510530 consts . repaymentChainId ,
531+ hexZeroPadAddressLowercase ( relayer . address ) ,
511532 updatedOutputAmount ,
512533 hexZeroPadAddress ( updatedRecipient ) ,
513534 updatedMessage ,
@@ -530,6 +551,7 @@ describe("SpokePool Relayer Logic", async function () {
530551 . fillV3RelayWithUpdatedDeposit (
531552 relayData ,
532553 consts . repaymentChainId ,
554+ hexZeroPadAddressLowercase ( relayer . address ) ,
533555 updatedOutputAmount ,
534556 hexZeroPadAddress ( updatedRecipient ) ,
535557 updatedMessage ,
@@ -544,6 +566,7 @@ describe("SpokePool Relayer Logic", async function () {
544566 . fillV3RelayWithUpdatedDeposit (
545567 { ...relayData , originChainId : relayData . originChainId + 1 } ,
546568 consts . repaymentChainId ,
569+ hexZeroPadAddressLowercase ( relayer . address ) ,
547570 updatedOutputAmount ,
548571 hexZeroPadAddress ( updatedRecipient ) ,
549572 updatedMessage ,
@@ -558,6 +581,7 @@ describe("SpokePool Relayer Logic", async function () {
558581 . fillV3RelayWithUpdatedDeposit (
559582 { ...relayData , depositId : relayData . depositId + 1 } ,
560583 consts . repaymentChainId ,
584+ hexZeroPadAddressLowercase ( relayer . address ) ,
561585 updatedOutputAmount ,
562586 hexZeroPadAddress ( updatedRecipient ) ,
563587 updatedMessage ,
@@ -572,6 +596,7 @@ describe("SpokePool Relayer Logic", async function () {
572596 . fillV3RelayWithUpdatedDeposit (
573597 relayData ,
574598 consts . repaymentChainId ,
599+ hexZeroPadAddressLowercase ( relayer . address ) ,
575600 updatedOutputAmount . sub ( 1 ) ,
576601 hexZeroPadAddress ( updatedRecipient ) ,
577602 updatedMessage ,
@@ -586,6 +611,7 @@ describe("SpokePool Relayer Logic", async function () {
586611 . fillV3RelayWithUpdatedDeposit (
587612 relayData ,
588613 consts . repaymentChainId ,
614+ hexZeroPadAddressLowercase ( relayer . address ) ,
589615 updatedOutputAmount ,
590616 hexZeroPadAddress ( randomAddress ( ) ) ,
591617 updatedMessage ,
@@ -600,6 +626,7 @@ describe("SpokePool Relayer Logic", async function () {
600626 . fillV3RelayWithUpdatedDeposit (
601627 relayData ,
602628 consts . repaymentChainId ,
629+ hexZeroPadAddressLowercase ( relayer . address ) ,
603630 updatedOutputAmount ,
604631 hexZeroPadAddress ( updatedRecipient ) ,
605632 updatedMessage ,
@@ -624,6 +651,7 @@ describe("SpokePool Relayer Logic", async function () {
624651 . fillV3RelayWithUpdatedDeposit (
625652 { ...relayData , depositor : hexZeroPadAddress ( erc1271 . address ) } ,
626653 consts . repaymentChainId ,
654+ hexZeroPadAddressLowercase ( relayer . address ) ,
627655 updatedOutputAmount ,
628656 hexZeroPadAddress ( updatedRecipient ) ,
629657 updatedMessage ,
@@ -636,6 +664,7 @@ describe("SpokePool Relayer Logic", async function () {
636664 . fillV3RelayWithUpdatedDeposit (
637665 { ...relayData , depositor : hexZeroPadAddress ( erc1271 . address ) } ,
638666 consts . repaymentChainId ,
667+ hexZeroPadAddressLowercase ( relayer . address ) ,
639668 updatedOutputAmount ,
640669 hexZeroPadAddress ( updatedRecipient ) ,
641670 updatedMessage ,
@@ -644,13 +673,16 @@ describe("SpokePool Relayer Logic", async function () {
644673 ) . to . not . be . reverted ;
645674 } ) ;
646675 it ( "cannot send updated fill after original fill" , async function ( ) {
647- await spokePool . connect ( relayer ) . fillV3Relay ( relayData , consts . repaymentChainId ) ;
676+ await spokePool
677+ . connect ( relayer )
678+ . fillV3Relay ( relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) ) ;
648679 await expect (
649680 spokePool
650681 . connect ( relayer )
651682 . fillV3RelayWithUpdatedDeposit (
652683 relayData ,
653684 consts . repaymentChainId ,
685+ hexZeroPadAddressLowercase ( relayer . address ) ,
654686 updatedOutputAmount ,
655687 hexZeroPadAddress ( updatedRecipient ) ,
656688 updatedMessage ,
@@ -664,14 +696,17 @@ describe("SpokePool Relayer Logic", async function () {
664696 . fillV3RelayWithUpdatedDeposit (
665697 relayData ,
666698 consts . repaymentChainId ,
699+ hexZeroPadAddressLowercase ( relayer . address ) ,
667700 updatedOutputAmount ,
668701 hexZeroPadAddress ( updatedRecipient ) ,
669702 updatedMessage ,
670703 signature
671704 ) ;
672- await expect ( spokePool . connect ( relayer ) . fillV3Relay ( relayData , consts . repaymentChainId ) ) . to . be . revertedWith (
673- "RelayFilled"
674- ) ;
705+ await expect (
706+ spokePool
707+ . connect ( relayer )
708+ . fillV3Relay ( relayData , consts . repaymentChainId , hexZeroPadAddressLowercase ( relayer . address ) )
709+ ) . to . be . revertedWith ( "RelayFilled" ) ;
675710 } ) ;
676711 } ) ;
677712 } ) ;
0 commit comments