-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document vm.mockCalls
#1325
base: master
Are you sure you want to change the base?
Document vm.mockCalls
#1325
Conversation
// Calldata can either be strict or a partial match, e.g. if you only | ||
// pass a Solidity selector to the expected calldata, then the entire Solidity | ||
// function will be mocked. | ||
function mockCalls(address, bytes calldata, bytes[] calldata) external; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the version with uint256 msgValue
should also be added, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure, since the mockCall
with msgValue
is not included. By I can include it if you think it should be documented. In that case I should probably add it for mockCall
as well?
> will receive the last `retdata` element in response. `clearMockedCalls` can be | ||
> called to clear the mock | ||
|
||
### Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also have an example that uses the version with uint256 msgValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add and update you
Documentation for
vm.mockCalls
, see foundry-rs/foundry#9024.