diff --git a/src/Vm.sol b/src/Vm.sol index f919e6db..b6dff88c 100644 --- a/src/Vm.sol +++ b/src/Vm.sol @@ -10,6 +10,14 @@ pragma experimental ABIEncoderV2; // 3. Otherwise you're `pure`. interface VmSafe { + enum CallerMode { + None, + Broadcast, + RecurrentBroadcast, + Prank, + RecurrentPrank + } + struct Log { bytes32[] topics; bytes data; @@ -380,6 +388,8 @@ interface Vm is VmSafe { function startPrank(address msgSender, address txOrigin) external; // Resets subsequent calls' msg.sender to be `address(this)` function stopPrank() external; + // Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification + function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin); // Sets an address' balance function deal(address account, uint256 newBalance) external; // Sets an address' code