Skip to content

File: src/Scale/Unsigned/U16.sol

U16

Kind: library

ABI Surface

Errors

  • error InvalidU16Length()

Function Surface

  • function encode(uint16 value) internal pure returns (bytes)
    • Encodes an uint16 into SCALE format (2-byte little-endian).
  • function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)
    • Returns the number of bytes that a uint16 would occupy when SCALE-encoded.
  • function decode(bytes data) internal pure returns (uint16)
    • Decodes SCALE-encoded bytes into an uint16.
  • function decodeAt(bytes data, uint256 offset) internal pure returns (uint16)
    • Decodes an uint16 at the specified offset.
  • function toLittleEndian(uint16 value) internal pure returns (bytes2)
    • Converts an uint16 to little-endian bytes2

Created with solidity-doc-generator