import "solidity-scale-codec/src/Xcm/v3/MaybeErrorCode/MaybeErrorCodeCodec.sol";MaybeErrorCodeCodec
Kind: library
Functions
function encode(struct MaybeErrorCode me) internal pure returns (bytes)function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)function decode(bytes data) internal pure returns (struct MaybeErrorCode, uint256)function decodeAt(bytes data, uint256 offset) internal pure returns (struct MaybeErrorCode, uint256)function asError(struct MaybeErrorCode me) internal pure returns (struct ErrorParams)
encode(struct MaybeErrorCode me)
function encode(struct MaybeErrorCode me) internal pure returns (bytes)Encodes a `MaybeErrorCode` struct into SCALE bytes.
encodedSizeAt(bytes data, uint256 offset)
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)Returns the number of bytes that a `MaybeErrorCode` would occupy when SCALE-encoded.
decode(bytes data)
function decode(bytes data) internal pure returns (struct MaybeErrorCode, uint256)Decodes a `MaybeErrorCode` from SCALE bytes starting at the beginning.
decodeAt(bytes data, uint256 offset)
function decodeAt(bytes data, uint256 offset) internal pure returns (struct MaybeErrorCode, uint256)Decodes a `MaybeErrorCode` from SCALE bytes starting at a given offset.
asError(struct MaybeErrorCode me)
function asError(struct MaybeErrorCode me) internal pure returns (struct ErrorParams)Extracts the `Error` parameters from a `MaybeErrorCode` struct. Reverts if the variant is not `Error`.
asTruncatedError(struct MaybeErrorCode me)
function asTruncatedError(struct MaybeErrorCode me) internal pure returns (struct TruncatedErrorParams)Extracts the `TruncatedError` parameters from a `MaybeErrorCode` struct. Reverts if the variant is not `TruncatedError`.