From f42ba5fa1bd3ecfebb97d6eed1efc39e6b77c429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20V=C4=83caru?= <16517508+anvacaru@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:09:18 +0200 Subject: [PATCH] Add forgetBranch cheatcode (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add forgetBranch cheatcode * Update src/IKontrolCheatsBase.sol --------- Co-authored-by: Petar Maksimović --- src/IKontrolCheatsBase.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IKontrolCheatsBase.sol b/src/IKontrolCheatsBase.sol index bc6d2cf..9480d1b 100644 --- a/src/IKontrolCheatsBase.sol +++ b/src/IKontrolCheatsBase.sol @@ -3,6 +3,7 @@ pragma solidity >=0.6.2 <0.9.0; pragma experimental ABIEncoderV2; interface KontrolCheatsBase { + enum ComparisonOperator { Equal, NotEqual, LessThanOrEqual, LessThan, GreaterThanOrEqual, GreaterThan } // Expects a call using the CALL opcode to an address with the specified calldata. function expectRegularCall(address,bytes calldata) external; // Expects a call using the CALL opcode to an address with the specified msg.value and calldata. @@ -35,4 +36,6 @@ interface KontrolCheatsBase { function freshBytes(uint256) external view returns (bytes memory); // Returns a symbolic address function freshAddress() external view returns (address); + // Removes a branching condition from the path constraints + function forgetBranch(uint256, ComparisonOperator, uint256) external; }