File: src/Xcm/v5/XcmError/XcmError.sol
XcmError
Kind: source
Structs
struct XcmError
XCM v5 error, containing the error type and an optional payload for Trap.
| Field | Type | Description |
|---|---|---|
variant | enum XcmErrorVariant | The type of the error. See `XcmErrorVariant` enum for possible values. |
payload | bytes | The trap code. Only meaningful when `variant` is `Trap`. |
struct UnitParams
Parameters for unit (payload-less) XCM errors.
| Field | Type | Description |
|---|---|---|
variant | enum XcmErrorVariant | The non-trap error discriminant. |
struct TrapParams
Parameters for the Trap error variant.
| Field | Type | Description |
|---|---|---|
code | uint64 | Trap code. |
Enums
enum XcmErrorVariant
Error codes used in XCM.
| Variant | Description |
|---|---|
Overflow | An arithmetic overflow happened. |
Unimplemented | The instruction is intentionally unsupported. |
UntrustedReserveLocation | Origin Register does not contain a valid value for a reserve transfer notification. |
UntrustedTeleportLocation | Origin Register does not contain a valid value for a teleport notification. |
LocationFull | `MultiLocation` value too large to descend further. |
LocationNotInvertible | `MultiLocation` value ascends more parents than known ancestors of local location. |
BadOrigin | The Origin Register does not contain a valid value for the instruction. |
InvalidLocation | The location parameter is not a valid value for the instruction. |
AssetNotFound | The given asset is not handled. |
FailedToTransactAsset | An asset transaction failed, typically due to type conversions. NOTE: The string field is #[codec(skip)] and not serialized. |
NotWithdrawable | An asset cannot be withdrawn, potentially due to lack of ownership, availability or rights. |
LocationCannotHold | An asset cannot be deposited under the ownership of a particular location. |
ExceedsMaxMessageSize | Attempt to send a message greater than the maximum supported by the transport protocol. |
DestinationUnsupported | The given message cannot be translated into a format supported by the destination. |
Transport | Destination is routable, but there is some issue with the transport mechanism. NOTE: The string field is #[codec(skip)] and not serialized. |
Unroutable | Destination is known to be unroutable. |
UnknownClaim | Used by `ClaimAsset` when the given claim could not be recognized/found. |
FailedToDecode | Used by `Transact` when the functor cannot be decoded. |
MaxWeightInvalid | Used by `Transact` to indicate that the given weight limit could be breached by the functor. |
NotHoldingFees | Used by `BuyExecution` when the Holding Register does not contain payable fees. |
TooExpensive | Used by `BuyExecution` when the fees declared to purchase weight are insufficient. |
Trap | Used by the `Trap` instruction to force an error intentionally. |
ExpectationFalse | Used by `ExpectAsset`, `ExpectError` and `ExpectOrigin` when the expectation was not true. |
PalletNotFound | The provided pallet index was not found. |
NameMismatch | The given pallet's name is different to that expected. |
VersionIncompatible | The given pallet's version has an incompatible version to that expected. |
HoldingWouldOverflow | The given operation would lead to an overflow of the Holding Register. |
ExportError | The message was unable to be exported. |
ReanchorFailed | `MultiLocation` value failed to be reanchored. |
NoDeal | No deal is possible under the given constraints. |
FeesNotMet | Fees were required which the origin could not pay. |
LockError | Some other error with locking. |
NoPermission | The state was not in a condition where the operation was valid to make. |
Unanchored | The universal location of the local consensus is improper. |
NotDepositable | An asset cannot be deposited, probably because too much of it already exists. |
TooManyAssets | Too many assets matched the given asset filter. |
Top-Level Functions
function unit(struct UnitParams params) internal pure returns (struct XcmError)- Creates a unit
XcmErrorwith no payload.
- Creates a unit
function trap(struct TrapParams params) internal pure returns (struct XcmError)- Creates a
Traperror with the given u64 code.
- Creates a