Rhinestone home page
Search...
⌘K
Ask AI
GitHub
Legacy Docs
Search...
Navigation
Utilities
expect4337Revert
Home
SDK
Build Modules
API Reference
Demos
Overview
Getting Started
Tutorials
Multi-Owner Validator
Auto-Swap Executor
Guides
Testing
Deploying
Migration Guide
Reference
Building
Testing
Core
Modules
Signature Validation
Smart Sessions
Utilities
expect4337Revert
log4337Gas
deployAccount
simulateUserOp
setAccountEnv
withModuleStorageClearValidation
Deploying
Glossary
CheckNSignatures
ERC4337 Data Libs
ERC4337 Validation
ERC4337 Validation
Overview
Getting started
Simulator
Module Registry
Overview
Getting Started
Guides
Reference
On this page
Usage
Parameters
instance
selector (optional)
message (optional)
Returns
Utilities
expect4337Revert
Copy page
Copy page
Expect a UserOperation to revert. Similar to Foundry’s
vm.expectRevert
function but the latter will not work with UserOperations.
Usage
Copy
Ask AI
instance.
expect4337Revert
();
Parameters
instance
Type:
AccountInstance
The instance of the account used for testing.
selector (optional)
Type:
bytes4
The selector of the revert reason. If not provided, any revert reason will be accepted.
message (optional)
Type:
bytes
The entire revert reason. If not provided, any revert reason will be accepted.
Returns
The function will revert if the UserOperation does not revert.
encodeSignature
log4337Gas
Assistant
Responses are generated using AI and may contain mistakes.