Skip to content

File: src/Scale/Unsigned/U8.sol

U8

Kind: library

ABI Surface

Errors

  • error InvalidU8Length()

Function Surface

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

Created with solidity-doc-generator