Skip to content

File: src/Xcm/v5/Junction/JunctionCodec.sol

JunctionCodec

Kind: library

ABI Surface

Errors

  • error InvalidJunctionLength()
  • error InvalidJunctionPayload()
  • error InvalidJunctionVariant(uint8 variant)

Function Surface

  • function encode(struct Junction junction) internal pure returns (bytes)
    • Encodes a Junction struct into a byte array suitable for SCALE encoding.
  • function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)
    • Returns the number of bytes that a Junction struct would occupy when SCALE-encoded, starting from the specified offset.
  • function decode(bytes data) internal pure returns (struct Junction, uint256)
    • Decodes a byte array into a Junction struct, starting from the specified offset.
  • function decodeAt(bytes data, uint256 offset) internal pure returns (struct Junction, uint256)
    • Decodes a byte array into a Junction struct, starting from the specified offset.
  • function asParachain(struct Junction junction) internal pure returns (struct ParachainParams)
    • Decodes a Parachain junction from a given Junction struct, extracting the parachain ID.
  • function asAccountId32(struct Junction junction) internal pure returns (struct AccountId32Params)
    • Decodes an AccountId32 junction from a given Junction struct, extracting the network information and account ID.
  • function asAccountIndex64(struct Junction junction) internal pure returns (struct AccountIndex64Params)
    • Decodes an AccountIndex64 junction from a given Junction struct, extracting the network information and account index.
  • function asAccountKey20(struct Junction junction) internal pure returns (struct AccountKey20Params)
    • Decodes an AccountKey20 junction from a given Junction struct, extracting the network information and account key.
  • function asPalletInstance(struct Junction junction) internal pure returns (struct PalletInstanceParams)
    • Decodes a PalletInstance junction from a given Junction struct, extracting the pallet instance index.
  • function asGeneralIndex(struct Junction junction) internal pure returns (struct GeneralIndexParams)
    • Decodes a GeneralIndex junction from a given Junction struct, extracting the general index.
  • function asGeneralKey(struct Junction junction) internal pure returns (struct GeneralKeyParams)
    • Decodes a GeneralKey junction from a given Junction struct, extracting the key.
  • function asPlurality(struct Junction junction) internal pure returns (struct PluralityParams)
    • Decodes a Plurality junction from a given Junction struct, extracting the body ID and body part.
  • function \_innerNetworkIdSize(bytes data, uint256 offset) private pure returns (uint256)
  • function \_assertVariant(struct Junction junction, enum JunctionVariant expected) private pure

Created with solidity-doc-generator