-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
Background
Currently, Steel requires view functions to return a value and panics when a call reverts. This creates limitations for contracts that rely on revert behavior for validation logic.
Current limitations
- The called function must return a value
- When a call reverts, the guest panics by default
- Only a debug string is available for reverts, which is not suitable for production use.
Suggested features
Add proper support for handling reverts in Steel with the following features:
- Allow view functions without return values
- Implement proper Rust error handling for failed executions
- Return properly typed Rust errors that allow
- Access the error data
- Decode ABI error information
- Support error matching/handling similar to Solidity's try-catch
Current workarounds
- Provide a wrapper contract that translates revert/success to boolean/enum returns.
- Modify existing contracts to return values instead of revertin
Metadata
Metadata
Assignees
Labels
No labels