import "solidity-scale-codec/src/Xcm/v5/BodyId/BodyIdCodec.sol";BodyIdCodec
Kind: library
Functions
function encode(struct BodyId bodyId) internal pure returns (bytes)function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)function decode(bytes data) internal pure returns (struct BodyId, uint256)function decodeAt(bytes data, uint256 offset) internal pure returns (struct BodyId, uint256)function asMoniker(struct BodyId bodyId) internal pure returns (struct MonikerParams)function asIndex(struct BodyId bodyId) internal pure returns (struct BodyIndexParams)
encode(struct BodyId bodyId)
function encode(struct BodyId bodyId) internal pure returns (bytes)Encodes a `BodyId` into bytes.
encodedSizeAt(bytes data, uint256 offset)
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)Returns the number of bytes that a `BodyId` struct would occupy when SCALE-encoded, starting at a given offset in the data.
decode(bytes data)
function decode(bytes data) internal pure returns (struct BodyId, uint256)Decodes a `BodyId` from bytes starting at the beginning of the data.
decodeAt(bytes data, uint256 offset)
function decodeAt(bytes data, uint256 offset) internal pure returns (struct BodyId, uint256)Decodes a `BodyId` from bytes starting at a given offset.
asMoniker(struct BodyId bodyId)
function asMoniker(struct BodyId bodyId) internal pure returns (struct MonikerParams)Helper function to decode a `BodyId` and extract the moniker name if the type is `Moniker`.
asIndex(struct BodyId bodyId)
function asIndex(struct BodyId bodyId) internal pure returns (struct BodyIndexParams)Helper function to decode a `BodyId` and extract the index if the type is `Index`.