Skip to content
solidity
import "solidity-scale-codec/src/Xcm/v5/Junction/JunctionCodec.sol";

JunctionCodec

Kind: library

Functions

encode(struct Junction junction)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
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)

solidity
function asGlobalConsensus(struct Junction junction) internal pure returns (struct GlobalConsensusParams)

Decodes a `GlobalConsensus` junction from a given `Junction` struct, extracting the network information.