@@ -109,6 +109,30 @@ describe("ZkSync Spoke Pool", function () {
109109 await zkSyncSpokePool . connect ( crossDomainAlias ) . setZkBridge ( rando . address ) ;
110110 expect ( await zkSyncSpokePool . zkErc20Bridge ( ) ) . to . equal ( rando . address ) ;
111111 } ) ;
112+ it ( "Invalid USDC bridge configuration is rejected" , async function ( ) {
113+ let _constructorArgs = [ ...constructorArgs ] ;
114+ expect ( _constructorArgs [ 1 ] ) . to . equal ( usdc . address ) ;
115+ expect ( _constructorArgs [ 2 ] ) . to . equal ( zkUSDCBridge . address ) ;
116+ expect ( _constructorArgs [ 3 ] ) . to . equal ( cctpTokenMessenger ) ;
117+
118+ // Verify successful deployment.
119+ let implementation = hre . upgrades . deployImplementation ( await getContractFactory ( "ZkSync_SpokePool" , owner ) , {
120+ kind : "uups" ,
121+ unsafeAllow : [ "delegatecall" ] ,
122+ constructorArgs : _constructorArgs ,
123+ } ) ;
124+ await expect ( implementation ) . to . not . be . reverted ;
125+
126+ _constructorArgs [ 2 ] = ZERO_ADDRESS ;
127+ _constructorArgs [ 3 ] = ZERO_ADDRESS ;
128+
129+ implementation = hre . upgrades . deployImplementation ( await getContractFactory ( "ZkSync_SpokePool" , owner ) , {
130+ kind : "uups" ,
131+ unsafeAllow : [ "delegatecall" ] ,
132+ constructorArgs : _constructorArgs ,
133+ } ) ;
134+ await expect ( implementation ) . to . be . reverted ;
135+ } ) ;
112136 it ( "Only cross domain owner can relay admin root bundles" , async function ( ) {
113137 const { tree } = await constructSingleRelayerRefundTree ( l2Dai , await zkSyncSpokePool . callStatic . chainId ( ) ) ;
114138 await expect ( zkSyncSpokePool . relayRootBundle ( tree . getHexRoot ( ) , mockTreeRoot ) ) . to . be . revertedWith (
0 commit comments