Improve expectEvent.inIndirectReceipt when the amount of events are specified.
Without this change, as long as one event matched the given arguments it would pass, even if the expected amount was larger than one. With this change, if the amount is specified we expect all the matches to contain the given arguments.
The return type also changes: it returns a single event for the regular use-case (i.e. when no amount is specified), but returns all of the matches when the amount is specified.
This should be backwards compatible, equally intuitive to use in general when (at least) one event is expected, but more flexible and powerful when analyzing multiple logs in a single receipt.
Type of change
[x] Bug fix
[x] New feature
[ ] Breaking change
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Documentation or wording changes
[ ] Other
Checklist:
[x] The diff is legible and has no extraneous changes
[x] Complex code has been commented, including external interfaces
[x] Tests are included for all code paths
[x] The base branch is either master, or there's a description of how to merge
Description
Improve
expectEvent.inIndirectReceipt
when the amount of events are specified.Without this change, as long as one event matched the given arguments it would pass, even if the expected amount was larger than one. With this change, if the amount is specified we expect all the matches to contain the given arguments.
The return type also changes: it returns a single event for the regular use-case (i.e. when no amount is specified), but returns all of the matches when the amount is specified.
This should be backwards compatible, equally intuitive to use in general when (at least) one event is expected, but more flexible and powerful when analyzing multiple logs in a single receipt.
Type of change
Checklist:
master
, or there's a description of how to mergeIssue Resolution
N/A