Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions evm/src/executor/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ethers::contract::abigen!(
stopPrank()
deal(address,uint256)
etch(address,bytes)
expectRevert()
expectRevert(bytes)
expectRevert(bytes4)
record()
Expand Down
5 changes: 3 additions & 2 deletions evm/src/executor/inspector/cheatcodes/expect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ pub fn apply<DB: Database>(
call: &HEVMCalls,
) -> Option<Result<Bytes, Bytes>> {
Some(match call {
HEVMCalls::ExpectRevert0(inner) => {
HEVMCalls::ExpectRevert0(_) => expect_revert(state, Bytes::new(), data.subroutine.depth()),
HEVMCalls::ExpectRevert1(inner) => {
expect_revert(state, inner.0.to_vec().into(), data.subroutine.depth())
}
HEVMCalls::ExpectRevert1(inner) => {
HEVMCalls::ExpectRevert2(inner) => {
expect_revert(state, inner.0.to_vec().into(), data.subroutine.depth())
}
HEVMCalls::ExpectEmit(inner) => {
Expand Down
1 change: 1 addition & 0 deletions forge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ interface Hevm {
// Sets an address' code, (who, newCode)
function etch(address, bytes calldata) external;
// Expects an error on next call
function expectRevert() external;
function expectRevert(bytes calldata) external;
function expectRevert(bytes4) external;
// Record all storage reads and writes
Expand Down