Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Tudmotu
Copy link
Contributor

@Tudmotu Tudmotu commented Oct 4, 2024

Documentation for vm.mockCalls, see foundry-rs/foundry#9024.

@Tudmotu Tudmotu marked this pull request as ready for review October 7, 2024 14:14
@Tudmotu Tudmotu changed the title [Draft] Document vm.mockCalls Document vm.mockCalls Oct 7, 2024
// 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;
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants