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

NetworkIdCodec

Kind: library

Functions

encode(struct NetworkId networkId)

solidity
function encode(struct NetworkId networkId) internal pure returns (bytes)

Encodes a `NetworkId` struct into SCALE format.

encodedSizeAt(bytes data, uint256 offset)

solidity
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)

Returns the number of bytes that a `NetworkId` struct would occupy when SCALE-encoded.

decode(bytes data)

solidity
function decode(bytes data) internal pure returns (struct NetworkId, uint256)

Decodes a byte array into a `NetworkId` struct.

decodeAt(bytes data, uint256 offset)

solidity
function decodeAt(bytes data, uint256 offset) internal pure returns (struct NetworkId, uint256)

Decodes a byte array into a `NetworkId` struct.

asByGenesis(struct NetworkId networkId)

solidity
function asByGenesis(struct NetworkId networkId) internal pure returns (struct ByGenesisParams)

Decodes a `ByGenesis` network ID, returning the genesis hash.

asEthereum(struct NetworkId networkId)

solidity
function asEthereum(struct NetworkId networkId) internal pure returns (struct EthereumParams)

Decodes a `Ethereum` network ID, returning the chain ID.

asFork(struct NetworkId networkId)

solidity
function asFork(struct NetworkId networkId) internal pure returns (struct ByForkParams)

Decodes a `ByFork` network ID, returning the block number and block hash of the fork point.