Skip to content

File: src/Xcm/v5/BodyId/BodyIdCodec.sol

BodyIdCodec

Kind: library

ABI Surface

Errors

  • error InvalidBodyIdLength()
  • error InvalidBodyIdVariant(uint8 variant)

Function Surface

  • function encode(struct BodyId bodyId) internal pure returns (bytes)
    • Encodes a BodyId into bytes.
  • 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.
  • function decode(bytes data) internal pure returns (struct BodyId, uint256)
    • Decodes a BodyId from bytes starting at the beginning of the data.
  • function decodeAt(bytes data, uint256 offset) internal pure returns (struct BodyId, uint256)
    • Decodes a BodyId from bytes starting at a given offset.
  • 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.
  • function asIndex(struct BodyId bodyId) internal pure returns (struct IndexParams)
    • Helper function to decode a BodyId and extract the index if the type is Index.
  • function \_assertVariant(struct BodyId bodyId, enum BodyIdVariant expected) internal pure

Created with solidity-doc-generator