Module: Klay::Constant
- Defined in:
- lib/klay/constant.rb
Overview
Provides commonly used constants, such as zero bytes or zero keys.
Constant Summary collapse
- BYTE_EMPTY =
The empty byte is defined as "".
"".freeze
- BYTE_ZERO =
The zero byte is 0x00.
"\x00".freeze
- BYTE_ONE =
The byte one is 0x01.
"\x01".freeze
- TT32 =
The size of a 32-bit number.
(2 ** 32).freeze
- TT256 =
The size of a 256-bit number.
(2 ** 256).freeze
- UINT_MAX =
The maximum possible value of an UInt256.
(2 ** 256 - 1).freeze
- UINT_MIN =
The minimum possible value of an UInt256.
0.freeze
- INT_MAX =
The maximum possible value of an Int256.
(2 ** 255 - 1).freeze
- INT_MIN =
The minimum possible value of an Int256.
(-2 ** 255).freeze
- HASH_ZERO =
A hash containing only zeros.
("\x00" * 32).freeze
- SHORT_LENGTH_LIMIT =
The RLP short length limit.
56.freeze
- LONG_LENGTH_LIMIT =
The RLP long length limit.
(256 ** 8).freeze
- PRIMITIVE_PREFIX_OFFSET =
The RLP primitive type offset.
0x80.freeze
- LIST_PREFIX_OFFSET =
The RLP array type offset.
0xc0.freeze
- BINARY_ENCODING =
The binary encoding is ASCII (8-bit).
"ASCII-8BIT".freeze
- INFINITY =
Infinity as constant for convenience.
(1.0 / 0.0).freeze