File: src/Scale/Signed/I256.sol
I256
Kind: library
ABI Surface
Errors
error OffsetOutOfBounds()
Function Surface
function encode(int256 value) internal pure returns (bytes)- Encodes an
int256into SCALE format (32-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
int256would occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (int256)- Decodes SCALE-encoded bytes into an
int256.
- Decodes SCALE-encoded bytes into an
function decodeAt(bytes data, uint256 offset) internal pure returns (int256)- Decodes an
int256at the specified offset.
- Decodes an
function toLittleEndian(int256 value) internal pure returns (bytes32)- Converts an int256 to little-endian bytes32 (two's complement)