Types¶
The following types are available from the eth_typing module.
i.e.
from eth_typing import TypeStr
Application Binary Interface¶
Enumerables¶
ForkName¶
Class that contains the different names used to represent hard forks on the Ethereum network.
class ForkName:
Frontier = 'Frontier'
Homestead = 'Homestead'
EIP150 = 'EIP150'
EIP158 = 'EIP158'
Byzantium = 'Byzantium'
Constantinople = 'Constantinople'
Metropolis = 'Metropolis'
ChainId¶
IntEnum class defining EVM-compatible network name enums as their respective chain id int values.
To learn more about chain ids, see CAIP-2 for details.
The list of chain ids is available from the ethereum-lists/chains repository.
class ChainId(IntEnum):
# L1 networks
ETH = 1
EXP = 2
ROP = 3
RIN = 4
GOR = 5
# L2 networks
OETH = 10
GNO = 100
Discovery¶
EthPM¶
ContractName¶
Any string conforming to the regular expression [a-zA-Z][a-zA-Z0-9_]{0,255}.
ContractName = NewType('ContractName', str)
EVM¶
HexAddress¶
Any HexStr representing a hex encoded address.
HexAddress = NewType('HexAddress', HexStr)
ChecksumAddress¶
Any HexAddress that is formatted according to ERC55.
ChecksumAddress = NewType('ChecksumAddress', HexAddress)
AnyAddress¶
Any of Address, HexAddress, ChecksumAddress.
AnyAddress = TypeVar('AnyAddress', Address, HexAddress, ChecksumAddress)
BlockNumber¶
Any integer that represents a valid block number on a chain.
BlockNumber = NewType('BlockNumber', int)
BlockIdentifier¶
Either a 32 byte hash or an integer block number
BlockIdentifier = Union[Hash32, BlockNumber]