Module precompile_utils::solidity::revert
source · Expand description
Utilities to work with revert messages with support for backtraces and consistent formatting.
Structs§
- Backtrace of an revert. Built depth-first. Implement
Display
to render the backtrace as a string. - 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§
- Possible revert reasons.
Constants§
- Generic error to build abi-encoded revert output. See: https://docs.soliditylang.org/en/latest/control-structures.html?highlight=revert#revert
Traits§
- Additional function for everything having a Backtrace.
- Allows to inject backtrace data.
- Additional functions for Revert and MayRevert.
Functions§
- Generate an encoded revert from a simple String. Returns a
PrecompileFailure
that fits in anEvmResult::Err
. - Generate an encoded revert from a simple String. Returns a
Vec<u8>
in casePrecompileFailure
is too high level.
Type Aliases§
- Represent the result of a computation that can revert.