solidity
import "solidity-scale-codec/src/Xcm/v3/MaybeErrorCode/MaybeErrorCode.sol";File-Level Functions
function success() internal pure returns (struct MaybeErrorCode)function error(struct ErrorParams params) internal pure returns (struct MaybeErrorCode)
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 MaybeErrorCodeThe result of a `Transact` dispatch, either success or an error code.
| Field | Type | Description |
|---|---|---|
variant | 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). |
ErrorParams
solidity
struct ErrorParamsParameters for the `Error` variant.
| Field | Type | Description |
|---|---|---|
errorBytes | bytes | Dispatch error bytes. |
TruncatedErrorParams
solidity
struct TruncatedErrorParamsParameters for the `TruncatedError` variant.
| Field | Type | Description |
|---|---|---|
errorBytes | bytes | Truncated dispatch error bytes. |
File-Level Enums
MaybeErrorCodeVariant
solidity
enum MaybeErrorCodeVariantDiscriminant 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. |
MaybeErrorCode
Kind: source