import "solidity-scale-codec/src/Xcm/v5/Junction/JunctionCodec.sol";JunctionCodec
Kind: library
Functions
function encode(struct Junction junction) internal pure returns (bytes)function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)function decode(bytes data) internal pure returns (struct Junction, uint256)function decodeAt(bytes data, uint256 offset) internal pure returns (struct Junction, uint256)function asParachain(struct Junction junction) internal pure returns (struct ParachainParams)function asAccountId32(struct Junction junction) internal pure returns (struct AccountId32Params)function asAccountKey20(struct Junction junction) internal pure returns (struct AccountKey20Params)function asGeneralIndex(struct Junction junction) internal pure returns (struct GeneralIndexParams)function asGeneralKey(struct Junction junction) internal pure returns (struct GeneralKeyParams)function asPlurality(struct Junction junction) internal pure returns (struct PluralityParams)
encode(struct Junction junction)
function encode(struct Junction junction) internal pure returns (bytes)Encodes a `Junction` struct into a byte array suitable for SCALE encoding.
encodedSizeAt(bytes data, uint256 offset)
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.
decode(bytes data)
function decode(bytes data) internal pure returns (struct Junction, uint256)Decodes a byte array into a `Junction` struct, starting from the specified offset.
decodeAt(bytes data, uint256 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.
asParachain(struct Junction junction)
function asParachain(struct Junction junction) internal pure returns (struct ParachainParams)Decodes a `Parachain` junction from a given `Junction` struct, extracting the parachain ID.
asAccountId32(struct Junction junction)
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.
asAccountIndex64(struct Junction junction)
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.
asAccountKey20(struct Junction junction)
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.
asPalletInstance(struct Junction junction)
function asPalletInstance(struct Junction junction) internal pure returns (struct PalletInstanceParams)Decodes a `PalletInstance` junction from a given `Junction` struct, extracting the pallet instance index.
asGeneralIndex(struct Junction junction)
function asGeneralIndex(struct Junction junction) internal pure returns (struct GeneralIndexParams)Decodes a `GeneralIndex` junction from a given `Junction` struct, extracting the general index.
asGeneralKey(struct Junction junction)
function asGeneralKey(struct Junction junction) internal pure returns (struct GeneralKeyParams)Decodes a `GeneralKey` junction from a given `Junction` struct, extracting the key.
asPlurality(struct Junction junction)
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.
asGlobalConsensus(struct Junction junction)
function asGlobalConsensus(struct Junction junction) internal pure returns (struct GlobalConsensusParams)Decodes a `GlobalConsensus` junction from a given `Junction` struct, extracting the network information.