Skip to content

feat(cheatcodes): add expect*Call cheatcodes #9310

Open
@grandizzy

Description

@grandizzy

Component

Forge

Describe the feature you would like

Follow up of #4072 for adding remaining expect*Call cheatcodes

  • expect*Call cheatcodes: similar to expectEmit, these let us specify the expected call with its callee and calldata. We use these less frequently, but I think they can be useful even for fuzzing tests.

    • expectRegularCall: Expect a call using the CALL opcode and specified parameters
    • expectStaticCall: Expect a call using the STATICCALL opcode and specified parameters
    • expectDelegateCall: Expect a call using the DELEGATECALL opcode and specified parameters
    • expectNoCall: Expect no calls to be made after this cheat code
    • expectCreate: Expects the deployment of the specified bytecode by the specified address using the CREATE opcode
    • expectCreate2: Expects the deployment of the specified bytecode by the specified address using the CREATE2 opcode

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions