Package genlayer.py.eth._internal.type_dicts#
Warning
This is an internal module
- class genlayer.py.eth._internal.type_dicts.Address[source]#
Represents GenLayer Address
- __init__(val: str | Buffer)[source]#
- Parameters:
val (str | Buffer) – either a hex encoded address (that starts with ‘0x’), or base64 encoded address, or buffer of 20 bytes
Warning
checksum validation is not performed
- property as_b64: str#
>>> Address('0x5b38da6a701c568545dcfcb03fcb875f56beddc4').as_b64 'WzjaanAcVoVF3PywP8uHX1a+3cQ='
- Returns:
base64 representation of an address (most compact string)
- property as_bytes: bytes#
>>> Address('0x5b38da6a701c568545dcfcb03fcb875f56beddc4').as_bytes b'[8\xdajp\x1cV\x85E\xdc\xfc\xb0?\xcb\x87_V\xbe\xdd\xc4'
- Returns:
raw bytes of an address (most compact representation)
- property as_hex: str#
>>> Address('0x5b38da6a701c568545dcfcb03fcb875f56beddc4').as_hex '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4'
- Returns:
checksum string representation
- property as_int: u160#
>>> Address('0x5b38da6a701c568545dcfcb03fcb875f56beddc4').as_int 1123907236495940146162314350759402901750813440091 >>> hex(Address('0x5b38da6a701c568545dcfcb03fcb875f56beddc4').as_int) '0xc4ddbe565f87cb3fb0fcdc4585561c706ada385b'
- Returns:
int representation of an address (unsigned little endian)
- class genlayer.py.eth._internal.type_dicts.DecoderState[source]#
DecoderState(mem: memoryview, current_off: int, current_off_0: int)
- __init__(mem: memoryview, current_off: int, current_off_0: int) None #
- class genlayer.py.eth._internal.type_dicts.EncodeState[source]#
EncodeState(current_off: int, result: bytearray, tails: Tails)
- class genlayer.py.eth._internal.type_dicts.InplaceTuple[source]#
This class indicates that tuple should be encoded/decoded in-place. Which means that even if it is dynamically sized, it is ignored. It is useful for encoding/decoding arguments and returns
- exception genlayer.py.eth._internal.type_dicts.Rollback[source]#
Exception that will be treated as a “Rollback”
- genlayer.py.eth._internal.type_dicts.dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)[source]#
Add dunder methods based on the fields defined in the class.
Examines PEP 526 __annotations__ to determine fields.
If init is true, an __init__() method is added to the class. If repr is true, a __repr__() method is added. If order is true, rich comparison dunder methods are added. If unsafe_hash is true, a __hash__() method is added. If frozen is true, fields may not be assigned to after instance creation. If match_args is true, the __match_args__ tuple is added. If kw_only is true, then by default all fields are keyword-only. If slots is true, a new class with a __slots__ attribute is returned.
- class genlayer.py.eth._internal.type_dicts.partial[source]#
partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
- __new__(**kwargs)#
- args#
tuple of arguments to future partial calls
- func#
function object to use in future partial calls
- keywords#
dictionary of keyword arguments to future partial calls