@@ -1358,6 +1358,58 @@ contract SuperformERC4626FormTest is ProtocolActions {
1358
1358
ERC4626Form (payable (superform)).emergencyWithdraw (address (0 ), 0 );
1359
1359
}
1360
1360
1361
+ function test_xChainDepositIntoVault_InvalidChainId () public {
1362
+ vm.selectFork (FORKS[ETH]);
1363
+
1364
+ address superform = getContract (
1365
+ ETH, string .concat ("DAI " , "VaultMock " , "Superform " , Strings.toString (FORM_IMPLEMENTATION_IDS[0 ]))
1366
+ );
1367
+
1368
+ uint256 superformId = DataLib.packSuperform (superform, FORM_IMPLEMENTATION_IDS[0 ], ETH);
1369
+ InitSingleVaultData memory data = InitSingleVaultData (
1370
+ 0 ,
1371
+ superformId,
1372
+ 0 ,
1373
+ 0 ,
1374
+ 0 ,
1375
+ LiqRequest (bytes ("" ), address (0 ), address (0 ), 0 , 0 , 0 ),
1376
+ false ,
1377
+ false ,
1378
+ address (0 ),
1379
+ ""
1380
+ );
1381
+
1382
+ vm.expectRevert (Error.INVALID_CHAIN_ID.selector );
1383
+ vm.prank (getContract (ETH, "CoreStateRegistry " ));
1384
+ ERC4626Form (payable (superform)).xChainDepositIntoVault (data, users[0 ], 0 );
1385
+ }
1386
+
1387
+ function test_xChainWithdrawFromVault_InvalidChainId () public {
1388
+ vm.selectFork (FORKS[ETH]);
1389
+
1390
+ address superform = getContract (
1391
+ ETH, string .concat ("DAI " , "VaultMock " , "Superform " , Strings.toString (FORM_IMPLEMENTATION_IDS[0 ]))
1392
+ );
1393
+
1394
+ uint256 superformId = DataLib.packSuperform (superform, FORM_IMPLEMENTATION_IDS[0 ], ETH);
1395
+ InitSingleVaultData memory data = InitSingleVaultData (
1396
+ 0 ,
1397
+ superformId,
1398
+ 0 ,
1399
+ 0 ,
1400
+ 0 ,
1401
+ LiqRequest (bytes ("" ), address (0 ), address (0 ), 0 , 0 , 0 ),
1402
+ false ,
1403
+ false ,
1404
+ address (0 ),
1405
+ ""
1406
+ );
1407
+
1408
+ vm.expectRevert (Error.INVALID_CHAIN_ID.selector );
1409
+ vm.prank (getContract (ETH, "CoreStateRegistry " ));
1410
+ ERC4626Form (payable (superform)).xChainWithdrawFromVault (data, users[0 ], 0 );
1411
+ }
1412
+
1361
1413
/*///////////////////////////////////////////////////////////////
1362
1414
INTERNAL FUNCTIONS
1363
1415
//////////////////////////////////////////////////////////////*/
0 commit comments