Skip to content
solidity
import "solidity-scale-codec/src/Xcm/v3/MaybeErrorCode/MaybeErrorCode.sol";

File-Level Functions

success()

solidity
function success() internal pure returns (struct MaybeErrorCode)

Creates a `Success` MaybeErrorCode.

error(struct ErrorParams params)

solidity
function error(struct ErrorParams params) internal pure returns (struct MaybeErrorCode)

Creates an `Error` MaybeErrorCode with the given dispatch error bytes.

truncatedError(struct TruncatedErrorParams params)

solidity
function truncatedError(struct TruncatedErrorParams params) internal pure returns (struct MaybeErrorCode)

Creates a `TruncatedError` MaybeErrorCode with the given dispatch error bytes.

File-Level Structs

MaybeErrorCode

solidity
struct MaybeErrorCode

The result of a `Transact` dispatch, either success or an error code.

FieldTypeDescription
variantMaybeErrorCodeVariantThe 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).

ErrorParams

solidity
struct ErrorParams

Parameters for the `Error` variant.

FieldTypeDescription
errorBytesbytesDispatch error bytes.

TruncatedErrorParams

solidity
struct TruncatedErrorParams

Parameters for the `TruncatedError` variant.

FieldTypeDescription
errorBytesbytesTruncated dispatch error bytes.

File-Level Enums

MaybeErrorCodeVariant

solidity
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.

MaybeErrorCode

Kind: source