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
Junctionstruct into a byte array suitable for SCALE encoding.
- Encodes a
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
Junctionstruct would occupy when SCALE-encoded, starting from the specified offset.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (struct Junction, uint256)- Decodes a byte array into a
Junctionstruct, starting from the specified offset.
- Decodes a byte array into a
function decodeAt(bytes data, uint256 offset) internal pure returns (struct Junction, uint256)- Decodes a byte array into a
Junctionstruct, starting from the specified offset.
- Decodes a byte array into a
function asParachain(struct Junction junction) internal pure returns (struct ParachainParams)- Decodes a
Parachainjunction from a givenJunctionstruct, extracting the parachain ID.
- Decodes a
function asAccountId32(struct Junction junction) internal pure returns (struct AccountId32Params)- Decodes an
AccountId32junction from a givenJunctionstruct, extracting the network information and account ID.
- Decodes an
function asAccountIndex64(struct Junction junction) internal pure returns (struct AccountIndex64Params)- Decodes an
AccountIndex64junction from a givenJunctionstruct, extracting the network information and account index.
- Decodes an
function asAccountKey20(struct Junction junction) internal pure returns (struct AccountKey20Params)- Decodes an
AccountKey20junction from a givenJunctionstruct, extracting the network information and account key.
- Decodes an
function asPalletInstance(struct Junction junction) internal pure returns (struct PalletInstanceParams)- Decodes a
PalletInstancejunction from a givenJunctionstruct, extracting the pallet instance index.
- Decodes a
function asGeneralIndex(struct Junction junction) internal pure returns (struct GeneralIndexParams)- Decodes a
GeneralIndexjunction from a givenJunctionstruct, extracting the general index.
- Decodes a
function asGeneralKey(struct Junction junction) internal pure returns (struct GeneralKeyParams)- Decodes a
GeneralKeyjunction from a givenJunctionstruct, extracting the key.
- Decodes a
function asPlurality(struct Junction junction) internal pure returns (struct PluralityParams)- Decodes a
Pluralityjunction from a givenJunctionstruct, extracting the body ID and body part.
- Decodes a
function \_innerNetworkIdSize(bytes data, uint256 offset) private pure returns (uint256)function \_assertVariant(struct Junction junction, enum JunctionVariant expected) private pure