evmspec package
Subpackages
- evmspec.data package
- Submodules
- evmspec.data.uints module
- Module contents
Address
Address.__new__()
Address.capitalize()
Address.casefold()
Address.center()
Address.checksum()
Address.count()
Address.encode()
Address.endswith()
Address.expandtabs()
Address.find()
Address.format()
Address.format_map()
Address.index()
Address.isalnum()
Address.isalpha()
Address.isascii()
Address.isdecimal()
Address.isdigit()
Address.isidentifier()
Address.islower()
Address.isnumeric()
Address.isprintable()
Address.isspace()
Address.istitle()
Address.isupper()
Address.join()
Address.ljust()
Address.lower()
Address.lstrip()
Address.maketrans()
Address.partition()
Address.removeprefix()
Address.removesuffix()
Address.replace()
Address.rfind()
Address.rindex()
Address.rjust()
Address.rpartition()
Address.rsplit()
Address.rstrip()
Address.split()
Address.splitlines()
Address.startswith()
Address.strip()
Address.swapcase()
Address.title()
Address.translate()
Address.upper()
Address.zfill()
BlockHash
BlockHash.__new__()
BlockHash.capitalize()
BlockHash.center()
BlockHash.count()
BlockHash.decode()
BlockHash.endswith()
BlockHash.expandtabs()
BlockHash.find()
BlockHash.fromhex()
BlockHash.hex()
BlockHash.index()
BlockHash.isalnum()
BlockHash.isalpha()
BlockHash.isascii()
BlockHash.isdigit()
BlockHash.islower()
BlockHash.isspace()
BlockHash.istitle()
BlockHash.isupper()
BlockHash.join()
BlockHash.ljust()
BlockHash.lower()
BlockHash.lstrip()
BlockHash.maketrans()
BlockHash.partition()
BlockHash.removeprefix()
BlockHash.removesuffix()
BlockHash.replace()
BlockHash.rfind()
BlockHash.rindex()
BlockHash.rjust()
BlockHash.rpartition()
BlockHash.rsplit()
BlockHash.rstrip()
BlockHash.split()
BlockHash.splitlines()
BlockHash.startswith()
BlockHash.strip()
BlockHash.swapcase()
BlockHash.title()
BlockHash.to_0x_hex()
BlockHash.translate()
BlockHash.upper()
BlockHash.zfill()
BlockNumber
ChainId
HexBytes32
HexBytes32.__new__()
HexBytes32.capitalize()
HexBytes32.center()
HexBytes32.count()
HexBytes32.decode()
HexBytes32.endswith()
HexBytes32.expandtabs()
HexBytes32.find()
HexBytes32.fromhex()
HexBytes32.hex()
HexBytes32.index()
HexBytes32.isalnum()
HexBytes32.isalpha()
HexBytes32.isascii()
HexBytes32.isdigit()
HexBytes32.islower()
HexBytes32.isspace()
HexBytes32.istitle()
HexBytes32.isupper()
HexBytes32.join()
HexBytes32.ljust()
HexBytes32.lower()
HexBytes32.lstrip()
HexBytes32.maketrans()
HexBytes32.partition()
HexBytes32.removeprefix()
HexBytes32.removesuffix()
HexBytes32.replace()
HexBytes32.rfind()
HexBytes32.rindex()
HexBytes32.rjust()
HexBytes32.rpartition()
HexBytes32.rsplit()
HexBytes32.rstrip()
HexBytes32.split()
HexBytes32.splitlines()
HexBytes32.startswith()
HexBytes32.strip()
HexBytes32.swapcase()
HexBytes32.title()
HexBytes32.to_0x_hex()
HexBytes32.translate()
HexBytes32.upper()
HexBytes32.zfill()
LogIndex
Nonce
TransactionHash
TransactionHash.__new__()
TransactionHash.capitalize()
TransactionHash.center()
TransactionHash.count()
TransactionHash.decode()
TransactionHash.endswith()
TransactionHash.expandtabs()
TransactionHash.find()
TransactionHash.fromhex()
TransactionHash.hex()
TransactionHash.index()
TransactionHash.isalnum()
TransactionHash.isalpha()
TransactionHash.isascii()
TransactionHash.isdigit()
TransactionHash.islower()
TransactionHash.isspace()
TransactionHash.istitle()
TransactionHash.isupper()
TransactionHash.join()
TransactionHash.ljust()
TransactionHash.lower()
TransactionHash.lstrip()
TransactionHash.maketrans()
TransactionHash.partition()
TransactionHash.removeprefix()
TransactionHash.removesuffix()
TransactionHash.replace()
TransactionHash.rfind()
TransactionHash.rindex()
TransactionHash.rjust()
TransactionHash.rpartition()
TransactionHash.rsplit()
TransactionHash.rstrip()
TransactionHash.split()
TransactionHash.splitlines()
TransactionHash.startswith()
TransactionHash.strip()
TransactionHash.swapcase()
TransactionHash.title()
TransactionHash.to_0x_hex()
TransactionHash.translate()
TransactionHash.upper()
TransactionHash.zfill()
TransactionHash.a_sync
TransactionIndex
TransactionIndex.__new__()
TransactionIndex.as_integer_ratio()
TransactionIndex.bit_count()
TransactionIndex.bit_length()
TransactionIndex.conjugate()
TransactionIndex.from_bytes()
TransactionIndex.fromhex()
TransactionIndex.to_bytes()
TransactionIndex.denominator
TransactionIndex.imag
TransactionIndex.numerator
TransactionIndex.real
UnixTimestamp
UnixTimestamp.__new__()
UnixTimestamp.as_integer_ratio()
UnixTimestamp.bit_count()
UnixTimestamp.bit_length()
UnixTimestamp.conjugate()
UnixTimestamp.from_bytes()
UnixTimestamp.fromhex()
UnixTimestamp.to_bytes()
UnixTimestamp.datetime
UnixTimestamp.denominator
UnixTimestamp.imag
UnixTimestamp.numerator
UnixTimestamp.real
Wei
uint
- evmspec.structs package
- Subpackages
- Submodules
- evmspec.structs.block module
BaseBlock
BaseBlock.get()
BaseBlock.items()
BaseBlock.keys()
BaseBlock.values()
BaseBlock.baseFeePerGas
BaseBlock.difficulty
BaseBlock.extraData
BaseBlock.gasLimit
BaseBlock.gasUsed
BaseBlock.hash
BaseBlock.logsBloom
BaseBlock.miner
BaseBlock.mixHash
BaseBlock.nonce
BaseBlock.number
BaseBlock.parentHash
BaseBlock.receiptsRoot
BaseBlock.sha3Uncles
BaseBlock.size
BaseBlock.stateRoot
BaseBlock.timestamp
BaseBlock.totalDifficulty
BaseBlock.transactions
BaseBlock.transactionsRoot
BaseBlock.uncles
Block
Block.get()
Block.items()
Block.keys()
Block.values()
Block.extraData
Block.gasLimit
Block.gasUsed
Block.hash
Block.logsBloom
Block.miner
Block.mixHash
Block.nonce
Block.number
Block.parentHash
Block.receiptsRoot
Block.sha3Uncles
Block.size
Block.stateRoot
Block.timestamp
Block.transactions
Block.transactionsRoot
Block.uncles
MinedBlock
MinedBlock.get()
MinedBlock.items()
MinedBlock.keys()
MinedBlock.values()
MinedBlock.difficulty
MinedBlock.extraData
MinedBlock.gasLimit
MinedBlock.gasUsed
MinedBlock.hash
MinedBlock.logsBloom
MinedBlock.miner
MinedBlock.mixHash
MinedBlock.nonce
MinedBlock.number
MinedBlock.parentHash
MinedBlock.receiptsRoot
MinedBlock.sha3Uncles
MinedBlock.size
MinedBlock.stateRoot
MinedBlock.timestamp
MinedBlock.totalDifficulty
MinedBlock.transactions
MinedBlock.transactionsRoot
MinedBlock.uncles
ShanghaiCapellaBlock
ShanghaiCapellaBlock.get()
ShanghaiCapellaBlock.items()
ShanghaiCapellaBlock.keys()
ShanghaiCapellaBlock.values()
ShanghaiCapellaBlock.extraData
ShanghaiCapellaBlock.gasLimit
ShanghaiCapellaBlock.gasUsed
ShanghaiCapellaBlock.hash
ShanghaiCapellaBlock.logsBloom
ShanghaiCapellaBlock.miner
ShanghaiCapellaBlock.mixHash
ShanghaiCapellaBlock.nonce
ShanghaiCapellaBlock.number
ShanghaiCapellaBlock.parentHash
ShanghaiCapellaBlock.receiptsRoot
ShanghaiCapellaBlock.sha3Uncles
ShanghaiCapellaBlock.size
ShanghaiCapellaBlock.stateRoot
ShanghaiCapellaBlock.timestamp
ShanghaiCapellaBlock.transactions
ShanghaiCapellaBlock.transactionsRoot
ShanghaiCapellaBlock.uncles
ShanghaiCapellaBlock.withdrawals
StakingWithdrawal
TinyBlock
Transactions
- evmspec.structs.header module
- evmspec.structs.log module
Data
Data.__new__()
Data.capitalize()
Data.center()
Data.count()
Data.decode()
Data.endswith()
Data.expandtabs()
Data.find()
Data.fromhex()
Data.hex()
Data.index()
Data.isalnum()
Data.isalpha()
Data.isascii()
Data.isdigit()
Data.islower()
Data.isspace()
Data.istitle()
Data.isupper()
Data.join()
Data.ljust()
Data.lower()
Data.lstrip()
Data.maketrans()
Data.partition()
Data.removeprefix()
Data.removesuffix()
Data.replace()
Data.rfind()
Data.rindex()
Data.rjust()
Data.rpartition()
Data.rsplit()
Data.rstrip()
Data.split()
Data.splitlines()
Data.startswith()
Data.strip()
Data.swapcase()
Data.title()
Data.to_0x_hex()
Data.translate()
Data.upper()
Data.zfill()
Data.as_address
Data.as_uint
Data.as_uint128
Data.as_uint256
Data.as_uint64
Data.as_uint8
FullLog
Log
SmallLog
TinyLog
Topic
Topic.__new__()
Topic.capitalize()
Topic.center()
Topic.count()
Topic.decode()
Topic.endswith()
Topic.expandtabs()
Topic.find()
Topic.fromhex()
Topic.hex()
Topic.index()
Topic.isalnum()
Topic.isalpha()
Topic.isascii()
Topic.isdigit()
Topic.islower()
Topic.isspace()
Topic.istitle()
Topic.isupper()
Topic.join()
Topic.ljust()
Topic.lower()
Topic.lstrip()
Topic.maketrans()
Topic.partition()
Topic.removeprefix()
Topic.removesuffix()
Topic.replace()
Topic.rfind()
Topic.rindex()
Topic.rjust()
Topic.rpartition()
Topic.rsplit()
Topic.rstrip()
Topic.split()
Topic.splitlines()
Topic.startswith()
Topic.strip()
Topic.swapcase()
Topic.title()
Topic.to_0x_hex()
Topic.translate()
Topic.upper()
Topic.zfill()
Topic.as_address
Topic.as_uint
Topic.as_uint104
Topic.as_uint112
Topic.as_uint120
Topic.as_uint128
Topic.as_uint136
Topic.as_uint144
Topic.as_uint152
Topic.as_uint16
Topic.as_uint160
Topic.as_uint168
Topic.as_uint176
Topic.as_uint184
Topic.as_uint192
Topic.as_uint200
Topic.as_uint208
Topic.as_uint216
Topic.as_uint224
Topic.as_uint232
Topic.as_uint24
Topic.as_uint240
Topic.as_uint256
Topic.as_uint32
Topic.as_uint40
Topic.as_uint48
Topic.as_uint56
Topic.as_uint64
Topic.as_uint72
Topic.as_uint8
Topic.as_uint80
Topic.as_uint88
Topic.as_uint96
- evmspec.structs.receipt module
ArbitrumFeeStats
FeeStats
FullTransactionReceipt
FullTransactionReceipt.get()
FullTransactionReceipt.items()
FullTransactionReceipt.keys()
FullTransactionReceipt.values()
FullTransactionReceipt.blobGasUsed
FullTransactionReceipt.blockHash
FullTransactionReceipt.blockNumber
FullTransactionReceipt.contractAddress
FullTransactionReceipt.cumulativeGasUsed
FullTransactionReceipt.effectiveGasPrice
FullTransactionReceipt.feeStats
FullTransactionReceipt.gasUsed
FullTransactionReceipt.l1BlockNumber
FullTransactionReceipt.l1Fee
FullTransactionReceipt.l1FeeScalar
FullTransactionReceipt.l1GasPrice
FullTransactionReceipt.l1GasUsed
FullTransactionReceipt.l1InboxBatchInfo
FullTransactionReceipt.logs
FullTransactionReceipt.logsBloom
FullTransactionReceipt.status
FullTransactionReceipt.transactionHash
FullTransactionReceipt.transactionIndex
FullTransactionReceipt.type
Status
TransactionReceipt
TransactionReceipt.get()
TransactionReceipt.items()
TransactionReceipt.keys()
TransactionReceipt.values()
TransactionReceipt.blobGasUsed
TransactionReceipt.blockNumber
TransactionReceipt.contractAddress
TransactionReceipt.cumulativeGasUsed
TransactionReceipt.effectiveGasPrice
TransactionReceipt.feeStats
TransactionReceipt.gasUsed
TransactionReceipt.l1BlockNumber
TransactionReceipt.l1Fee
TransactionReceipt.l1FeeScalar
TransactionReceipt.l1GasPrice
TransactionReceipt.l1GasUsed
TransactionReceipt.l1InboxBatchInfo
TransactionReceipt.logs
TransactionReceipt.status
TransactionReceipt.transactionHash
TransactionReceipt.transactionIndex
TransactionReceipt.type
- evmspec.structs.transaction module
AccessListEntry
Transaction1559
Transaction1559.get()
Transaction1559.items()
Transaction1559.keys()
Transaction1559.values()
Transaction1559.accessList
Transaction1559.block
Transaction1559.blockHash
Transaction1559.blockNumber
Transaction1559.chainId
Transaction1559.gas
Transaction1559.gasPrice
Transaction1559.hash
Transaction1559.input
Transaction1559.maxFeePerGas
Transaction1559.maxPriorityFeePerGas
Transaction1559.nonce
Transaction1559.r
Transaction1559.s
Transaction1559.sender
Transaction1559.to
Transaction1559.transactionIndex
Transaction1559.type
Transaction1559.v
Transaction1559.value
Transaction2930
Transaction2930.get()
Transaction2930.items()
Transaction2930.keys()
Transaction2930.values()
Transaction2930.accessList
Transaction2930.block
Transaction2930.blockHash
Transaction2930.blockNumber
Transaction2930.chainId
Transaction2930.gas
Transaction2930.gasPrice
Transaction2930.hash
Transaction2930.input
Transaction2930.nonce
Transaction2930.r
Transaction2930.s
Transaction2930.sender
Transaction2930.to
Transaction2930.transactionIndex
Transaction2930.type
Transaction2930.v
Transaction2930.value
Transaction4844
Transaction4844.get()
Transaction4844.items()
Transaction4844.keys()
Transaction4844.values()
Transaction4844.accessList
Transaction4844.blobVersionedHashes
Transaction4844.block
Transaction4844.blockHash
Transaction4844.blockNumber
Transaction4844.chainId
Transaction4844.gas
Transaction4844.gasPrice
Transaction4844.hash
Transaction4844.input
Transaction4844.maxFeePerBlobGas
Transaction4844.maxFeePerGas
Transaction4844.maxPriorityFeePerGas
Transaction4844.nonce
Transaction4844.r
Transaction4844.s
Transaction4844.sender
Transaction4844.to
Transaction4844.transactionIndex
Transaction4844.type
Transaction4844.v
Transaction4844.value
TransactionLegacy
TransactionLegacy.get()
TransactionLegacy.items()
TransactionLegacy.keys()
TransactionLegacy.values()
TransactionLegacy.accessList
TransactionLegacy.block
TransactionLegacy.blockHash
TransactionLegacy.blockNumber
TransactionLegacy.chainId
TransactionLegacy.gas
TransactionLegacy.gasPrice
TransactionLegacy.hash
TransactionLegacy.input
TransactionLegacy.nonce
TransactionLegacy.r
TransactionLegacy.s
TransactionLegacy.sender
TransactionLegacy.to
TransactionLegacy.transactionIndex
TransactionLegacy.type
TransactionLegacy.v
TransactionLegacy.value
TransactionRLP
TransactionRLP.get()
TransactionRLP.items()
TransactionRLP.keys()
TransactionRLP.values()
TransactionRLP.accessList
TransactionRLP.arbSubType
TransactionRLP.arbType
TransactionRLP.block
TransactionRLP.blockHash
TransactionRLP.blockNumber
TransactionRLP.chainId
TransactionRLP.gas
TransactionRLP.gasPrice
TransactionRLP.hash
TransactionRLP.indexInParent
TransactionRLP.input
TransactionRLP.l1BlockNumber
TransactionRLP.l1TxOrigin
TransactionRLP.nonce
TransactionRLP.r
TransactionRLP.s
TransactionRLP.sender
TransactionRLP.to
TransactionRLP.transactionIndex
TransactionRLP.v
TransactionRLP.value
- Module contents
ErigonBlockHeader
FullTransactionReceipt
FullTransactionReceipt.get()
FullTransactionReceipt.items()
FullTransactionReceipt.keys()
FullTransactionReceipt.values()
FullTransactionReceipt.blobGasUsed
FullTransactionReceipt.blockHash
FullTransactionReceipt.blockNumber
FullTransactionReceipt.contractAddress
FullTransactionReceipt.cumulativeGasUsed
FullTransactionReceipt.effectiveGasPrice
FullTransactionReceipt.feeStats
FullTransactionReceipt.gasUsed
FullTransactionReceipt.l1BlockNumber
FullTransactionReceipt.l1Fee
FullTransactionReceipt.l1FeeScalar
FullTransactionReceipt.l1GasPrice
FullTransactionReceipt.l1GasUsed
FullTransactionReceipt.l1InboxBatchInfo
FullTransactionReceipt.logs
FullTransactionReceipt.logsBloom
FullTransactionReceipt.status
FullTransactionReceipt.transactionHash
FullTransactionReceipt.transactionIndex
FullTransactionReceipt.type
Log
Transaction1559
Transaction1559.get()
Transaction1559.items()
Transaction1559.keys()
Transaction1559.values()
Transaction1559.accessList
Transaction1559.block
Transaction1559.blockHash
Transaction1559.blockNumber
Transaction1559.chainId
Transaction1559.gas
Transaction1559.gasPrice
Transaction1559.hash
Transaction1559.input
Transaction1559.maxFeePerGas
Transaction1559.maxPriorityFeePerGas
Transaction1559.nonce
Transaction1559.r
Transaction1559.s
Transaction1559.sender
Transaction1559.to
Transaction1559.transactionIndex
Transaction1559.type
Transaction1559.v
Transaction1559.value
Transaction2930
Transaction2930.get()
Transaction2930.items()
Transaction2930.keys()
Transaction2930.values()
Transaction2930.accessList
Transaction2930.block
Transaction2930.blockHash
Transaction2930.blockNumber
Transaction2930.chainId
Transaction2930.gas
Transaction2930.gasPrice
Transaction2930.hash
Transaction2930.input
Transaction2930.nonce
Transaction2930.r
Transaction2930.s
Transaction2930.sender
Transaction2930.to
Transaction2930.transactionIndex
Transaction2930.type
Transaction2930.v
Transaction2930.value
TransactionLegacy
TransactionLegacy.get()
TransactionLegacy.items()
TransactionLegacy.keys()
TransactionLegacy.values()
TransactionLegacy.accessList
TransactionLegacy.block
TransactionLegacy.blockHash
TransactionLegacy.blockNumber
TransactionLegacy.chainId
TransactionLegacy.gas
TransactionLegacy.gasPrice
TransactionLegacy.hash
TransactionLegacy.input
TransactionLegacy.nonce
TransactionLegacy.r
TransactionLegacy.s
TransactionLegacy.sender
TransactionLegacy.to
TransactionLegacy.transactionIndex
TransactionLegacy.type
TransactionLegacy.v
TransactionLegacy.value
TransactionRLP
TransactionRLP.get()
TransactionRLP.items()
TransactionRLP.keys()
TransactionRLP.values()
TransactionRLP.accessList
TransactionRLP.arbSubType
TransactionRLP.arbType
TransactionRLP.block
TransactionRLP.blockHash
TransactionRLP.blockNumber
TransactionRLP.chainId
TransactionRLP.gas
TransactionRLP.gasPrice
TransactionRLP.hash
TransactionRLP.indexInParent
TransactionRLP.input
TransactionRLP.l1BlockNumber
TransactionRLP.l1TxOrigin
TransactionRLP.nonce
TransactionRLP.r
TransactionRLP.s
TransactionRLP.sender
TransactionRLP.to
TransactionRLP.transactionIndex
TransactionRLP.v
TransactionRLP.value
TransactionReceipt
TransactionReceipt.get()
TransactionReceipt.items()
TransactionReceipt.keys()
TransactionReceipt.values()
TransactionReceipt.blobGasUsed
TransactionReceipt.blockNumber
TransactionReceipt.contractAddress
TransactionReceipt.cumulativeGasUsed
TransactionReceipt.effectiveGasPrice
TransactionReceipt.feeStats
TransactionReceipt.gasUsed
TransactionReceipt.l1BlockNumber
TransactionReceipt.l1Fee
TransactionReceipt.l1FeeScalar
TransactionReceipt.l1GasPrice
TransactionReceipt.l1GasUsed
TransactionReceipt.l1InboxBatchInfo
TransactionReceipt.logs
TransactionReceipt.status
TransactionReceipt.transactionHash
TransactionReceipt.transactionIndex
TransactionReceipt.type
Module contents
- class evmspec.ErigonBlockHeader[source]
Bases:
LazyDictStruct
Represents a block header in the Erigon client.
This class inherits from
LazyDictStruct
, which provides features for handling block header data, ensuring immutability and strictness to known fields. It is currently under development, and specific features may not yet be functional. There may be known issues needing resolution.See also
LazyDictStruct
for more details on the underlying structure and its features.
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- coinbase: Address
The address of the miner who mined the block.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.coinbase Address('0x123')
- difficulty: uint
The difficulty level of the block.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.difficulty uint(1000)
- parentHash: HexBytes
The hash of the parent block.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.parentHash HexBytes('0xabc')
- root: HexBytes
The root hash of the state trie.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.root HexBytes('0x456')
- timestamp: UnixTimestamp
The Unix timestamp for when the block was collated.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.timestamp UnixTimestamp(1638316800)
- uncleHash: HexBytes
The hash of the list of uncle headers.
Examples
>>> header = ErigonBlockHeader( ... timestamp=UnixTimestamp(1638316800), ... parentHash=HexBytes("0xabc"), ... uncleHash=HexBytes("0xdef"), ... coinbase=Address("0x123"), ... root=HexBytes("0x456"), ... difficulty=uint(1000) ... ) >>> header.uncleHash HexBytes('0xdef')
- class evmspec.FullTransactionReceipt[source]
Bases:
TransactionReceipt
Extends
TransactionReceipt
to include full details.- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- blobGasUsed: Wei
This field is sometimes present, only on Mainnet.
Examples
>>> receipt.blobGasUsed Wei(0)
- blockHash: HexBytes
The hash of the block that contains the transaction.
Examples
>>> full_receipt.blockHash HexBytes('0x...')
- blockNumber: BlockNumber
The block number that contains the transaction.
Examples
>>> receipt.blockNumber BlockNumber(1234567)
- contractAddress: Address | None
The contract address created, if the transaction was a contract creation, otherwise None.
Examples
>>> receipt.contractAddress Address('0x...')
- cumulativeGasUsed: Wei
The total amount of gas used in the block up to and including this transaction.
Examples
>>> receipt.cumulativeGasUsed Wei(100000)
- effectiveGasPrice: Wei
The actual value per gas deducted from the sender’s account.
This field is only present on Mainnet.
Examples
>>> receipt.effectiveGasPrice Wei(1000000000)
- property feeStats: ArbitrumFeeStats
This field is only present on Arbitrum.
Examples
>>> receipt.feeStats ArbitrumFeeStats(...)
- gasUsed: Wei
The amount of gas used by this transaction, not counting internal transactions, calls or delegate calls.
Examples
>>> receipt.gasUsed Wei(21000)
- l1BlockNumber: BlockNumber
This field is only present on Arbitrum.
Examples
>>> receipt.l1BlockNumber BlockNumber(1234567)
- l1FeeScalar: Decimal
This field is only present on Optimism.
Examples
>>> receipt.l1FeeScalar Decimal('1.0')
- l1GasPrice: Wei
This field is only present on Optimism.
Examples
>>> receipt.l1GasPrice Wei(1000000000)
- l1InboxBatchInfo: HexBytes | None
This field is only present on Arbitrum.
Examples
>>> receipt.l1InboxBatchInfo HexBytes('0x...')
- property logs: Tuple[Log, ...]
The logs that were generated during this transaction.
Examples
>>> receipt.logs (Log(...), Log(...))
- logsBloom: HexBytes
The bloom filter for all logs in this block.
Examples
>>> full_receipt.logsBloom HexBytes('0x...')
- status: Status
The status of the transaction, represented by the
Status
enum:Status.success
(1) if the transaction succeeded,Status.failure
(0) if it failed.Examples
>>> receipt.status <Status.success: 1>
- transactionHash: TransactionHash
The unique hash of this transaction.
Examples
>>> receipt.transactionHash TransactionHash('0x...')
- transactionIndex: TransactionIndex
The position of this transaction within the block.
Examples
>>> receipt.transactionIndex TransactionIndex(0)
- class evmspec.Log[source]
Bases:
SmallLog
Represents a comprehensive log structure with additional transaction details.
See also
SmallLog
for the log structure with address and data.- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- property block: BlockNumber | None
A shorthand getter for ‘blockNumber’.
- blockNumber: BlockNumber | None
The block where the transaction was included where the log originated from. None for pending transactions.
- removed: bool | None
True when the log was removed, due to a chain reorganization. False if it’s a valid log.
- topics: Tuple[Topic, ...]
An array of 0 to 4 32-byte topics. The first topic is the event signature and the others are indexed filters on the event return data.
- transactionHash: TransactionHash
The hash of the transaction that generated the log.
- transactionIndex: TransactionIndex
The index of the transaction in the block, where the log originated from.
- class evmspec.Transaction1559[source]
Bases:
_TransactionBase
Represents a type-1559 (EIP-1559) Ethereum transaction with dynamic fee.
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- property accessList: List[AccessListEntry]
Decodes the access list from raw format to a list of AccessListEntry.
Example
>>> transaction = _TransactionBase(...) >>> access_list = transaction.accessList >>> isinstance(access_list, list) True >>> isinstance(access_list[0], AccessListEntry) True
See also
AccessListEntry
- property block: BlockNumber
A shorthand getter for blockNumber.
Example
>>> transaction = _TransactionBase(...) >>> transaction.block == transaction.blockNumber True
- blockNumber: BlockNumber
The number of the block including this transaction.
- chainId: ChainId | None
The chain id of the transaction, if any.
None for v in {27, 28}, otherwise derived from eip-155.
This field is not included in the transactions field of a eth_getBlock response.
- hash: TransactionHash
The hash of the transaction.
- sender: Address
The address of the sender.
Note
This attribute is mapped to the
field()
name ‘from’ during serialization and deserialization.
- transactionIndex: TransactionIndex
The index position of the transaction in the block.
- class evmspec.Transaction2930[source]
Bases:
_TransactionBase
Represents a type-2930 (EIP-2930) Ethereum transaction with an access list.
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- property accessList: List[AccessListEntry]
Decodes the access list from raw format to a list of AccessListEntry.
Example
>>> transaction = _TransactionBase(...) >>> access_list = transaction.accessList >>> isinstance(access_list, list) True >>> isinstance(access_list[0], AccessListEntry) True
See also
AccessListEntry
- property block: BlockNumber
A shorthand getter for blockNumber.
Example
>>> transaction = _TransactionBase(...) >>> transaction.block == transaction.blockNumber True
- blockNumber: BlockNumber
The number of the block including this transaction.
- chainId: ChainId | None
The chain id of the transaction, if any.
None for v in {27, 28}, otherwise derived from eip-155.
This field is not included in the transactions field of a eth_getBlock response.
- hash: TransactionHash
The hash of the transaction.
- sender: Address
The address of the sender.
Note
This attribute is mapped to the
field()
name ‘from’ during serialization and deserialization.
- transactionIndex: TransactionIndex
The index position of the transaction in the block.
- class evmspec.TransactionLegacy[source]
Bases:
_TransactionBase
Represents a Legacy Ethereum transaction (pre-EIP-2718).
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- property accessList: List[AccessListEntry]
Decodes the access list from raw format to a list of AccessListEntry.
Example
>>> transaction = _TransactionBase(...) >>> access_list = transaction.accessList >>> isinstance(access_list, list) True >>> isinstance(access_list[0], AccessListEntry) True
See also
AccessListEntry
- property block: BlockNumber
A shorthand getter for blockNumber.
Example
>>> transaction = _TransactionBase(...) >>> transaction.block == transaction.blockNumber True
- blockNumber: BlockNumber
The number of the block including this transaction.
- chainId: ChainId | None
The chain id of the transaction, if any.
None for v in {27, 28}, otherwise derived from eip-155.
This field is not included in the transactions field of a eth_getBlock response.
- hash: TransactionHash
The hash of the transaction.
- sender: Address
The address of the sender.
Note
This attribute is mapped to the
field()
name ‘from’ during serialization and deserialization.
- transactionIndex: TransactionIndex
The index position of the transaction in the block.
- class evmspec.TransactionRLP[source]
Bases:
_TransactionBase
Represents a RLP encoded transaction that might have network-specific fields.
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- property accessList: List[AccessListEntry]
Decodes the access list from raw format to a list of AccessListEntry.
Example
>>> transaction = _TransactionBase(...) >>> access_list = transaction.accessList >>> isinstance(access_list, list) True >>> isinstance(access_list[0], AccessListEntry) True
See also
AccessListEntry
- property block: BlockNumber
A shorthand getter for blockNumber.
Example
>>> transaction = _TransactionBase(...) >>> transaction.block == transaction.blockNumber True
- blockNumber: BlockNumber
The number of the block including this transaction.
- chainId: ChainId | None
The chain id of the transaction, if any.
None for v in {27, 28}, otherwise derived from eip-155.
This field is not included in the transactions field of a eth_getBlock response.
- hash: TransactionHash
The hash of the transaction.
- l1BlockNumber: BlockNumber
- sender: Address
The address of the sender.
Note
This attribute is mapped to the
field()
name ‘from’ during serialization and deserialization.
- transactionIndex: TransactionIndex
The index position of the transaction in the block.
- class evmspec.TransactionReceipt[source]
Bases:
LazyDictStruct
Represents the receipt of a transaction within a block.
See also
- get(key, default=None)
Get the value associated with a key, or a default value if the key is not present.
- Parameters:
key (str) – The key to look up.
default (optional) – The value to return if the key is not present.
- Return type:
Example
>>> class MyStruct(DictStruct): ... field1: str >>> s = MyStruct(field1="value") >>> s.get('field1') 'value' >>> s.get('field2', 'default') 'default'
- items()
Returns an iterator over the struct’s field name and value pairs.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.items()) [('field1', 'value'), ('field2', 42)]
- keys()
Returns an iterator over the field names of the struct.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.keys()) ['field1', 'field2']
- values()
Returns an iterator over the struct’s field values.
Example
>>> class MyStruct(DictStruct): ... field1: str ... field2: int >>> s = MyStruct(field1="value", field2=42) >>> list(s.values()) ['value', 42]
- blobGasUsed: Wei
This field is sometimes present, only on Mainnet.
Examples
>>> receipt.blobGasUsed Wei(0)
- blockNumber: BlockNumber
The block number that contains the transaction.
Examples
>>> receipt.blockNumber BlockNumber(1234567)
- contractAddress: Address | None
The contract address created, if the transaction was a contract creation, otherwise None.
Examples
>>> receipt.contractAddress Address('0x...')
- cumulativeGasUsed: Wei
The total amount of gas used in the block up to and including this transaction.
Examples
>>> receipt.cumulativeGasUsed Wei(100000)
- effectiveGasPrice: Wei
The actual value per gas deducted from the sender’s account.
This field is only present on Mainnet.
Examples
>>> receipt.effectiveGasPrice Wei(1000000000)
- property feeStats: ArbitrumFeeStats
This field is only present on Arbitrum.
Examples
>>> receipt.feeStats ArbitrumFeeStats(...)
- gasUsed: Wei
The amount of gas used by this transaction, not counting internal transactions, calls or delegate calls.
Examples
>>> receipt.gasUsed Wei(21000)
- l1BlockNumber: BlockNumber
This field is only present on Arbitrum.
Examples
>>> receipt.l1BlockNumber BlockNumber(1234567)
- l1FeeScalar: Decimal
This field is only present on Optimism.
Examples
>>> receipt.l1FeeScalar Decimal('1.0')
- l1GasPrice: Wei
This field is only present on Optimism.
Examples
>>> receipt.l1GasPrice Wei(1000000000)
- l1InboxBatchInfo: HexBytes | None
This field is only present on Arbitrum.
Examples
>>> receipt.l1InboxBatchInfo HexBytes('0x...')
- property logs: Tuple[Log, ...]
The logs that were generated during this transaction.
Examples
>>> receipt.logs (Log(...), Log(...))
- status: Status
The status of the transaction, represented by the
Status
enum:Status.success
(1) if the transaction succeeded,Status.failure
(0) if it failed.Examples
>>> receipt.status <Status.success: 1>
- transactionHash: TransactionHash
The unique hash of this transaction.
Examples
>>> receipt.transactionHash TransactionHash('0x...')
- transactionIndex: TransactionIndex
The position of this transaction within the block.
Examples
>>> receipt.transactionIndex TransactionIndex(0)