File: src/Xcm/v5/XcmError/XcmErrorCodec.sol
XcmErrorCodec
Kind: library
ABI Surface
Errors
error InvalidXcmErrorLength()error InvalidXcmErrorPayload()error InvalidXcmErrorVariant(uint8 variant)
Function Surface
function encode(struct XcmError e) internal pure returns (bytes)- Encodes an
XcmErrorinto SCALE bytes.
- Encodes an
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that an
XcmErrorwould occupy when SCALE-encoded.
- Returns the number of bytes that an
function decode(bytes data) internal pure returns (struct XcmError, uint256)- Decodes an
XcmErrorfrom SCALE bytes starting at the beginning.
- Decodes an
function decodeAt(bytes data, uint256 offset) internal pure returns (struct XcmError, uint256)- Decodes an
XcmErrorfrom SCALE bytes starting at a given offset.
- Decodes an
function asTrap(struct XcmError e) internal pure returns (struct TrapParams)- Decodes the trap code from a
Traperror.
- Decodes the trap code from a
function \_assertVariant(struct XcmError e, enum XcmErrorVariant expected) internal pure