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

File-Level Functions

parachain(struct ParachainParams params)

solidity
function parachain(struct ParachainParams params) internal pure returns (struct Junction)

Creates a `Parachain` junction with the given parachain ID.

accountId32(struct AccountId32Params params)

solidity
function accountId32(struct AccountId32Params params) internal pure returns (struct Junction)

Creates an `AccountId32` junction with the specified parameters.

accountIndex64(struct AccountIndex64Params params)

solidity
function accountIndex64(struct AccountIndex64Params params) internal pure returns (struct Junction)

Creates an `AccountIndex64` junction with the specified parameters.

accountKey20(struct AccountKey20Params params)

solidity
function accountKey20(struct AccountKey20Params params) internal pure returns (struct Junction)

Creates an `AccountKey20` junction with the specified parameters.

palletInstance(struct PalletInstanceParams params)

solidity
function palletInstance(struct PalletInstanceParams params) internal pure returns (struct Junction)

Creates a `PalletInstance` junction with the given instance index.

generalIndex(struct GeneralIndexParams params)

solidity
function generalIndex(struct GeneralIndexParams params) internal pure returns (struct Junction)

Creates a `GeneralIndex` junction with the given index.

generalKey(struct GeneralKeyParams params)

solidity
function generalKey(struct GeneralKeyParams params) internal pure returns (struct Junction)

Creates a `GeneralKey` junction with the given key.

onlyChild()

solidity
function onlyChild() internal pure returns (struct Junction)

Creates an `OnlyChild` junction, which represents the unambiguous child in the context.

globalConsensus(struct GlobalConsensusParams params)

solidity
function globalConsensus(struct GlobalConsensusParams params) internal pure returns (struct Junction)

Creates a `GlobalConsensus` junction, which represents a global network capable of externalizing its own consensus.

plurality(struct PluralityParams params)

solidity
function plurality(struct PluralityParams params) internal pure returns (struct Junction)

Creates a `Plurality` junction with the specified body ID and body part.

globalConsensus()

solidity
function globalConsensus() internal pure returns (struct Junction)

Creates a `GlobalConsensus` junction, which represents a global network capable of externalizing its own consensus.

File-Level Structs

ParachainParams

solidity
struct ParachainParams

Parameters for a `Parachain` junction.

FieldTypeDescription
parachainIduint32The parachain identifier.

AccountId32Params

solidity
struct AccountId32Params

Parameters for an `AccountId32` junction, containing optional network information and a 32-byte account identifier.

FieldTypeDescription
falseif-
networkNetworkId-
idbytes32The 32-byte identifier for the account.

PluralityParams

solidity
struct PluralityParams

Parameters for an `Plurality` junction

FieldTypeDescription
idBodyIdThe identifier for the body of the plurality. See `BodyId` enum for details.
partBodyPartThe part of the body that is relevant for this junction. See `BodyPart` struct for details.

AccountIndex64Params

solidity
struct AccountIndex64Params

Parameters for an `AccountIndex64` junction, containing optional network information and a 64-bit account index.

FieldTypeDescription
falseif-
falseif-
indexuint64The 8-byte index identifier for the account.

AccountKey20Params

solidity
struct AccountKey20Params

Parameters for an `AccountKey20` junction, containing optional network information and a 20-byte account key.

FieldTypeDescription
falseif-
falseif-
keyaddressThe 20-byte key identifier for the account, represented as an `address` in Solidity.

GeneralKeyParams

solidity
struct GeneralKeyParams

Parameters for an `GeneralKey` junction

FieldTypeDescription
lengthuint8The length of the byte array acting as a key within the context location. This should be between 1 and 32, inclusive, to ensure valid encoding and decoding.
keybytes32The byte array acting as a key within the context location.

PalletInstanceParams

solidity
struct PalletInstanceParams

Parameters for a `PalletInstance` junction.

FieldTypeDescription
instanceuint8The pallet instance index.

GeneralIndexParams

solidity
struct GeneralIndexParams

Parameters for a `GeneralIndex` junction.

FieldTypeDescription
indexuint128The general compact index within context.

GlobalConsensusParams

solidity
struct GlobalConsensusParams

Parameters for a `GlobalConsensus` junction.

FieldTypeDescription
networkNetworkIdThe `NetworkId` associated with the global consensus, See `NetworkId` struct for details.

Junction

solidity
struct Junction

A single item in a path to describe the relative location of a consensus system. Each item assumes a pre-existing location as its context and is defined in terms of it.

FieldTypeDescription
variantJunctionVariantvariant The type of the junction, determining how to interpret the payload. See `JunctionVariant` enum for possible values.
payloadbytespayload The SCALE-encoded data specific to the junction type. The structure of this data varies based on `variant`.

File-Level Enums

JunctionVariant

solidity
enum JunctionVariant
VariantDescription
ParachainAn indexed parachain belonging to and operated by the context.
AccountId32-
AccountIndex64Generally used when the context is a Frame-based chain.
AccountKey20A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within the context.
PalletInstanceAn instanced, indexed pallet that forms a constituent part of the context.
GeneralIndexA non-descript index within the context location. NOTE: Try to avoid using this and instead use a more specific item.
GeneralKeyA nondescript array datum, 32 bytes, acting as a key within the context location. NOTE: Try to avoid using this and instead use a more specific item.
OnlyChildThe unambiguous child. Not currently used except as a fallback when deriving context.
PluralityA pluralistic body existing within consensus.
GlobalConsensusA global network capable of externalizing its own consensus. This is not generally meaningful outside of the universal level.

Junction

Kind: source