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

File-Level Functions

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 ByForkParams

Parameters for a `ByGenesis` network ID, containing the genesis block hash.

FieldTypeDescription
blockNumberuint64The block number of the block.
blockHashbytes32The hash of the block.

EthereumParams

solidity
struct EthereumParams

Parameters for an `Ethereum` network ID, containing the chain ID.

FieldTypeDescription
chainIduint64The chain ID of an Ethereum network.

ByGenesisParams

solidity
struct ByGenesisParams

Parameters for a `ByGenesis` network ID.

FieldTypeDescription
genesisHashbytes32The 32-byte genesis block hash.

NetworkId

solidity
struct NetworkId

Parameters for a `ByGenesis` network ID.

FieldTypeDescription
variantNetworkIdVariantThe type of network ID, determining how to interpret the payload. See `NetworkIdVariant` enum for possible values.
payloadbytesThe encoded payload containing the network identifier data, whose structure depends on the `variant`.

File-Level Enums

NetworkIdVariant

solidity
enum NetworkIdVariant
VariantDescription
ByGenesisNetwork specified by the first 32 bytes of its genesis block.
ByForkNetwork defined by the first 32-bytes of the hash and number of some block it contains.
PolkadotThe Polkadot Relay Chain.
KusamaThe Kusama Relay Chain.
_Reserved4Reserved. Do not Use.
_Reserved5Reserved. Do not Use.
_Reserved6Reserved. Do not Use.
EthereumAn Ethereum-based network, identified by its chain ID.
BitcoinCoreThe Bitcoin network.
BitcoinCashThe Bitcoin Cash network.
PolkadotBulletinThe Polkadot Bulletin Chain.

NetworkId

Kind: source