File: src/Scale/Signed/I32.sol
I32
Kind: library
ABI Surface
Errors
error OffsetOutOfBounds()
Function Surface
function encode(int32 value) internal pure returns (bytes)- Encodes an
int32into SCALE format (4-byte two's-complement little-endian).
- Encodes an
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
int32would occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (int32)- Decodes SCALE-encoded bytes into an
int32.
- Decodes SCALE-encoded bytes into an
function decodeAt(bytes data, uint256 offset) internal pure returns (int32)- Decodes an
int32at the specified offset.
- Decodes an
function toLittleEndian(int32 value) internal pure returns (bytes4)- Converts an int32 to little-endian bytes4 (two's complement)