From 55d9d7db8eb787a44ee0e9fdf7efbe3d4cb34bb9 Mon Sep 17 00:00:00 2001 From: Faisal Usmani Date: Thu, 19 Mar 2026 14:11:38 -0400 Subject: [PATCH 1/5] chore: Remove revert strings from tests profile Signed-off-by: Faisal Usmani --- foundry.toml | 1 - test/evm/foundry/local/BondToken_Admin.t.sol | 8 ++--- test/evm/foundry/local/BondToken_E2E.t.sol | 4 +-- test/evm/foundry/local/ConfigStore.t.sol | 4 +-- test/evm/foundry/local/HubPool_Admin.t.sol | 32 +++++++++---------- .../local/HubPool_DisputeRootBundle.t.sol | 4 +-- .../local/HubPool_ExecuteRootBundle.t.sol | 12 +++---- .../local/HubPool_LiquidityProvision.t.sol | 4 +-- .../local/HubPool_ProposeRootBundle.t.sol | 4 +-- .../foundry/local/HubPool_ProtocolFees.t.sol | 4 +-- test/evm/foundry/local/HyperCoreLib.t.sol | 4 +-- .../local/MultiCallerUpgradeable.t.sol | 6 ---- .../local/PermissionSplitterProxy.t.sol | 10 +++--- test/evm/foundry/local/SP1Helios.t.sol | 14 +++----- .../SpokePool_ClaimRelayerRefund.t.sol | 4 +-- .../local/spokepool/SpokePool_Deposit.t.sol | 2 +- .../local/spokepool/SpokePool_Relay.t.sol | 2 +- .../local/spokepool/SpokePool_SlowRelay.t.sol | 4 +-- .../local/spokepool/SpokePool_Upgrades.t.sol | 4 +-- .../chain-specific/Arbitrum_SpokePool.t.sol | 4 +-- .../chain-specific/Ethereum_SpokePool.t.sol | 10 +++--- .../chain-specific/Linea_SpokePool.t.sol | 8 ++--- .../chain-specific/Polygon_SpokePool.t.sol | 18 ++++++++--- .../chain-specific/Scroll_SpokePool.t.sol | 10 +++--- .../chain-specific/ZkSync_SpokePool.t.sol | 11 +++++-- 25 files changed, 93 insertions(+), 95 deletions(-) diff --git a/foundry.toml b/foundry.toml index f270531b0..85e590548 100644 --- a/foundry.toml +++ b/foundry.toml @@ -71,7 +71,6 @@ ethereum = { key = "${ETHERSCAN_API_KEY}" } # A profile to only run foundry local tests, skipping fork tests. These tests are run in CI. Run with `FOUNDRY_PROFILE=local-test forge test` [profile.local-test] test = "test/evm/foundry/local" -revert_strings = "default" cache_path = "cache-foundry-local" out = "out-local" diff --git a/test/evm/foundry/local/BondToken_Admin.t.sol b/test/evm/foundry/local/BondToken_Admin.t.sol index 4fa7b0819..ffcc1045d 100644 --- a/test/evm/foundry/local/BondToken_Admin.t.sol +++ b/test/evm/foundry/local/BondToken_Admin.t.sol @@ -59,25 +59,25 @@ contract BondToken_AdminTest is Test { // Try enabling as proposer - should revert vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); bondToken.setProposer(other, true); assertFalse(bondToken.proposers(other)); // Try disabling as proposer - should revert vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); bondToken.setProposer(other, false); assertFalse(bondToken.proposers(other)); // Try enabling again - should revert vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); bondToken.setProposer(other, true); assertFalse(bondToken.proposers(other)); // Try disabling again - should revert vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); bondToken.setProposer(other, false); assertFalse(bondToken.proposers(other)); } diff --git a/test/evm/foundry/local/BondToken_E2E.t.sol b/test/evm/foundry/local/BondToken_E2E.t.sol index 35e7b39c8..1fc1b5083 100644 --- a/test/evm/foundry/local/BondToken_E2E.t.sol +++ b/test/evm/foundry/local/BondToken_E2E.t.sol @@ -236,7 +236,7 @@ contract BondToken_E2ETest is HubPoolTestBase { assertFalse(bondToken.proposers(dataworker)); // Proposal should fail; balances unchanged - vm.expectRevert("Transfer not permitted"); + vm.expectRevert(); _proposeRootBundleFrom(dataworker); assertEq(bondToken.balanceOf(address(fixture.hubPool)), hubPoolBal); @@ -407,7 +407,7 @@ contract BondToken_E2ETest is HubPoolTestBase { _seedBondToken(other, BOND_AMOUNT); assertEq(bondToken.balanceOf(other), BOND_AMOUNT); - vm.expectRevert("Transfer not permitted"); + vm.expectRevert(); _proposeRootBundleFrom(other); } diff --git a/test/evm/foundry/local/ConfigStore.t.sol b/test/evm/foundry/local/ConfigStore.t.sol index 0daad0f9f..277289e28 100644 --- a/test/evm/foundry/local/ConfigStore.t.sol +++ b/test/evm/foundry/local/ConfigStore.t.sol @@ -46,7 +46,7 @@ contract ConfigStore_Test is Test { // Non-owner cannot update token config vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); configStore.updateTokenConfig(l1Token, SAMPLE_RATE_MODEL_JSON); // Owner can update token config @@ -61,7 +61,7 @@ contract ConfigStore_Test is Test { function test_UpdatingGlobalConfig() public { // Non-owner cannot update global config vm.prank(other); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); configStore.updateGlobalConfig(MAX_POOL_REBALANCE_LEAF_SIZE_KEY, MAX_REFUNDS_VALUE); // Owner can update global config diff --git a/test/evm/foundry/local/HubPool_Admin.t.sol b/test/evm/foundry/local/HubPool_Admin.t.sol index b61b7d52f..7b0caf305 100644 --- a/test/evm/foundry/local/HubPool_Admin.t.sol +++ b/test/evm/foundry/local/HubPool_Admin.t.sol @@ -70,7 +70,7 @@ contract HubPool_AdminTest is HubPoolTestBase { function test_EnableL1Token_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.enableL1TokenForLiquidityProvision(address(fixture.weth)); } @@ -105,7 +105,7 @@ contract HubPool_AdminTest is HubPoolTestBase { fixture.hubPool.enableL1TokenForLiquidityProvision(address(fixture.weth)); vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.disableL1TokenForLiquidityProvision(address(fixture.weth)); } @@ -113,7 +113,7 @@ contract HubPool_AdminTest is HubPoolTestBase { function test_SetCrossChainContracts_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setCrossChainContracts(DESTINATION_CHAIN_ID, address(mockAdapter), mockSpoke); } @@ -123,7 +123,7 @@ contract HubPool_AdminTest is HubPoolTestBase { bytes memory functionData = abi.encodeWithSignature("pauseDeposits(bool)", true); vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.relaySpokePoolAdminFunction(DESTINATION_CHAIN_ID, functionData); } @@ -133,7 +133,7 @@ contract HubPool_AdminTest is HubPoolTestBase { // Set spoke to zero address fixture.hubPool.setCrossChainContracts(DESTINATION_CHAIN_ID, address(mockAdapter), address(0)); - vm.expectRevert("SpokePool not initialized"); + vm.expectRevert(); fixture.hubPool.relaySpokePoolAdminFunction(DESTINATION_CHAIN_ID, functionData); } @@ -144,7 +144,7 @@ contract HubPool_AdminTest is HubPoolTestBase { address randomAddr = makeAddr("random"); fixture.hubPool.setCrossChainContracts(DESTINATION_CHAIN_ID, randomAddr, mockSpoke); - vm.expectRevert("Adapter not initialized"); + vm.expectRevert(); fixture.hubPool.relaySpokePoolAdminFunction(DESTINATION_CHAIN_ID, functionData); } @@ -179,7 +179,7 @@ contract HubPool_AdminTest is HubPoolTestBase { } function test_SetBond_RevertsIfZeroAmount() public { - vm.expectRevert("bond equal to final fee"); + vm.expectRevert(); fixture.hubPool.setBond(IERC20(address(fixture.usdc)), 0); } @@ -193,20 +193,20 @@ contract HubPool_AdminTest is HubPoolTestBase { fixture.hubPool.proposeRootBundle(bundleEvaluationBlockNumbers, 5, mockRoot, mockRoot, mockRoot); // Attempt to change bond should revert - vm.expectRevert("Proposal has unclaimed leaves"); + vm.expectRevert(); fixture.hubPool.setBond(IERC20(address(fixture.usdc)), 1000e6); } function test_SetBond_RevertsIfNotWhitelisted() public { address randomToken = makeAddr("randomToken"); - vm.expectRevert("Not on whitelist"); + vm.expectRevert(); fixture.hubPool.setBond(IERC20(randomToken), 1000); } function test_SetBond_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setBond(IERC20(address(fixture.usdc)), 1000e6); } @@ -227,7 +227,7 @@ contract HubPool_AdminTest is HubPoolTestBase { function test_SetIdentifier_RevertsIfNotSupported() public { bytes32 unsupportedIdentifier = bytes32("UNSUPPORTED"); - vm.expectRevert("Identifier not supported"); + vm.expectRevert(); fixture.hubPool.setIdentifier(unsupportedIdentifier); } @@ -236,7 +236,7 @@ contract HubPool_AdminTest is HubPoolTestBase { fixture.identifierWhitelist.addSupportedIdentifier(newIdentifier); vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setIdentifier(newIdentifier); } @@ -251,13 +251,13 @@ contract HubPool_AdminTest is HubPoolTestBase { } function test_SetLiveness_RevertsIfTooShort() public { - vm.expectRevert("Liveness too short"); + vm.expectRevert(); fixture.hubPool.setLiveness(599); } function test_SetLiveness_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setLiveness(1000000); } @@ -272,7 +272,7 @@ contract HubPool_AdminTest is HubPoolTestBase { function test_SetPaused_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setPaused(true); } @@ -335,7 +335,7 @@ contract HubPool_AdminTest is HubPoolTestBase { function test_EmergencyDeleteProposal_RevertsIfNotOwner() public { vm.prank(otherUser); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.emergencyDeleteProposal(); } diff --git a/test/evm/foundry/local/HubPool_DisputeRootBundle.t.sol b/test/evm/foundry/local/HubPool_DisputeRootBundle.t.sol index 93d3b346d..998358240 100644 --- a/test/evm/foundry/local/HubPool_DisputeRootBundle.t.sol +++ b/test/evm/foundry/local/HubPool_DisputeRootBundle.t.sol @@ -116,7 +116,7 @@ contract HubPool_DisputeRootBundleTest is HubPoolTestBase { vm.warp(block.timestamp + REFUND_PROPOSAL_LIVENESS + 1); vm.prank(dataWorker); - vm.expectRevert("Request passed liveness"); + vm.expectRevert(); fixture.hubPool.disputeRootBundle(); } @@ -265,7 +265,7 @@ contract HubPool_DisputeRootBundleTest is HubPoolTestBase { // Attempting to dispute should fail because challengePeriodEndTimestamp is 0 // and currentTime > 0 vm.prank(dataWorker); - vm.expectRevert("Request passed liveness"); + vm.expectRevert(); fixture.hubPool.disputeRootBundle(); } } diff --git a/test/evm/foundry/local/HubPool_ExecuteRootBundle.t.sol b/test/evm/foundry/local/HubPool_ExecuteRootBundle.t.sol index 434df9667..fde0a7bae 100644 --- a/test/evm/foundry/local/HubPool_ExecuteRootBundle.t.sol +++ b/test/evm/foundry/local/HubPool_ExecuteRootBundle.t.sol @@ -420,7 +420,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { vm.warp(block.timestamp + REFUND_PROPOSAL_LIVENESS + 1); - vm.expectRevert("SpokePool not initialized"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( leaves[0].chainId, @@ -444,7 +444,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { vm.warp(block.timestamp + REFUND_PROPOSAL_LIVENESS + 1); - vm.expectRevert("Adapter not initialized"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( leaves[0].chainId, @@ -468,7 +468,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { vm.warp(block.timestamp + REFUND_PROPOSAL_LIVENESS + 1); - vm.expectRevert("Route not whitelisted"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( leaves[0].chainId, @@ -490,7 +490,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { // Warp to 10 seconds before liveness ends vm.warp(block.timestamp + REFUND_PROPOSAL_LIVENESS - 10); - vm.expectRevert("Not passed liveness"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( leaves[0].chainId, @@ -518,7 +518,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { HubPoolInterface.PoolRebalanceLeaf memory badLeaf = leaves[0]; badLeaf.chainId = 13371; - vm.expectRevert("Bad Proof"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( badLeaf.chainId, @@ -542,7 +542,7 @@ contract HubPool_ExecuteRootBundleTest is HubPoolTestBase { _executeLeaf(leaves[0], _getMerkleProof(leaves, 0)); // Second claim should fail - vm.expectRevert("Already claimed"); + vm.expectRevert(); vm.prank(dataWorker); fixture.hubPool.executeRootBundle( leaves[0].chainId, diff --git a/test/evm/foundry/local/HubPool_LiquidityProvision.t.sol b/test/evm/foundry/local/HubPool_LiquidityProvision.t.sol index 321d96302..0a2e714bb 100644 --- a/test/evm/foundry/local/HubPool_LiquidityProvision.t.sol +++ b/test/evm/foundry/local/HubPool_LiquidityProvision.t.sol @@ -213,10 +213,10 @@ contract HubPool_LiquidityProvisionTest is HubPoolTestBase { fixture.hubPool.setPaused(true); vm.prank(liquidityProvider); fixture.weth.approve(address(fixture.hubPool), AMOUNT_TO_LP); - vm.expectRevert("Contract is paused"); + vm.expectRevert(); vm.prank(liquidityProvider); fixture.hubPool.addLiquidity(address(fixture.weth), AMOUNT_TO_LP); - vm.expectRevert("Contract is paused"); + vm.expectRevert(); vm.prank(liquidityProvider); fixture.hubPool.removeLiquidity(address(fixture.weth), AMOUNT_TO_LP, false); } diff --git a/test/evm/foundry/local/HubPool_ProposeRootBundle.t.sol b/test/evm/foundry/local/HubPool_ProposeRootBundle.t.sol index cf861696a..70c1e9e70 100644 --- a/test/evm/foundry/local/HubPool_ProposeRootBundle.t.sol +++ b/test/evm/foundry/local/HubPool_ProposeRootBundle.t.sol @@ -116,7 +116,7 @@ contract HubPool_ProposeRootBundleTest is HubPoolTestBase { fixture.weth.deposit{ value: totalBond }(); vm.prank(dataWorker); - vm.expectRevert("Proposal has unclaimed leaves"); + vm.expectRevert(); fixture.hubPool.proposeRootBundle( mockBundleEvaluationBlockNumbers, MOCK_POOL_REBALANCE_LEAF_COUNT, @@ -144,7 +144,7 @@ contract HubPool_ProposeRootBundleTest is HubPoolTestBase { blockNumbers[2] = 3; bytes32 mockTreeRoot = keccak256("mockTreeRoot"); - vm.expectRevert("Contract is paused"); + vm.expectRevert(); fixture.hubPool.proposeRootBundle(blockNumbers, 5, mockTreeRoot, mockTreeRoot, mockSlowRelayRoot); } } diff --git a/test/evm/foundry/local/HubPool_ProtocolFees.t.sol b/test/evm/foundry/local/HubPool_ProtocolFees.t.sol index cca1207c7..edf72e8b9 100644 --- a/test/evm/foundry/local/HubPool_ProtocolFees.t.sol +++ b/test/evm/foundry/local/HubPool_ProtocolFees.t.sol @@ -79,7 +79,7 @@ contract HubPool_ProtocolFeesTest is HubPoolTestBase { function test_OnlyOwnerCanSetProtocolFeeCapture() public { vm.prank(liquidityProvider); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); fixture.hubPool.setProtocolFeeCapture(liquidityProvider, 0.1 ether); } @@ -90,7 +90,7 @@ contract HubPool_ProtocolFeesTest is HubPoolTestBase { uint256 newPct = 0.1 ether; // Can't set to 0 address - vm.expectRevert("Bad protocolFeeCaptureAddress"); + vm.expectRevert(); fixture.hubPool.setProtocolFeeCapture(address(0), newPct); fixture.hubPool.setProtocolFeeCapture(liquidityProvider, newPct); diff --git a/test/evm/foundry/local/HyperCoreLib.t.sol b/test/evm/foundry/local/HyperCoreLib.t.sol index e4770ca73..4f67ee921 100644 --- a/test/evm/foundry/local/HyperCoreLib.t.sol +++ b/test/evm/foundry/local/HyperCoreLib.t.sol @@ -28,7 +28,7 @@ contract HyperCoreLibTest is Test { function testMaximumEVMSendAmountToAmounts_RevertsWhenCoreAmountExceedsUint64Max_ZeroDecimalDiff() public { uint256 tooLargeAmount = uint256(type(uint64).max) + 1; - vm.expectRevert("SafeCast: value doesn't fit in 64 bits"); + vm.expectRevert(); wrapper.maximumEVMSendAmountToAmounts(tooLargeAmount, 0); } @@ -55,7 +55,7 @@ contract HyperCoreLibTest is Test { uint256 evmAmount = uint256(type(uint64).max / 1e6) + 1; // Just over the limit int8 decimalDiff = -6; - vm.expectRevert("SafeCast: value doesn't fit in 64 bits"); + vm.expectRevert(); wrapper.maximumEVMSendAmountToAmounts(evmAmount, decimalDiff); } diff --git a/test/evm/foundry/local/MultiCallerUpgradeable.t.sol b/test/evm/foundry/local/MultiCallerUpgradeable.t.sol index 1cfdc0a80..a8a4ed53e 100644 --- a/test/evm/foundry/local/MultiCallerUpgradeable.t.sol +++ b/test/evm/foundry/local/MultiCallerUpgradeable.t.sol @@ -102,12 +102,6 @@ contract MultiCallerUpgradeableTest is Test { assert(results[i].success); } else { assert(!results[i].success); - // Verify the revert reason is "Ownable: caller is not the owner" - bytes memory expectedError = abi.encodeWithSignature( - "Error(string)", - "Ownable: caller is not the owner" - ); - assertEq(results[i].returnData, expectedError); } } } diff --git a/test/evm/foundry/local/PermissionSplitterProxy.t.sol b/test/evm/foundry/local/PermissionSplitterProxy.t.sol index 56f0b4cd9..89a561fca 100644 --- a/test/evm/foundry/local/PermissionSplitterProxy.t.sol +++ b/test/evm/foundry/local/PermissionSplitterProxy.t.sol @@ -53,7 +53,7 @@ contract PermissionSplitterProxyTest is HubPoolTestBase { function test_CannotRunMethodUntilWhitelisted() public { // Delegate cannot call enableL1TokenForLiquidityProvision until whitelisted vm.prank(delegate); - vm.expectRevert("Not allowed to call"); + vm.expectRevert(); hubPoolProxy.enableL1TokenForLiquidityProvision(address(fixture.weth)); // Whitelist the selector for delegate role @@ -80,7 +80,7 @@ contract PermissionSplitterProxyTest is HubPoolTestBase { function test_OwnerCanRevokeRole() public { // Delegate cannot call without whitelist vm.prank(delegate); - vm.expectRevert("Not allowed to call"); + vm.expectRevert(); hubPoolProxy.enableL1TokenForLiquidityProvision(address(fixture.weth)); // Whitelist the selector for delegate role @@ -99,14 +99,14 @@ contract PermissionSplitterProxyTest is HubPoolTestBase { // Delegate can no longer call (try with USDC) vm.prank(delegate); - vm.expectRevert("Not allowed to call"); + vm.expectRevert(); hubPoolProxy.enableL1TokenForLiquidityProvision(address(fixture.usdc)); } function test_OwnerCanRevokeSelector() public { // Delegate cannot call without whitelist vm.prank(delegate); - vm.expectRevert("Not allowed to call"); + vm.expectRevert(); hubPoolProxy.enableL1TokenForLiquidityProvision(address(fixture.weth)); // Whitelist the selector for delegate role @@ -125,7 +125,7 @@ contract PermissionSplitterProxyTest is HubPoolTestBase { // Delegate can no longer call (try with USDC) vm.prank(delegate); - vm.expectRevert("Not allowed to call"); + vm.expectRevert(); hubPoolProxy.enableL1TokenForLiquidityProvision(address(fixture.usdc)); } } diff --git a/test/evm/foundry/local/SP1Helios.t.sol b/test/evm/foundry/local/SP1Helios.t.sol index 44648615a..ee639d4b0 100644 --- a/test/evm/foundry/local/SP1Helios.t.sol +++ b/test/evm/foundry/local/SP1Helios.t.sol @@ -306,7 +306,7 @@ contract SP1HeliosTest is Test { bytes memory proof = new bytes(0); vm.prank(initialUpdater); - vm.expectRevert(abi.encodeWithSelector(SP1Helios.PreviousHeaderNotSet.selector, nonExistentHead)); + vm.expectRevert(); helios.update(proof, publicValues); } @@ -332,7 +332,7 @@ contract SP1HeliosTest is Test { bytes memory proof = new bytes(0); vm.prank(initialUpdater); - vm.expectRevert(abi.encodeWithSelector(SP1Helios.PreviousHeadTooOld.selector, INITIAL_HEAD)); + vm.expectRevert(); helios.update(proof, publicValues); } @@ -360,7 +360,7 @@ contract SP1HeliosTest is Test { vm.warp(helios.slotTimestamp(INITIAL_HEAD) + 1 hours); vm.prank(initialUpdater); - vm.expectRevert(abi.encodeWithSelector(SP1Helios.NonIncreasingHead.selector, newHead)); + vm.expectRevert(); helios.update(proof, publicValues); } @@ -388,13 +388,7 @@ contract SP1HeliosTest is Test { vm.warp(helios.slotTimestamp(INITIAL_HEAD) + 1 hours); vm.prank(initialUpdater); - vm.expectRevert( - abi.encodeWithSelector( - SP1Helios.SyncCommitteeStartMismatch.selector, - wrongSyncCommitteeHash, - INITIAL_SYNC_COMMITTEE_HASH - ) - ); + vm.expectRevert(); helios.update(proof, publicValues); } diff --git a/test/evm/foundry/local/spokepool/SpokePool_ClaimRelayerRefund.t.sol b/test/evm/foundry/local/spokepool/SpokePool_ClaimRelayerRefund.t.sol index be75b48de..c21103bee 100644 --- a/test/evm/foundry/local/spokepool/SpokePool_ClaimRelayerRefund.t.sol +++ b/test/evm/foundry/local/spokepool/SpokePool_ClaimRelayerRefund.t.sol @@ -64,7 +64,7 @@ contract SpokePoolClaimRelayerRefundTest is Test { // Attempt to transfer tokens to the blacklisted relayer should revert destErc20.mint(owner, AMOUNT_TO_RELAY); vm.prank(owner); - vm.expectRevert("Recipient is blacklisted"); + vm.expectRevert(); destErc20.transfer(relayer, AMOUNT_TO_RELAY); } @@ -127,7 +127,7 @@ contract SpokePoolClaimRelayerRefundTest is Test { // Attempting to claim to the blacklisted address should fail vm.prank(relayer); - vm.expectRevert("Recipient is blacklisted"); + vm.expectRevert(); spokePool.claimRelayerRefund(address(destErc20).toBytes32(), relayer.toBytes32()); // Claiming to a different (non-blacklisted) address should succeed diff --git a/test/evm/foundry/local/spokepool/SpokePool_Deposit.t.sol b/test/evm/foundry/local/spokepool/SpokePool_Deposit.t.sol index c9e6e5e41..4d11be2c9 100644 --- a/test/evm/foundry/local/spokepool/SpokePool_Deposit.t.sol +++ b/test/evm/foundry/local/spokepool/SpokePool_Deposit.t.sol @@ -886,7 +886,7 @@ contract SpokePoolDepositTest is Test { ); vm.prank(depositor); - vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.expectRevert(); spokePool.callback(functionCalldata); } diff --git a/test/evm/foundry/local/spokepool/SpokePool_Relay.t.sol b/test/evm/foundry/local/spokepool/SpokePool_Relay.t.sol index 17b823d86..33b1ec8b7 100644 --- a/test/evm/foundry/local/spokepool/SpokePool_Relay.t.sol +++ b/test/evm/foundry/local/spokepool/SpokePool_Relay.t.sol @@ -558,7 +558,7 @@ contract SpokePoolRelayTest is Test { ); vm.prank(relayer); - vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.expectRevert(); spokePool.callback(functionCalldata); } diff --git a/test/evm/foundry/local/spokepool/SpokePool_SlowRelay.t.sol b/test/evm/foundry/local/spokepool/SpokePool_SlowRelay.t.sol index bdab04b87..faa1c1a1b 100644 --- a/test/evm/foundry/local/spokepool/SpokePool_SlowRelay.t.sol +++ b/test/evm/foundry/local/spokepool/SpokePool_SlowRelay.t.sol @@ -325,7 +325,7 @@ contract SpokePoolSlowRelayTest is Test { bytes memory functionCalldata = abi.encodeCall(spokePool.requestSlowFill, (relayData)); vm.prank(depositor); - vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.expectRevert(); spokePool.callback(functionCalldata); } @@ -421,7 +421,7 @@ contract SpokePoolSlowRelayTest is Test { bytes memory functionCalldata = abi.encodeCall(spokePool.executeSlowRelayLeaf, (slowRelayLeaf, 0, proof)); vm.prank(depositor); - vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.expectRevert(); spokePool.callback(functionCalldata); } diff --git a/test/evm/foundry/local/spokepool/SpokePool_Upgrades.t.sol b/test/evm/foundry/local/spokepool/SpokePool_Upgrades.t.sol index b13c505cc..c0c46e288 100644 --- a/test/evm/foundry/local/spokepool/SpokePool_Upgrades.t.sol +++ b/test/evm/foundry/local/spokepool/SpokePool_Upgrades.t.sol @@ -46,7 +46,7 @@ contract SpokePoolUpgradesTest is Test { // Only owner can upgrade vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.upgradeToAndCall(address(spokePoolV2Implementation), reinitializeData); // Owner can upgrade @@ -58,7 +58,7 @@ contract SpokePoolUpgradesTest is Test { assertEq(upgradedSpokePool.withdrawalRecipient(), newHubPool); // Can't reinitialize again - vm.expectRevert("Initializable: contract is already initialized"); + vm.expectRevert(); upgradedSpokePool.reinitialize(newHubPool); // Can call new function diff --git a/test/evm/foundry/local/spokepool/chain-specific/Arbitrum_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/Arbitrum_SpokePool.t.sol index e3cbf09a7..799a81431 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/Arbitrum_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/Arbitrum_SpokePool.t.sol @@ -161,7 +161,7 @@ contract Arbitrum_SpokePoolTest is Test, Constants { ); // Attempt upgrade from non-cross-domain admin should fail - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); spokePool.upgradeTo(address(newImplementation)); // Upgrade from cross domain alias should succeed @@ -291,7 +291,7 @@ contract Arbitrum_SpokePoolTest is Test, Constants { spokePool.whitelistToken(l2Dai, address(0)); // Should revert with "Uninitialized mainnet token" - vm.expectRevert("Uninitialized mainnet token"); + vm.expectRevert(); vm.prank(relayer); spokePool.executeRelayerRefundLeaf(0, leaf, MerkleTreeUtils.emptyProof()); diff --git a/test/evm/foundry/local/spokepool/chain-specific/Ethereum_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/Ethereum_SpokePool.t.sol index 1558d3113..89507f1fc 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/Ethereum_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/Ethereum_SpokePool.t.sol @@ -95,7 +95,7 @@ contract Ethereum_SpokePoolTest is Test { // Attempt upgrade from non-owner should fail vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.upgradeTo(address(newImplementation)); // Upgrade from owner should succeed @@ -108,7 +108,7 @@ contract Ethereum_SpokePoolTest is Test { function test_onlyOwnerCanSetCrossDomainAdmin() public { // Attempt from non-owner should fail vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.setCrossDomainAdmin(rando); // Should succeed from owner @@ -121,7 +121,7 @@ contract Ethereum_SpokePoolTest is Test { function test_onlyOwnerCanSetWithdrawalRecipient() public { // Attempt from non-owner should fail vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.setWithdrawalRecipient(rando); // Should succeed from owner @@ -134,7 +134,7 @@ contract Ethereum_SpokePoolTest is Test { function test_onlyOwnerCanRelayRootBundle() public { // Attempt from non-owner should fail vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.relayRootBundle(mockTreeRoot, mockTreeRoot); // Should succeed from owner @@ -153,7 +153,7 @@ contract Ethereum_SpokePoolTest is Test { // Attempt to delete from non-owner should fail vm.prank(rando); - vm.expectRevert("Ownable: caller is not the owner"); + vm.expectRevert(); spokePool.emergencyDeleteRootBundle(0); // Should succeed from owner diff --git a/test/evm/foundry/local/spokepool/chain-specific/Linea_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/Linea_SpokePool.t.sol index ec343d83c..c9a8249a9 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/Linea_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/Linea_SpokePool.t.sol @@ -141,12 +141,12 @@ contract Linea_SpokePoolTest is Test { ); // Attempt upgrade from non-cross-domain admin should fail - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); spokePool.upgradeTo(address(newImplementation)); // Setting sender but calling from wrong address should also fail l2MessageService.setSender(owner); - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); vm.prank(owner); spokePool.upgradeTo(address(newImplementation)); @@ -190,7 +190,7 @@ contract Linea_SpokePoolTest is Test { ); // Attempt from non-admin should fail - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); spokePool.relayRootBundle(root, mockTreeRoot); // Should succeed from cross domain admin @@ -217,7 +217,7 @@ contract Linea_SpokePoolTest is Test { l2MessageService.setMinimumFeeInWei(1); // Execute without fee should fail - vm.expectRevert("MESSAGE_FEE_MISMATCH"); + vm.expectRevert(); vm.prank(relayer); spokePool.executeRelayerRefundLeaf(0, leaf, MerkleTreeUtils.emptyProof()); } diff --git a/test/evm/foundry/local/spokepool/chain-specific/Polygon_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/Polygon_SpokePool.t.sol index 7c65728b0..b2a365569 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/Polygon_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/Polygon_SpokePool.t.sol @@ -8,7 +8,11 @@ import { IERC20Upgradeable } from "@openzeppelin/contracts-upgradeable-v4/token/ // Contracts under test import { Polygon_SpokePool } from "../../../../../../contracts/Polygon_SpokePool.sol"; -import { PolygonTokenBridger, PolygonIERC20Upgradeable, PolygonRegistry } from "../../../../../../contracts/PolygonTokenBridger.sol"; +import { + PolygonTokenBridger, + PolygonIERC20Upgradeable, + PolygonRegistry +} from "../../../../../../contracts/PolygonTokenBridger.sol"; import { WETH9Interface } from "../../../../../../contracts/external/interfaces/WETH9Interface.sol"; import { SpokePool } from "../../../../../../contracts/SpokePool.sol"; import { SpokePoolInterface } from "../../../../../../contracts/interfaces/SpokePoolInterface.sol"; @@ -18,7 +22,11 @@ import { V3SpokePoolInterface } from "../../../../../../contracts/interfaces/V3S import { OFTTransportAdapter } from "../../../../../../contracts/libraries/OFTTransportAdapter.sol"; // Mocks -import { PolygonRegistryMock, PolygonERC20PredicateMock, PolygonERC20Mock } from "../../../../../../contracts/test/PolygonMocks.sol"; +import { + PolygonRegistryMock, + PolygonERC20PredicateMock, + PolygonERC20Mock +} from "../../../../../../contracts/test/PolygonMocks.sol"; import { MockCCTPMessenger, MockCCTPMinter } from "../../../../../../contracts/test/MockCCTP.sol"; import { MockOFTMessenger } from "../../../../../../contracts/test/MockOFTMessenger.sol"; import { MintableERC20 } from "../../../../../../contracts/test/MockERC20.sol"; @@ -695,11 +703,11 @@ contract Polygon_SpokePoolTest is Test, Constants { weth.transfer(address(polygonTokenBridger), 1 ether); // Cannot call retrieve on L2 - vm.expectRevert("Cannot run method on this chain"); + vm.expectRevert(); polygonTokenBridger.retrieve(IERC20Upgradeable(address(weth))); // Cannot call callExit on L2 - vm.expectRevert("Cannot run method on this chain"); + vm.expectRevert(); polygonTokenBridger.callExit(hex""); } @@ -720,7 +728,7 @@ contract Polygon_SpokePoolTest is Test, Constants { dai.approve(address(l1Bridger), 1 ether); // Cannot call send on L1 - vm.expectRevert("Cannot run method on this chain"); + vm.expectRevert(); vm.prank(owner); l1Bridger.send(PolygonIERC20Upgradeable(address(dai)), 1 ether); } diff --git a/test/evm/foundry/local/spokepool/chain-specific/Scroll_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/Scroll_SpokePool.t.sol index df3dc7c5a..49fd43824 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/Scroll_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/Scroll_SpokePool.t.sol @@ -42,8 +42,6 @@ contract Scroll_SpokePoolTest is Test { uint32 constant TEST_DEPOSIT_QUOTE_TIME_BUFFER = 1 hours; uint32 constant TEST_FILL_DEADLINE_BUFFER = 2 hours; - string constant NO_ADMIN_REVERT = "Sender must be admin"; - // ============ Contracts ============ Scroll_SpokePool public spokePool; @@ -137,7 +135,7 @@ contract Scroll_SpokePoolTest is Test { // Attempt upgrade from random address should fail vm.prank(rando); - vm.expectRevert(bytes(NO_ADMIN_REVERT)); + vm.expectRevert(); spokePool.upgradeTo(address(newImplementation)); // Upgrade from cross domain admin (owner) should succeed @@ -151,7 +149,7 @@ contract Scroll_SpokePoolTest is Test { // Attempt from non-admin should fail vm.prank(rando); - vm.expectRevert(bytes(NO_ADMIN_REVERT)); + vm.expectRevert(); spokePool.setL2GatewayRouter(IL2GatewayRouterExtended(rando)); // Should succeed from cross domain admin @@ -167,7 +165,7 @@ contract Scroll_SpokePoolTest is Test { // Attempt from non-admin should fail vm.prank(rando); - vm.expectRevert(bytes(NO_ADMIN_REVERT)); + vm.expectRevert(); spokePool.setL2ScrollMessenger(IScrollMessenger(rando)); // Should succeed from cross domain admin @@ -185,7 +183,7 @@ contract Scroll_SpokePoolTest is Test { ); // Attempt from non-admin should fail - vm.expectRevert(bytes(NO_ADMIN_REVERT)); + vm.expectRevert(); spokePool.relayRootBundle(relayerRefundRoot, mockTreeRoot); // Should succeed from cross domain admin diff --git a/test/evm/foundry/local/spokepool/chain-specific/ZkSync_SpokePool.t.sol b/test/evm/foundry/local/spokepool/chain-specific/ZkSync_SpokePool.t.sol index cfc6d8ed7..53e4d2b9b 100644 --- a/test/evm/foundry/local/spokepool/chain-specific/ZkSync_SpokePool.t.sol +++ b/test/evm/foundry/local/spokepool/chain-specific/ZkSync_SpokePool.t.sol @@ -6,7 +6,12 @@ import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy import { IERC20 } from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; // Contracts under test -import { ZkSync_SpokePool, ZkBridgeLike, IL2ETH, IL2AssetRouter } from "../../../../../../contracts/ZkSync_SpokePool.sol"; +import { + ZkSync_SpokePool, + ZkBridgeLike, + IL2ETH, + IL2AssetRouter +} from "../../../../../../contracts/ZkSync_SpokePool.sol"; import { SpokePoolInterface } from "../../../../../../contracts/interfaces/SpokePoolInterface.sol"; // Libraries @@ -146,7 +151,7 @@ contract ZkSync_SpokePoolTest is Test { ); // Attempt upgrade from non-cross-domain admin should fail - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); spokePool.upgradeTo(address(newImplementation)); // Upgrade from cross domain alias should succeed @@ -161,7 +166,7 @@ contract ZkSync_SpokePoolTest is Test { (, bytes32 root) = MerkleTreeUtils.buildRelayerRefundLeafAndRoot(spokePool.chainId(), l2Dai, AMOUNT_TO_RETURN); // Attempt from non-admin should fail - vm.expectRevert("ONLY_COUNTERPART_GATEWAY"); + vm.expectRevert(); spokePool.relayRootBundle(root, mockTreeRoot); // Should succeed from cross domain alias From 540afcb94ea3208cb655e46a85ec0d2bb78f7bfa Mon Sep 17 00:00:00 2001 From: Faisal Usmani Date: Thu, 19 Mar 2026 20:36:12 -0400 Subject: [PATCH 2/5] remove test out and cache Signed-off-by: Faisal Usmani --- foundry.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/foundry.toml b/foundry.toml index 85e590548..b927f9ac3 100644 --- a/foundry.toml +++ b/foundry.toml @@ -71,8 +71,6 @@ ethereum = { key = "${ETHERSCAN_API_KEY}" } # A profile to only run foundry local tests, skipping fork tests. These tests are run in CI. Run with `FOUNDRY_PROFILE=local-test forge test` [profile.local-test] test = "test/evm/foundry/local" -cache_path = "cache-foundry-local" -out = "out-local" # Tron-compatible profile. Compiles counterfactual contracts at 0.8.25 (max supported by Tron's solc fork). # Run with `FOUNDRY_PROFILE=tron forge build` From c50b06395eecc34d57d3b083609e78a0e031f6c7 Mon Sep 17 00:00:00 2001 From: Faisal Usmani Date: Thu, 19 Mar 2026 20:50:26 -0400 Subject: [PATCH 3/5] lets try this Signed-off-by: Faisal Usmani --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index b927f9ac3..248ef53e2 100644 --- a/foundry.toml +++ b/foundry.toml @@ -70,7 +70,7 @@ ethereum = { key = "${ETHERSCAN_API_KEY}" } # A profile to only run foundry local tests, skipping fork tests. These tests are run in CI. Run with `FOUNDRY_PROFILE=local-test forge test` [profile.local-test] -test = "test/evm/foundry/local" +test = "test/evm/foundry" # Tron-compatible profile. Compiles counterfactual contracts at 0.8.25 (max supported by Tron's solc fork). # Run with `FOUNDRY_PROFILE=tron forge build` From 70628beab0d3a4fd6412087ad4d7d0b2de6d0989 Mon Sep 17 00:00:00 2001 From: Faisal Usmani Date: Fri, 20 Mar 2026 09:41:50 -0400 Subject: [PATCH 4/5] make test default Signed-off-by: Faisal Usmani --- .github/workflows/pr.yml | 2 +- foundry.toml | 8 ++++---- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2aa779f50..06cbf2924 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -45,7 +45,7 @@ jobs: env: ARTIFACTS_PATHS: | out - cache-foundry + cache steps: - name: Checkout repo uses: actions/checkout@v3 diff --git a/foundry.toml b/foundry.toml index 248ef53e2..cdafe5002 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,9 +5,9 @@ build_info = true extra_output = ["storageLayout"] src = "contracts" out = "out" -test = "test/evm/foundry" +test = "test/evm/foundry/local" libs = ["node_modules", "lib"] -cache_path = "cache-foundry" +cache_path = "cache" via_ir = true optimizer_runs = 800 solc_version = "0.8.30" @@ -69,8 +69,8 @@ polygon_amoy = "${NODE_URL_80002}" ethereum = { key = "${ETHERSCAN_API_KEY}" } # A profile to only run foundry local tests, skipping fork tests. These tests are run in CI. Run with `FOUNDRY_PROFILE=local-test forge test` -[profile.local-test] -test = "test/evm/foundry" +[profile.fork-test] +test = "test/evm/foundry/fork" # Tron-compatible profile. Compiles counterfactual contracts at 0.8.25 (max supported by Tron's solc fork). # Run with `FOUNDRY_PROFILE=tron forge build` diff --git a/package.json b/package.json index a9ad3155e..9d00a3167 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "build-verified": "yarn build-evm-foundry && yarn build-svm-solana-verify && yarn generate-svm-artifacts && yarn build-ts", "build-evm-foundry": "forge build", "test-evm": "yarn test-evm-foundry", - "test-evm-foundry": "FOUNDRY_PROFILE=local-test forge test", + "test-evm-foundry": "forge test", "test-svm": "IS_TEST=true yarn build-svm && yarn generate-svm-artifacts && anchor test --skip-build", "test-svm-solana-verify": "IS_TEST=true yarn build-svm-solana-verify && yarn generate-svm-artifacts && anchor test --skip-build", "test": "yarn test-evm && yarn test-svm", From 427a79f3900f941c81d9e0dde8590f7f10cf1b3c Mon Sep 17 00:00:00 2001 From: Faisal Usmani Date: Fri, 20 Mar 2026 11:44:47 -0400 Subject: [PATCH 5/5] fix fork tests Signed-off-by: Faisal Usmani --- .github/workflows/publish.yml | 2 +- .gitignore | 4 ++-- foundry.toml | 2 +- .../evm/foundry/fork/BlacklistedRelayerRecipient.t.sol | 5 ++++- test/evm/foundry/fork/PermissionSplitter.t.sol | 10 ++++------ 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 44907acd2..37000c3e1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ env: NODE_VERSION: 22.18 EVM_ARTIFACTS_PATHS: | out - cache-foundry + cache SVM_ARTIFACTS_PATHS: | target/idl target/types diff --git a/.gitignore b/.gitignore index 67215b0ec..98de8b39d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,8 @@ out out-local out-tron zkout -cache-foundry -cache-foundry-local +cache +cache-foundry-fork cache-foundry-tron diff --git a/foundry.toml b/foundry.toml index cdafe5002..d7d4a55f6 100644 --- a/foundry.toml +++ b/foundry.toml @@ -68,7 +68,7 @@ polygon_amoy = "${NODE_URL_80002}" [etherscan] ethereum = { key = "${ETHERSCAN_API_KEY}" } -# A profile to only run foundry local tests, skipping fork tests. These tests are run in CI. Run with `FOUNDRY_PROFILE=local-test forge test` +# A profile to only run foundry fork tests, skipping local tests. These tests are NOT run in CI. Run with `FOUNDRY_PROFILE=fork-test forge test` [profile.fork-test] test = "test/evm/foundry/fork" diff --git a/test/evm/foundry/fork/BlacklistedRelayerRecipient.t.sol b/test/evm/foundry/fork/BlacklistedRelayerRecipient.t.sol index 64a831672..946adab64 100644 --- a/test/evm/foundry/fork/BlacklistedRelayerRecipient.t.sol +++ b/test/evm/foundry/fork/BlacklistedRelayerRecipient.t.sol @@ -30,6 +30,8 @@ interface IUSDC { function blacklist(address _account) external; function isBlacklisted(address _account) external view returns (bool); + + function blacklister() external view returns (address); } contract MockSpokePoolTest is Test { @@ -46,6 +48,7 @@ contract MockSpokePoolTest is Test { address recipient2 = address(0x6969692222222420); function setUp() public { + vm.createSelectFork(vm.envString("NODE_URL_1")); spokePool = new MockSpokePool(address(0x123)); // Create an instance of USDT & USDCusing its mainnet address usdt = IUSDT(address(0xdAC17F958D2ee523a2206206994597C13D831ec7)); @@ -121,7 +124,7 @@ contract MockSpokePoolTest is Test { // USDC blacklist blocks both the sender and recipient. Therefore if we a recipient within a bundle is // blacklisted, they should be credited for the refund amount that can be claimed later to a new address. assertEq(usdc.isBlacklisted(recipient1), false, "Recipient1 should not be blacklisted"); - vm.prank(0x10DF6B6fe66dd319B1f82BaB2d054cbb61cdAD2e); // USDC blacklister + vm.prank(usdc.blacklister()); usdc.blacklist(recipient1); assertEq(usdc.isBlacklisted(recipient1), true, "Recipient1 should be blacklisted"); diff --git a/test/evm/foundry/fork/PermissionSplitter.t.sol b/test/evm/foundry/fork/PermissionSplitter.t.sol index 8626b1a02..2113a5915 100644 --- a/test/evm/foundry/fork/PermissionSplitter.t.sol +++ b/test/evm/foundry/fork/PermissionSplitter.t.sol @@ -95,10 +95,8 @@ contract PermissionSplitterTest is Test { bytes4(keccak256("DEFAULT_ADMIN_ROLE()")) ]; - // Error emitted when non-owner calls onlyOwner HubPool function. + // Error emitted when non-owner calls onlyOwner HubPool function (from on-chain contract, has revert strings). bytes constant OWNABLE_NOT_OWNER_ERROR = bytes("Ownable: caller is not the owner"); - // Error emitted when calling PermissionSplitterProxy function with incorrect role. - bytes constant PROXY_NOT_ALLOWED_TO_CALL_ERROR = bytes("Not allowed to call"); address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; @@ -175,7 +173,7 @@ contract PermissionSplitterTest is Test { ); uint256 spokeChainId = 1; - vm.expectRevert(PROXY_NOT_ALLOWED_TO_CALL_ERROR); + vm.expectRevert(); hubPoolProxy.relaySpokePoolAdminFunction(spokeChainId, spokeFunctionCallData); vm.expectRevert(OWNABLE_NOT_OWNER_ERROR); hubPool.relaySpokePoolAdminFunction(spokeChainId, spokeFunctionCallData); @@ -187,7 +185,7 @@ contract PermissionSplitterTest is Test { } function testTransferOwnership() public { - vm.expectRevert(PROXY_NOT_ALLOWED_TO_CALL_ERROR); + vm.expectRevert(); hubPoolProxy.transferOwnership(defaultAdmin); // Should be able to transfer ownership back to default admin in an emergency. @@ -264,7 +262,7 @@ contract PermissionSplitterTest is Test { vm.prank(defaultAdmin); hubPoolProxy.sync(WETHAddress); - vm.expectRevert(PROXY_NOT_ALLOWED_TO_CALL_ERROR); + vm.expectRevert(); hubPoolProxy.sync(WETHAddress); } }