Skip to content

File: src/Scale/Unsigned/U32.sol

U32

Kind: library

ABI Surface

Errors

  • error InvalidU32Length()

Function Surface

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

Created with solidity-doc-generator