feat(cast): add ERC-4626 commands - #16601
Merged
Merged
Conversation
Expose every synchronous ERC-4626 vault selector through Cast, with compatibility warnings and local plus production-fork coverage.
mattsse
requested review from
0xrusowsky,
DaniPopes,
figtracer,
grandizzy,
mablr and
stevencartavia
as code owners
September 3, 2026 19:25
Contributor
✅ Changelog foundThe deterministic check will validate the changed entry. |
Add a pinned Tempo mainnet fork test for the requested Morpho-style vault and reuse the production read-surface assertions across networks.
figtracer
reviewed
Sep 3, 2026
figtracer
approved these changes
Sep 3, 2026
mattsse
added a commit
to mattsse/foundry-book
that referenced
this pull request
Sep 3, 2026
Add an authored guide for synchronous tokenized-vault workflows and generated reference pages for every cast erc4626 subcommand. Keep the reference generator grouping the command family under Vault Commands.\n\nDocuments foundry-rs/foundry#16601.
mattsse
added a commit
to foundry-rs/book
that referenced
this pull request
Sep 3, 2026
* docs(cast): document ERC-4626 commands Add an authored guide for synchronous tokenized-vault workflows and generated reference pages for every cast erc4626 subcommand. Keep the reference generator grouping the command family under Vault Commands.\n\nDocuments foundry-rs/foundry#16601. * docs(cast): add ERC-4626 inspection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
cast erc4626(withcast vaultas an alias) for all sixteen ERC-4626-specific methods in the synchronous base interface. Read commands accept the usual RPC and block options, while deposit, mint, withdraw, and redeem use ABI-generated calldata and the sharedcast sendtransaction path so wallet, browser, and Tempo behavior stays aligned with the generic sender. The vault's inherited ERC-20 share operations remain available throughcast erc20.The command emits targeted compatibility guidance when a vault reports conservative zero deposit or mint maxima, when it reports a zero exit maximum for an owner that still has shares, and when
asset()returns the ERC-7535 native-asset sentinel. Failed preview calls also explain the intentional ERC-7540 asynchronous-vault behavior. End-to-end coverage executes every base selector against a local writable vault, uses a table-driven fixed-block Ethereum fork for Morpho MetaMorpho, Yearn V3, and Maple syrupUSDC, and runs the same complete read surface through a pinned Tempo mainnet fork of this Morpho-style vault.Follow-ups
Separate changes can add ERC-7540 request/claim flows and ERC-7575 multi-asset share discovery, first-class ERC-7535 native-value writes, slippage-bounded ERC-5143 or router-style operations, permit/approval composition, and a richer vault summary or position command with asset/share unit formatting. Keeping those extensions outside this PR leaves the initial surface exactly aligned with the broadly deployed synchronous ERC-4626 selectors.
Codex was used for protocol research, implementation, tests, and PR text.