Skip to content

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

Junction

Kind: source

Structs

struct ParachainParams

Parameters for a Parachain junction.

FieldTypeDescription
parachainIduint32The parachain identifier.

struct AccountId32Params

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

FieldTypeDescription
hasNetworkboolIndicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored.
networkstruct NetworkIdThe `NetworkId` associated with the account, See `NetworkId` struct for details. This field is only meaningful if `hasNetwork` is true.
idbytes32The 32-byte identifier for the account.

struct PluralityParams

Parameters for an Plurality junction

FieldTypeDescription
idstruct BodyIdThe identifier for the body of the plurality. See `BodyId` enum for details.
partstruct BodyPartThe part of the body that is relevant for this junction. See `BodyPart` struct for details.

struct AccountIndex64Params

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

FieldTypeDescription
hasNetworkboolIndicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored.
networkstruct NetworkIdIndicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored.
indexuint64The 8-byte index identifier for the account.

struct AccountKey20Params

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

FieldTypeDescription
hasNetworkboolIndicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored.
networkstruct NetworkIdIndicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored.
keyaddressThe 20-byte key identifier for the account, represented as an `address` in 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.

struct PalletInstanceParams

Parameters for a PalletInstance junction.

FieldTypeDescription
instanceuint8The pallet instance index.

struct GeneralIndexParams

Parameters for a GeneralIndex junction.

FieldTypeDescription
indexuint128The general compact index within context.

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
variantenum JunctionVariantvariant 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`.

Enums

enum JunctionVariant

Discriminant for the different types of junctions in XCM v5. Each variant corresponds to a specific structure of the payload.

VariantDescription
ParachainAn indexed parachain belonging to and operated by the context.
AccountId32A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within the context.
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.

Top-Level Functions

  • function parachain(struct ParachainParams params) internal pure returns (struct Junction)
    • Creates a Parachain junction with the given parachain ID.
  • function accountId32(struct AccountId32Params params) internal pure returns (struct Junction)
    • Creates an AccountId32 junction with the specified parameters.
  • function accountIndex64(struct AccountIndex64Params params) internal pure returns (struct Junction)
    • Creates an AccountIndex64 junction with the specified parameters.
  • function accountKey20(struct AccountKey20Params params) internal pure returns (struct Junction)
    • Creates an AccountKey20 junction with the specified parameters.
  • function palletInstance(struct PalletInstanceParams params) internal pure returns (struct Junction)
    • Creates a PalletInstance junction with the given instance index.
  • function generalIndex(struct GeneralIndexParams params) internal pure returns (struct Junction)
    • Creates a GeneralIndex junction with the given index.
  • function generalKey(struct GeneralKeyParams params) internal pure returns (struct Junction)
    • Creates a GeneralKey junction with the given key.
  • function onlyChild() internal pure returns (struct Junction)
    • Creates an OnlyChild junction, which represents the unambiguous child in the context.
  • function plurality(struct PluralityParams params) internal pure returns (struct Junction)
    • Creates a Plurality junction with the specified body ID and body part.
  • function globalConsensus() internal pure returns (struct Junction)
    • Creates a GlobalConsensus junction, which represents a global network capable of externalizing its own consensus.

Created with solidity-doc-generator