ChildTransaction

class arbitrum_py.message.child_transaction.RedeemTransaction(transaction, child_provider)[source]

Bases: object

A 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 object

  • child_provider (Any) – The provider instance for child chain operations

__init__(transaction, child_provider)[source]
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: CaseDict

Extension 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

__init__(tx)[source]
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 provider

  • confirmations (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:

ChildTransactionReceipt

Returns:

The patched transaction receipt

static to_redeem_transaction(redeem_tx, child_provider)[source]

Convert to redeemable transaction.

Parameters:
  • redeem_tx (Dict[str, Any]) – The redeem transaction

  • child_provider (Any) – The child chain provider

Return type:

RedeemTransaction

Returns:

The redeem transaction

class arbitrum_py.message.child_transaction.ChildContractTransaction[source]

Bases: object

Base class for child chain contract transactions.

wait(confirmations=None)[source]

Wait for transaction confirmation.

Parameters:

confirmations (Optional[int]) – Number of confirmations to wait for

Return type:

ChildTransactionReceipt

Returns:

The transaction receipt