From fa19f9aa250c0f548e0fdd226114aebf2c4c3fed Mon Sep 17 00:00:00 2001 From: Juan C <38925412+JuanCoRo@users.noreply.github.com> Date: Tue, 16 Apr 2024 03:54:37 +0200 Subject: [PATCH] Update `expectRevert` reason in `OptimismPortalKontrol` & bump Kontrol version (#10159) * versions.json: bump Kontrol from `0.1.196` to `0.1.247` * OptimismPortal.k.sol: update `expectRevert` reasons --- .../test/kontrol/proofs/OptimismPortal.k.sol | 11 +++++++++-- versions.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal.k.sol b/packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal.k.sol index 1ba1815c2632..10a6d1045745 100644 --- a/packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal.k.sol +++ b/packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal.k.sol @@ -8,6 +8,7 @@ import { IOptimismPortal as OptimismPortal, ISuperchainConfig as SuperchainConfig } from "./interfaces/KontrolInterfaces.sol"; +import "src/libraries/PortalErrors.sol"; contract OptimismPortalKontrol is DeploymentSummary, KontrolUtils { OptimismPortal optimismPortal; @@ -27,7 +28,10 @@ contract OptimismPortalKontrol is DeploymentSummary, KontrolUtils { vm.prank(optimismPortal.guardian()); superchainConfig.pause("identifier"); - vm.expectRevert("OptimismPortal: paused"); + // We need to encode the error selector as bytes instead of bytes4 because the bytes4 signature + // it's not currently supported + // Tracking issue: https://github.com/runtimeverification/kontrol/issues/466 + vm.expectRevert(abi.encodeWithSelector(CallPaused.selector)); optimismPortal.finalizeWithdrawalTransaction(_tx); } @@ -48,7 +52,10 @@ contract OptimismPortalKontrol is DeploymentSummary, KontrolUtils { vm.prank(optimismPortal.guardian()); superchainConfig.pause("identifier"); - vm.expectRevert("OptimismPortal: paused"); + // We need to encode the error selector as bytes instead of bytes4 because the bytes4 signature + // it's not currently supported + // Tracking issue: https://github.com/runtimeverification/kontrol/issues/466 + vm.expectRevert(abi.encodeWithSelector(CallPaused.selector)); optimismPortal.proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof); } diff --git a/versions.json b/versions.json index 7f591aa014b5..2758b5561752 100644 --- a/versions.json +++ b/versions.json @@ -4,5 +4,5 @@ "geth": "v1.13.14", "nvm": "v20.9.0", "slither": "0.10.0", - "kontrol": "0.1.196" + "kontrol": "0.1.247" }