ChildTransaction¶
- class arbitrum_py.message.child_transaction.RedeemTransaction(transaction, child_provider)[source]¶
Bases:
objectA redeemable transaction with wait functionality.
A transaction that can be redeemed on the Arbitrum chain. Provides methods to wait for both transaction confirmation and redeem completion.
- Parameters:
transaction (
Dict[str,Any]) – The transaction objectchild_provider (
Any) – The provider instance for child chain operations
- wait()[source]¶
Wait for transaction confirmation.
- Return type:
Dict[str,Any]- Returns:
The transaction receipt
- wait_for_redeem()[source]¶
Wait for redeem completion and return the transaction receipt.
This method waits for the redeem transaction to complete and returns the receipt of the redemption transaction.
- Return type:
TxReceipt- Returns:
The transaction receipt of the redeem transaction
- Raises:
ArbSdkError – If the transaction is not a valid redeem transaction
- class arbitrum_py.message.child_transaction.ChildTransactionReceipt(tx)[source]¶
Bases:
CaseDictExtension of transaction receipt with Arbitrum-specific functionality.
This class extends the standard transaction receipt with additional methods specific to Arbitrum chain operations, such as handling child-to-parent messages and batch information.
- Parameters:
tx (
Dict[str,Any]) – The transaction receipt dictionary
- get_child_to_parent_events()[source]¶
Get child-to-parent transaction events.
Retrieves both classic and nitro L2-to-L1 transaction events from the logs.
- Return type:
List[Dict[str,Any]]- Returns:
List of child-to-parent transaction events
- get_redeem_scheduled_events()[source]¶
Get redeem scheduled events from transaction logs.
- Return type:
List[Dict[str,Any]]- Returns:
List of redeem scheduled events
- get_child_to_parent_messages(parent_signer_or_provider)[source]¶
Get child-to-parent messages from the transaction.
- Parameters:
parent_signer_or_provider (
Any) – The parent chain signer or provider- Return type:
List[ChildToParentMessage]- Returns:
List of child-to-parent messages
- Raises:
ArbSdkError – If signer is not connected to a provider
- get_batch_confirmations(child_provider)[source]¶
Get batch confirmations on parent chain.
- Parameters:
child_provider (
Any) – The child chain provider- Return type:
int- Returns:
Number of confirmations
- get_batch_number(child_provider)[source]¶
Get the batch number containing this transaction.
- Parameters:
child_provider (
Any) – The child chain provider- Return type:
int- Returns:
Batch number
- is_data_available(child_provider, confirmations=10)[source]¶
Check if transaction data is available on parent chain.
- Parameters:
child_provider (
Any) – The child chain providerconfirmations (
int) – Number of required confirmations
- Return type:
bool- Returns:
True if data is available
- static monkey_patch_wait(contract_transaction)[source]¶
Add wait functionality to contract transaction.
- Parameters:
contract_transaction (
Dict[str,Any]) – The contract transaction- Return type:
- Returns:
The patched transaction receipt
- class arbitrum_py.message.child_transaction.ChildContractTransaction[source]¶
Bases:
objectBase class for child chain contract transactions.