import "solidity-scale-codec/src/Xcm/v5/NetworkId/NetworkIdCodec.sol";NetworkIdCodec
Kind: library
Functions
function encode(struct NetworkId networkId) internal pure returns (bytes)function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)function decode(bytes data) internal pure returns (struct NetworkId, uint256)function decodeAt(bytes data, uint256 offset) internal pure returns (struct NetworkId, uint256)function asByGenesis(struct NetworkId networkId) internal pure returns (struct ByGenesisParams)function asEthereum(struct NetworkId networkId) internal pure returns (struct EthereumParams)function asFork(struct NetworkId networkId) internal pure returns (struct ByForkParams)
encode(struct NetworkId networkId)
function encode(struct NetworkId networkId) internal pure returns (bytes)Encodes a `NetworkId` struct into SCALE format.
encodedSizeAt(bytes data, uint256 offset)
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)
function decode(bytes data) internal pure returns (struct NetworkId, uint256)Decodes a byte array into a `NetworkId` struct.
decodeAt(bytes data, uint256 offset)
function decodeAt(bytes data, uint256 offset) internal pure returns (struct NetworkId, uint256)Decodes a byte array into a `NetworkId` struct.
asByGenesis(struct NetworkId networkId)
function asByGenesis(struct NetworkId networkId) internal pure returns (struct ByGenesisParams)Decodes a `ByGenesis` network ID, returning the genesis hash.
asEthereum(struct NetworkId networkId)
function asEthereum(struct NetworkId networkId) internal pure returns (struct EthereumParams)Decodes a `Ethereum` network ID, returning the chain ID.
asFork(struct NetworkId networkId)
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.