solidity
import "solidity-scale-codec/src/Xcm/v5/NetworkId/NetworkId.sol";File-Level Functions
function byGenesis(struct ByGenesisParams params) internal pure returns (struct NetworkId)function byFork(struct ByForkParams params) internal pure returns (struct NetworkId)function polkadot() internal pure returns (struct NetworkId)function ethereum(struct EthereumParams params) internal pure returns (struct NetworkId)
byGenesis(struct ByGenesisParams params)
solidity
function byGenesis(struct ByGenesisParams params) internal pure returns (struct NetworkId)Creates a `ByGenesis` network ID.
byFork(struct ByForkParams params)
solidity
function byFork(struct ByForkParams params) internal pure returns (struct NetworkId)Creates a `ByFork` network ID.
polkadot()
solidity
function polkadot() internal pure returns (struct NetworkId)Creates a `Polkadot` network ID.
kusama()
solidity
function kusama() internal pure returns (struct NetworkId)Creates a `Kusama` network ID.
ethereum(struct EthereumParams params)
solidity
function ethereum(struct EthereumParams params) internal pure returns (struct NetworkId)Creates an `Ethereum` network ID.
File-Level Structs
ByForkParams
solidity
struct ByForkParamsParameters 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. |
EthereumParams
solidity
struct EthereumParamsParameters for an `Ethereum` network ID, containing the chain ID.
| Field | Type | Description |
|---|---|---|
chainId | uint64 | The chain ID of an Ethereum network. |
ByGenesisParams
solidity
struct ByGenesisParamsParameters for a `ByGenesis` network ID.
| Field | Type | Description |
|---|---|---|
genesisHash | bytes32 | The 32-byte genesis block hash. |
NetworkId
solidity
struct NetworkIdParameters for a `ByGenesis` network ID.
| Field | Type | Description |
|---|---|---|
variant | 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`. |
File-Level Enums
NetworkIdVariant
solidity
enum NetworkIdVariant| 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. |
NetworkId
Kind: source