evmspec package

Subpackages

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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)
l1Fee: Wei

This field is only present on Optimism.

Examples

>>> receipt.l1Fee
Wei(50000000000)
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)
l1GasUsed: Wei

This field is only present on Optimism.

Examples

>>> receipt.l1GasUsed
Wei(50000)
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)
type: uint

The transaction type.

This field is only present on Mainnet.

Examples

>>> receipt.type
uint(2)
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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

address: Address | None

The address of the contract that generated the log.

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.

data: Data | None

Array of 32-bytes non-indexed return data of the log.

logIndex: LogIndex

Index position of the log in the transaction. 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.

property topic0: Topic

Returns the first topic.

property topic1: Topic

Returns the second topic if it exists, otherwise raises an AttributeError.

property topic2: Topic

Returns the third topic if it exists, otherwise raises an AttributeError.

property topic3: Topic

Returns the fourth topic if it exists, otherwise raises an AttributeError.

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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
blockHash: BlockHash

The hash of the block including this transaction.

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.

gas: Wei

The gas provided by the sender.

gasPrice: Wei

The gas price provided by the sender in wei.

hash: TransactionHash

The hash of the transaction.

input: HexBytes

The data sent along with the transaction.

maxFeePerGas: Wei

The maximum fee per gas set in the transaction.

maxPriorityFeePerGas: Wei

The maximum priority gas fee set in the transaction.

nonce: Nonce

The number of transactions made by the sender before this one.

r: HexBytes

The R field of the signature.

s: HexBytes

The S field of the signature.

sender: Address

The address of the sender.

Note

This attribute is mapped to the field() name ‘from’ during serialization and deserialization.

to: Address | None

The address of the receiver. None when it’s a contract creation transaction.

transactionIndex: TransactionIndex

The index position of the transaction in the block.

type: ClassVar[HexBytes] = HexBytes('0x02')
v: uint

ECDSA recovery ID.

value: Wei

The value transferred in wei encoded as hexadecimal.

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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
blockHash: BlockHash

The hash of the block including this transaction.

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.

gas: Wei

The gas provided by the sender.

gasPrice: Wei

The gas price provided by the sender in wei.

hash: TransactionHash

The hash of the transaction.

input: HexBytes

The data sent along with the transaction.

nonce: Nonce

The number of transactions made by the sender before this one.

r: HexBytes

The R field of the signature.

s: HexBytes

The S field of the signature.

sender: Address

The address of the sender.

Note

This attribute is mapped to the field() name ‘from’ during serialization and deserialization.

to: Address | None

The address of the receiver. None when it’s a contract creation transaction.

transactionIndex: TransactionIndex

The index position of the transaction in the block.

type: ClassVar[HexBytes] = HexBytes('0x01')
v: uint

ECDSA recovery ID.

value: Wei

The value transferred in wei encoded as hexadecimal.

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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
blockHash: BlockHash

The hash of the block including this transaction.

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.

gas: Wei

The gas provided by the sender.

gasPrice: Wei

The gas price provided by the sender in wei.

hash: TransactionHash

The hash of the transaction.

input: HexBytes

The data sent along with the transaction.

nonce: Nonce

The number of transactions made by the sender before this one.

r: HexBytes

The R field of the signature.

s: HexBytes

The S field of the signature.

sender: Address

The address of the sender.

Note

This attribute is mapped to the field() name ‘from’ during serialization and deserialization.

to: Address | None

The address of the receiver. None when it’s a contract creation transaction.

transactionIndex: TransactionIndex

The index position of the transaction in the block.

type: ClassVar[HexBytes] = HexBytes('0x00')
v: uint

ECDSA recovery ID.

value: Wei

The value transferred in wei encoded as hexadecimal.

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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

arbSubType: uint
arbType: uint
property block: BlockNumber

A shorthand getter for blockNumber.

Example

>>> transaction = _TransactionBase(...)
>>> transaction.block == transaction.blockNumber
True
blockHash: BlockHash

The hash of the block including this transaction.

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.

gas: Wei

The gas provided by the sender.

gasPrice: Wei

The gas price provided by the sender in wei.

hash: TransactionHash

The hash of the transaction.

indexInParent: uint
input: HexBytes

The data sent along with the transaction.

l1BlockNumber: BlockNumber
l1TxOrigin: Address
nonce: Nonce

The number of transactions made by the sender before this one.

r: HexBytes

The R field of the signature.

s: HexBytes

The S field of the signature.

sender: Address

The address of the sender.

Note

This attribute is mapped to the field() name ‘from’ during serialization and deserialization.

to: Address | None

The address of the receiver. None when it’s a contract creation transaction.

transactionIndex: TransactionIndex

The index position of the transaction in the block.

v: uint

ECDSA recovery ID.

value: Wei

The value transferred in wei encoded as hexadecimal.

class evmspec.TransactionReceipt[source]

Bases: LazyDictStruct

Represents the receipt of a transaction within a block.

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:

Any

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)]
Return type:

Iterator[Tuple[str, Any]]

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']
Return type:

Iterator[str]

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]
Return type:

Iterator[Any]

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)
l1Fee: Wei

This field is only present on Optimism.

Examples

>>> receipt.l1Fee
Wei(50000000000)
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)
l1GasUsed: Wei

This field is only present on Optimism.

Examples

>>> receipt.l1GasUsed
Wei(50000)
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)
type: uint

The transaction type.

This field is only present on Mainnet.

Examples

>>> receipt.type
uint(2)