Skip to content

Commit

Permalink
Add forgetBranch cheatcode (#15)
Browse files Browse the repository at this point in the history
* add forgetBranch cheatcode

* Update src/IKontrolCheatsBase.sol

---------

Co-authored-by: Petar Maksimović <PetarMax@users.noreply.github.com>
  • Loading branch information
anvacaru and PetarMax authored Dec 5, 2024
1 parent 9b70241 commit f42ba5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/IKontrolCheatsBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

0 comments on commit f42ba5f

Please sign in to comment.