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
uint16into SCALE format (2-byte little-endian).
- Encodes an
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
uint16would occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (uint16)- Decodes SCALE-encoded bytes into an
uint16.
- Decodes SCALE-encoded bytes into an
function decodeAt(bytes data, uint256 offset) internal pure returns (uint16)- Decodes an
uint16at the specified offset.
- Decodes an
function toLittleEndian(uint16 value) internal pure returns (bytes2)- Converts an
uint16to little-endian bytes2
- Converts an