File: src/Xcm/v5/NetworkId/NetworkId.sol
NetworkId
Kind: source
Structs
struct ByForkParams
Parameters for a ByGenesis network ID, containing the genesis block hash.
| Field | Type | Description |
|---|---|---|
blockNumber | uint64 | The block number of the block. |
blockHash | bytes32 | The hash of the block. |
struct EthereumParams
Parameters for an Ethereum network ID, containing the chain ID.
| Field | Type | Description |
|---|---|---|
chainId | uint64 | The chain ID of an Ethereum network. |
struct ByGenesisParams
Parameters for a ByGenesis network ID.
| Field | Type | Description |
|---|---|---|
genesisHash | bytes32 | The 32-byte genesis block hash. |
struct NetworkId
Notice A global identifier of a data structure existing within consensus.
| Field | Type | Description |
|---|---|---|
variant | enum NetworkIdVariant | The type of network ID, determining how to interpret the payload. See `NetworkIdVariant` enum for possible values. |
payload | bytes | The encoded payload containing the network identifier data, whose structure depends on the `variant`. |
Enums
enum NetworkIdVariant
Discriminant for the different types of NetworkIds in XCM v5.
| Variant | Description |
|---|---|
ByGenesis | Network specified by the first 32 bytes of its genesis block. |
ByFork | Network defined by the first 32-bytes of the hash and number of some block it contains. |
Polkadot | The Polkadot Relay Chain. |
Kusama | The Kusama Relay Chain. |
\_Reserved4 | Reserved. Do not Use. |
\_Reserved5 | Reserved. Do not Use. |
\_Reserved6 | Reserved. Do not Use. |
Ethereum | An Ethereum-based network, identified by its chain ID. |
BitcoinCore | The Bitcoin network. |
BitcoinCash | The Bitcoin Cash network. |
PolkadotBulletin | The Polkadot Bulletin Chain. |
Top-Level Functions
function byGenesis(struct ByGenesisParams params) internal pure returns (struct NetworkId)- Creates a
ByGenesisnetwork ID.
- Creates a
function byFork(struct ByForkParams params) internal pure returns (struct NetworkId)- Creates a
ByForknetwork ID.
- Creates a
function polkadot() internal pure returns (struct NetworkId)- Creates a
Polkadotnetwork ID.
- Creates a
function kusama() internal pure returns (struct NetworkId)- Creates a
Kusamanetwork ID.
- Creates a
function ethereum(struct EthereumParams params) internal pure returns (struct NetworkId)- Creates an
Ethereumnetwork ID.
- Creates an