File: src/Xcm/v3/MaybeErrorCode/MaybeErrorCode.sol
MaybeErrorCode
Kind: source
Structs
struct MaybeErrorCode
The result of a Transact dispatch, either success or an error code.
| Field | Type | Description |
|---|---|---|
variant | enum MaybeErrorCodeVariant | The type of the result. See `MaybeErrorCodeVariant` enum for possible values. |
payload | bytes | The SCALE-encoded dispatch error bytes. Only meaningful when `variant` is `Error` or `TruncatedError`. Max length is MAX_DISPATCH_ERROR_LEN (128 bytes). |
struct ErrorParams
Parameters for the Error variant.
| Field | Type | Description |
|---|---|---|
errorBytes | uint8\[\] | Dispatch error bytes. |
struct TruncatedErrorParams
Parameters for the TruncatedError variant.
| Field | Type | Description |
|---|---|---|
errorBytes | uint8\[\] | Truncated dispatch error bytes. |
Enums
enum MaybeErrorCodeVariant
Discriminant for the MaybeErrorCode enum.
| Variant | Description |
|---|---|
Success | No error occurred. |
Error | An error occurred, containing the dispatch error bytes. |
TruncatedError | An error occurred but the error code was truncated to MAX_DISPATCH_ERROR_LEN bytes. |
Top-Level Functions
function success() internal pure returns (struct MaybeErrorCode)- Creates a
SuccessMaybeErrorCode.
- Creates a
function error(struct ErrorParams params) internal pure returns (struct MaybeErrorCode)- Creates an
ErrorMaybeErrorCode with the given dispatch error bytes.
- Creates an
function truncatedError(struct TruncatedErrorParams params) internal pure returns (struct MaybeErrorCode)- Creates a
TruncatedErrorMaybeErrorCode with the given dispatch error bytes.
- Creates a