Skip to content

Commit

Permalink
feat: mockCall overloads (#630)
Browse files Browse the repository at this point in the history
Ref: foundry-rs/foundry#9267

Adds the following overloads for `vm.mockCall`. 
```solidity
function mockCall(address callee, bytes4 data, bytes calldata returnData) external;

function mockCall(address callee, uint256 msgValue, bytes4 data, bytes calldata returnData) external;

function mockCallRevert(address callee, uint256 msgValue, bytes4 data, bytes calldata revertData) external;

function mockCallRevert(address callee, bytes4 data, bytes calldata revertData) external;
```
  • Loading branch information
yash-atreya authored Nov 8, 2024
1 parent da591f5 commit 0e70977
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/Vm.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/Vm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Vm, VmSafe} from "../src/Vm.sol";
// added to or removed from Vm or VmSafe.
contract VmTest is Test {
function test_VmInterfaceId() public pure {
assertEq(type(Vm).interfaceId, bytes4(0x329891d9), "Vm");
assertEq(type(Vm).interfaceId, bytes4(0xa95c1408), "Vm");
}

function test_VmSafeInterfaceId() public pure {
Expand Down

0 comments on commit 0e70977

Please sign in to comment.