Skip to content

Add page for ERC-7562 AA validation rules #2225

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Validation and Opcode Rules

Due to the mechanics of Account Abstraction wallets, there are additional [validation rules](https://eips.ethereum.org/EIPS/eip-7562) that are applied to UserOperation transactions and enforced offchain by the bundler responsible for fronting gas associated with the UserOperation.
These rules are designed to protect bundlers and other off-chain block builders from DoS attacks in which a bundler fronts gas for a UserOperation transaction that ultimately fails and thereby fails to reimburse the bundler.

> ⚠️ Violation of these rules will result in the UserOperation being rejected by the bundler during the simulation phase.

## Banned Opcodes

These validation rules include a set of Opcode rules that limit the set of opcodes that can be executed by the UserOperation. Blocked opcodes include:

- `ORIGIN` (`0x32`)
- `GASPRICE` (`0x3A`)
- `BLOCKHASH` (`0x40`)
- `COINBASE` (`0x41`)
- `TIMESTAMP` (`0x42`)
- `NUMBER` (`0x43`)
- `PREVRANDAO/DIFFICULTY` (`0x44`)
- `GASLIMIT` (`0x45`)
- `BASEFEE` (`0x48`)
- `BLOBHASH` (`0x49`)
- `BLOBBASEFEE` (`0x4A`)
- `CREATE` (`0xF0`)
- `INVALID` (`0xFE`)
- `SELFDESTRUCT` (`0xFF`)

> ℹ️ Note: `CREATE` is allowed in the "Contract Creation" and "Staked factory creation" sections.

For the complete specification of these rules, see [EIP-7562](https://eips.ethereum.org/EIPS/eip-7562).
4 changes: 4 additions & 0 deletions apps/base-docs/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ export const sidebar: Sidebar = [
text: 'Self Calls',
link: '/identity/smart-wallet/concepts/usage-details/self-calls',
},
{
text: 'Validation and Opcode Rules',
link: '/identity/smart-wallet/concepts/usage-details/validation-rules',
},
],
},
{
Expand Down