Rpc¶
- class arbitrum_py.data_entities.rpc.ArbBlockProps(*args, **kwargs)[source]¶
Bases:
dictAdditional fields for an Arbitrum block beyond standard Ethereum block fields.
This class defines the Arbitrum-specific fields that extend a standard Ethereum block. These fields provide information about L2->L1 messages (withdrawals) and L1 block number tracking.
- Variables:
sendRoot (HexStr) – The merkle root of the withdrawals tree
sendCount (int) – Cumulative number of withdrawals since genesis
l1BlockNumber (int) – The L1 block number as seen from within this L2 block. This is used for block.number calls within Arbitrum transactions. See: https://developer.offchainlabs.com/docs/time_in_arbitrum
-
sendRoot:
NewType()(HexStr,str)¶
-
sendCount:
int¶
-
l1BlockNumber:
int¶
- class arbitrum_py.data_entities.rpc.ArbBlock(block_data)[source]¶
Bases:
Dict[str,Any]An Arbitrum block combining standard Ethereum and Arbitrum-specific fields.
This class merges standard Web3 block data (Web3Block) with Arbitrum-specific fields (ArbBlockProps). It provides a complete view of an Arbitrum block including both L1 and L2 relevant information.
- Inherits all fields from Web3Block (standard Ethereum block fields) plus:
All fields from ArbBlockProps
- class arbitrum_py.data_entities.rpc.ArbBlockWithTransactions(block_data)[source]¶
Bases:
ArbBlockAn Arbitrum block that includes full transaction objects.
Similar to ethers.js BlockWithTransactions, this class includes the full transaction objects rather than just transaction hashes. Useful when you need detailed transaction data along with the block data.
- Variables:
transactions (List[TxData]) – List of full transaction objects included in this block
- class arbitrum_py.data_entities.rpc.ArbTransactionReceipt(receipt_data)[source]¶
Bases:
Dict[str,Any]An Ethereum transaction receipt with additional Arbitrum-specific fields.
This class extends the standard Ethereum transaction receipt with fields that are specific to Arbitrum’s L2 execution environment, particularly around L1 block number tracking and L1 computation costs.
- Variables:
l1BlockNumber (int) – The L1 block number that would be used for block.number calls occurring within this transaction. See: https://developer.offchainlabs.com/docs/time_in_arbitrum
gasUsedForL1 (int) – Amount of gas spent on L1 computation, denominated in L2 gas units
transactionHash (Hash32) – Hash of the transaction
transactionIndex (int) – Integer of the transaction’s index position in the block
blockHash (Hash32) – Hash of the block where this transaction was in
blockNumber (BlockNumber) – Block number where this transaction was in
from (HexStr) – Address of the sender
to (Optional[HexStr]) – Address of the receiver. null when its a contract creation
status (int) – Either 1 (success) or 0 (failure)
contractAddress (Optional[HexStr]) – The contract address created, if the transaction was a contract creation, otherwise null
logs (List[LogReceipt]) – Array of log objects that this transaction generated