Skip to content

File: src/Scale/Unsigned/U128.sol

U128

Kind: library

ABI Surface

Errors

  • error InvalidU128Length()

Function Surface

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

Created with solidity-doc-generator