ethereum.base_types
¶
Numeric & Array Types¶
Table of Contents
Introduction¶
Integer and array types which are used by—but not unique to—Ethereum.
Module Contents¶
Classes¶
Unsigned positive integer. |
|
Unsigned positive integer, which can represent 0 to 2 ** 256 - 1, |
Attributes¶
Module Details¶
Uint¶
Unsigned positive integer.
- class ethereum.base_types.Uint¶
Bases:
int
- __slots__ = []¶
- classmethod from_be_bytes(cls: Type, buffer: Bytes) → Uint¶
Converts a sequence of bytes into an arbitrarily sized unsigned integer from its big endian representation.
- Parameters
buffer – Bytes to decode.
- Returns
self – Unsigned integer decoded from buffer.
- Return type
Uint
U256¶
Unsigned positive integer, which can represent 0 to 2 ** 256 - 1, inclusive.
- class ethereum.base_types.U256¶
Bases:
int
- MAX_VALUE :U256¶
- __slots__ = []¶
- classmethod from_be_bytes(cls: Type, buffer: Bytes) → U256¶
Converts a sequence of bytes into an arbitrarily sized unsigned integer from its big endian representation.
- Parameters
buffer – Bytes to decode.
- Returns
self – Unsigned integer decoded from buffer.
- Return type
U256
- unchecked_add(self, right: int) → int¶
- unchecked_sub(self, right: int) → int¶
- unchecked_mul(self, right: int) → int¶
- unchecked_pow(self, right: int, modulo: Optional[int] = None) → int¶
MAX_VALUE¶
- ethereum.base_types.MAX_VALUE¶
Bytes¶
- ethereum.base_types.Bytes¶
Bytes64¶
- ethereum.base_types.Bytes64¶
Bytes32¶
- ethereum.base_types.Bytes32¶
Bytes20¶
- ethereum.base_types.Bytes20¶
Bytes8¶
- ethereum.base_types.Bytes8¶