Add page for ERC-7562 AA validation rules #2225
Draft
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.
What changed? Why?
I've added a page under smart wallet "usage details" for ERC7562 validation rules and banned opcodes.
UserOperations submitted by bundlers must use a restricted set of opcodes and conform to other limitations due to the fact that the EOA submitting the transaction with the userOp is not the smart contract wallet address that is executing the userOp. The Bundler EOA must protect itself against operations that may pass simulation but ultimately fail onchain and thereby fail to reimburse the bundler for gas.
An onchain app that uses these banned opcodes or otherwise violates validation rules cannot be used by smart contract wallets. An app called JokeRace could not use CoinbaseSmartWallet for some but not all of their onchain execution flows. We ultimately discovered that the failing flows involved a codepath that references
tx.origin
(one of the banned opcodes).Hopefully this documentation will help make it more clear more quickly to future devs why EVM code that relies on certain opcodes can't be used with CBSW.
Notes to reviewers
How has it been tested?
Locally
Have you tested the following pages?
BaseWeb
BaseDocs