Skip to content

File: src/Xcm/v5/NetworkId/NetworkIdCodec.sol

NetworkIdCodec

Kind: library

ABI Surface

Errors

  • error InvalidNetworkIdLength()
  • error InvalidNetworkIdVariant(uint8 variant)

Function Surface

  • function encode(struct NetworkId networkId) internal pure returns (bytes)
    • Encodes a NetworkId struct into SCALE format.
  • function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)
    • Returns the number of bytes that a NetworkId struct would occupy when SCALE-encoded.
  • function decode(bytes data) internal pure returns (struct NetworkId, uint256)
    • Decodes a byte array into a NetworkId struct.
  • function decodeAt(bytes data, uint256 offset) internal pure returns (struct NetworkId, uint256)
    • Decodes a byte array into a NetworkId struct.
  • function asByGenesis(struct NetworkId networkId) internal pure returns (struct ByGenesisParams)
    • Decodes a ByGenesis network ID, returning the genesis hash.
  • function asEthereum(struct NetworkId networkId) internal pure returns (struct EthereumParams)
    • Decodes a Ethereum network ID, returning the chain ID.
  • 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.
  • function \_assertVariant(struct NetworkId networkId, enum NetworkIdVariant expected) private pure

Created with solidity-doc-generator