Skip to content

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.

FieldTypeDescription
variantenum MaybeErrorCodeVariantThe type of the result. See `MaybeErrorCodeVariant` enum for possible values.
payloadbytesThe 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.

FieldTypeDescription
errorBytesuint8\[\]Dispatch error bytes.

struct TruncatedErrorParams

Parameters for the TruncatedError variant.

FieldTypeDescription
errorBytesuint8\[\]Truncated dispatch error bytes.

Enums

enum MaybeErrorCodeVariant

Discriminant for the MaybeErrorCode enum.

VariantDescription
SuccessNo error occurred.
ErrorAn error occurred, containing the dispatch error bytes.
TruncatedErrorAn 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 Success MaybeErrorCode.
  • function error(struct ErrorParams params) internal pure returns (struct MaybeErrorCode)
    • Creates an Error MaybeErrorCode with the given dispatch error bytes.
  • function truncatedError(struct TruncatedErrorParams params) internal pure returns (struct MaybeErrorCode)
    • Creates a TruncatedError MaybeErrorCode with the given dispatch error bytes.

Created with solidity-doc-generator