File: src/Xcm/v5/Junction/Junction.sol
Junction
Kind: source
Structs
struct ParachainParams
Parameters for a Parachain junction.
| Field | Type | Description |
|---|---|---|
parachainId | uint32 | The parachain identifier. |
struct AccountId32Params
Parameters for an AccountId32 junction, containing optional network information and a 32-byte account identifier.
| Field | Type | Description |
|---|---|---|
hasNetwork | bool | Indicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored. |
network | struct NetworkId | The `NetworkId` associated with the account, See `NetworkId` struct for details. This field is only meaningful if `hasNetwork` is true. |
id | bytes32 | The 32-byte identifier for the account. |
struct PluralityParams
Parameters for an Plurality junction
| Field | Type | Description |
|---|---|---|
id | struct BodyId | The identifier for the body of the plurality. See `BodyId` enum for details. |
part | struct BodyPart | The 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.
| Field | Type | Description |
|---|---|---|
hasNetwork | bool | Indicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored. |
network | struct NetworkId | Indicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored. |
index | uint64 | The 8-byte index identifier for the account. |
struct AccountKey20Params
Parameters for an AccountKey20 junction, containing optional network information and a 20-byte account key.
| Field | Type | Description |
|---|---|---|
hasNetwork | bool | Indicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored. |
network | struct NetworkId | Indicates whether the junction includes network information. If true, the `network` field contains valid data; if false, the `network` field should be ignored. |
key | address | The 20-byte key identifier for the account, represented as an `address` in Solidity. |
struct GeneralKeyParams
Parameters for an GeneralKey junction
| Field | Type | Description |
|---|---|---|
length | uint8 | The 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. |
key | bytes32 | The byte array acting as a key within the context location. |
struct PalletInstanceParams
Parameters for a PalletInstance junction.
| Field | Type | Description |
|---|---|---|
instance | uint8 | The pallet instance index. |
struct GeneralIndexParams
Parameters for a GeneralIndex junction.
| Field | Type | Description |
|---|---|---|
index | uint128 | The 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.
| Field | Type | Description |
|---|---|---|
variant | enum JunctionVariant | variant The type of the junction, determining how to interpret the payload. See `JunctionVariant` enum for possible values. |
payload | bytes | payload 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.
| Variant | Description |
|---|---|
Parachain | An indexed parachain belonging to and operated by the context. |
AccountId32 | A 32-byte identifier for an account of a specific network that is respected as a sovereign endpoint within the context. |
AccountIndex64 | Generally used when the context is a Frame-based chain. |
AccountKey20 | A 20-byte identifier for an account of a specific network that is respected as a sovereign endpoint within the context. |
PalletInstance | An instanced, indexed pallet that forms a constituent part of the context. |
GeneralIndex | A non-descript index within the context location. NOTE: Try to avoid using this and instead use a more specific item. |
GeneralKey | A 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. |
OnlyChild | The unambiguous child. Not currently used except as a fallback when deriving context. |
Plurality | A pluralistic body existing within consensus. |
GlobalConsensus | A 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
Parachainjunction with the given parachain ID.
- Creates a
function accountId32(struct AccountId32Params params) internal pure returns (struct Junction)- Creates an
AccountId32junction with the specified parameters.
- Creates an
function accountIndex64(struct AccountIndex64Params params) internal pure returns (struct Junction)- Creates an
AccountIndex64junction with the specified parameters.
- Creates an
function accountKey20(struct AccountKey20Params params) internal pure returns (struct Junction)- Creates an
AccountKey20junction with the specified parameters.
- Creates an
function palletInstance(struct PalletInstanceParams params) internal pure returns (struct Junction)- Creates a
PalletInstancejunction with the given instance index.
- Creates a
function generalIndex(struct GeneralIndexParams params) internal pure returns (struct Junction)- Creates a
GeneralIndexjunction with the given index.
- Creates a
function generalKey(struct GeneralKeyParams params) internal pure returns (struct Junction)- Creates a
GeneralKeyjunction with the given key.
- Creates a
function onlyChild() internal pure returns (struct Junction)- Creates an
OnlyChildjunction, which represents the unambiguous child in the context.
- Creates an
function plurality(struct PluralityParams params) internal pure returns (struct Junction)- Creates a
Pluralityjunction with the specified body ID and body part.
- Creates a
function globalConsensus() internal pure returns (struct Junction)- Creates a
GlobalConsensusjunction, which represents a global network capable of externalizing its own consensus.
- Creates a