foundry-rs / foundry-rs/foundry
feat(`cheatcodes`): add `vm.expectTransfer`
Open
A-cheatcodes
C-forge
T-post-V1
T-to-discuss
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
Currently there are multiple flavors of `expectCall`, but all of them treat empty `data` as a request to not check the calldata content. The problem is that there's no way to check if calldata is empty, e.g. because a native token transfer was made. The current `expectCall` API surface doesn't leave much space for adding this feature.
I propose adding a new set of `expectTransfer` functions. They would be identical to `expectCall` with all their variants, but they wouldn't have the `data` parameter, and they would expect that the address is called with zero-length calldata.
Contributor guide
Assessment
This issue has not been assessed yet.