runtimeverification / runtimeverification/kontrol

Deprecated expectEmit behaviour

Open
#425 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Seems that Foundry has updated the logic for vm.expectEmit() (link).
The main differences that I see are:
- the expected event is checked only for the next call.
- you can now expect multiple events

Originally posted by @anvacaru in https://github.com/runtimeverification/kontrol/issues/424#issuecomment-1985424716

edit: forge implementation for expectEmit: https://github.com/foundry-rs/foundry/blob/9f6bb3bb47de9d5a1f2a6c38cbc57e0f4f5508c2/crates/cheatcodes/src/test/expect.rs#L385

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Kontrol's implementation of vm.expectEmit and compare its behavior with the Foundry reference at crates/cheatcodes/src/test/expect.rs around line 385. Verify the next-call matching and multiple-event semantics described in the issue; done means Kontrol follows those behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.