Message

Message data entities for Arbitrum SDK.

This module defines the data structures and enums used for handling messages between L1 and L2 chains in the Arbitrum protocol.

class arbitrum_py.data_entities.message.RetryableMessageParams(destAddress, l2CallValue, l1Value, maxSubmissionFee, excessFeeRefundAddress, callValueRefundAddress, gasLimit, maxFeePerGas, data)[source]

Bases: object

The components of a submit retryable message.

This class represents the parameters needed to create a retryable ticket on Arbitrum’s L2. These parameters are typically parsed from events emitted by the Inbox contract on L1.

Variables:
  • destAddress – Destination address for L2 message

  • l2CallValue – Call value in L2 message

  • l1Value – Value sent at L1

  • maxSubmissionFee – Max gas deducted from L2 balance to cover base submission fee

  • excessFeeRefundAddress – L2 address to credit (gaslimit x gasprice - execution cost)

  • callValueRefundAddress – Address to credit l2CallValue on L2 if retryable txn times out or gets cancelled

  • gasLimit – Max gas deducted from user’s L2 balance to cover L2 execution

  • maxFeePerGas – Gas price for L2 execution

  • data – Calldata for the L2 message

destAddress: NewType()(HexStr, str)
l2CallValue: NewType()(Wei, int)
l1Value: NewType()(Wei, int)
maxSubmissionFee: NewType()(Wei, int)
excessFeeRefundAddress: NewType()(HexStr, str)
callValueRefundAddress: NewType()(HexStr, str)
gasLimit: NewType()(Wei, int)
maxFeePerGas: NewType()(Wei, int)
data: NewType()(HexStr, str)
__post_init__()[source]

Validate and convert input types after initialization.

Return type:

None

__init__(destAddress, l2CallValue, l1Value, maxSubmissionFee, excessFeeRefundAddress, callValueRefundAddress, gasLimit, maxFeePerGas, data)
class arbitrum_py.data_entities.message.InboxMessageKind(value)[source]

Bases: Enum

The inbox message kind for L1<->L2 messages.

These values are defined in the Arbitrum Nitro protocol at: https://github.com/OffchainLabs/nitro/blob/master/contracts/src/libraries/MessageTypes.sol

Variables:
  • L1MessageType_submitRetryableTx – Represents a retryable ticket submission (value: 9)

  • L1MessageType_ethDeposit – Represents an ETH deposit from L1 to L2 (value: 12)

  • L2MessageType_signedTx – Represents a signed transaction on L2 (value: 4)

L1MessageType_submitRetryableTx = 9
L1MessageType_ethDeposit = 12
L2MessageType_signedTx = 4
class arbitrum_py.data_entities.message.ChildToParentMessageStatus(value)[source]

Bases: Enum

Status of an L2->L1 outgoing message.

This enum represents the possible states of a message sent from L2 to L1 through ArbSys.sendTxToL1.

Variables:
  • UNCONFIRMED – ArbSys.sendTxToL1 called, but assertion not yet confirmed

  • CONFIRMED – Assertion for outgoing message confirmed, but message not yet executed

  • EXECUTED – Outgoing message executed (terminal state)

UNCONFIRMED = 1
CONFIRMED = 2
EXECUTED = 3