Expand description
Utilities to work with revert messages with support for backtraces and consistent formatting.
Structs§
- Backtrace
- Backtrace of an revert.
Built depth-first.
Implement
Display
to render the backtrace as a string. - Revert
- An revert returned by various functions in precompile-utils.
Allows to dynamically construct the backtrace (backtrace) of the revert
and manage it in a typed way.
Can be transformed into a
PrecompileFailure::Revert
andString
, and implementDisplay
andDebug
.
Enums§
- Revert
Reason - Possible revert reasons.
Constants§
- ERROR_
SELECTOR - Generic error to build abi-encoded revert output. See: https://docs.soliditylang.org/en/latest/control-structures.html?highlight=revert#revert
Traits§
- Backtrace
Ext - Additional function for everything having a Backtrace.
- Inject
Backtrace - Allows to inject backtrace data.
- Revert
Ext - Additional functions for Revert and MayRevert.
Functions§
- revert
- Generate an encoded revert from a simple String.
Returns a
PrecompileFailure
that fits in anEvmResult::Err
. - revert_
as_ bytes - Generate an encoded revert from a simple String.
Returns a
Vec<u8>
in casePrecompileFailure
is too high level.
Type Aliases§
- MayRevert
- Represent the result of a computation that can revert.