cancelL1ToL2Message
startL1ToL2MessageCancellation
function. The time between the calls to these two functions must be at least the number of seconds defined by the messageCancellationDelay
function.
Only a sender can cancel a message.
If the message is missing, the call reverts.
Be aware that the message fee is not refunded.
uint256 toAddress | The address of the L2 contract. |
uint256 selector | The function, in the recipient L2 contract, that the message called. |
uint256[] calldata payload | The payload of the message. |
uint256 nonce | The nonce of the message. |
bytes32 msgHash | The hash of the canceled message. |
MessageToL2Canceled
StarknetMessaging.sol
cancelL1ToL2Message
consumeMessageFromL2
uint256 fromAddress | The address of the L2 contract sending the message. |
uint256[] calldata payload | The payload of the message. |
bytes32 msgHash | The hash of the consumed message. |
ConsumedMessageToL1
StarknetMessaging.sol
consumeMessageFromL2
getMaxL1MsgFee
pure
uint256 MAX_L1_MSG_FEE | The maximum fee, in Wei, that Starknet accepts for a single message. |
StarknetMessaging.sol
getMaxL1MsgFee
l1ToL2MessageCancellations
view
bytes32 msgHash | The message hash. |
uint256 result | The Ethereum block timestamp. |
0
if cancelL1ToL2Message
was not called with the message hash msgHash
.
StarknetMessaging.sol
l1ToL2MessageCancellations
l1ToL2MessageNonce
n
messages have been sent to Starknet, this function returns n + 1
.
view
uint256 nonce | The nonce of the next message sending to L2 contract. |
StarknetMessaging.sol
l1ToL2MessageNonce
l1ToL2Messages
view
bytes32 msgHash | The message hash. |
uint256 result
, where result
is one of the following:
message_fee + 1 | A pending message is associated with the msgHash parameter. |
0 | No pending message is associated with the msgHash parameter. |
StarknetMessaging.sol
l1ToL2Messages
l2ToL1Messages
view
bytes32 msgHash | The message hash. |
uint256 result
, where result
is the number of pending messages associated with the msgHash
parameter.
StarknetMessaging.sol
l2ToL1Messages
messageCancellationDelay
startL1ToL2MessageCancellation
function. You can get the real value by calling the messageCancellationDelay
function on a block explorer, such as Etherscan.
view
uint256 result | The time interval. |
StarknetMessaging.sol
messageCancellationDelay
sendMessageToL2
payable
uint256 toAddress | The address of the L2 contract. |
uint256 selector | The function, in the recipient L2 contract, that the message called. |
uint256[] calldata payload | The payload of the message. |
bytes32 msgHash | The hash of the message. |
uint256 nonce | The nonce of the message. |
LogMessageToL2
StarknetMessaging.sol
sendMessageToL2
startL1ToL2MessageCancellation
messageCancellationDelay
function.
You can only call this function for a message that is currently pending, and the caller must be the sender of that message.
uint256 toAddress | The address of the L2 contract. |
uint256 selector | The function, in the recipient L2 contract, that the message called. |
uint256[] calldata payload | The payload of the message. |
uint256 nonce | The nonce of the message. |
bytes32 msgHash | The hash of the cancellation message. |
MessageToL2CancellationStarted
StarknetMessaging.sol
startL1ToL2MessageCancellation
ConsumedMessageToL1
consumeMessageFromL2
function.
uint256 indexed fromAddress | The address of the sender on L2. |
address indexed toAddress | The address of the receiver on L1. |
uint256[] payload | The payload of the consumed message. |
IStarknetMessagingEvents
ConsumedMessageToL1
LogMessageToL2
sendMessageToL2
function.
address indexed fromAddress | The address of the sender on L1. |
uint256 indexed toAddress | The address of the receiver on L2. |
uint256 indexed selector | The function, in the recipient L2 contract, that the message called. |
uint256[] payload | The payload of the message. |
uint256 nonce | The nonce of the message. |
uint256 fee | The fee associated with the message. |
IStarknetMessagingEvents
LogMessageToL2
MessageToL2Canceled
cancelL1ToL2Message
function.
address indexed fromAddress | The address of the sender on L1. |
uint256 indexed toAddress | The address of the receiver on L2. |
uint256 indexed selector | The function, in the recipient L2 contract, that the message called. |
uint256[] payload | The payload of the canceled message. |
uint256 nonce | The nonce of the canceled message. |
IStarknetMessagingEvents
MessageToL2Canceled
MessageToL2CancellationStarted
startL1ToL2MessageCancellation
function.
address indexed fromAddress | The address of the sender on L1. |
uint256 indexed toAddress | The address of the receiver on L2. |
uint256 indexed selector | The function, in the recipient L2 contract, that the message called. |
uint256[] payload | The payload of the message to be canceled. |
uint256 nonce | The nonce of the message to be canceled. |
IStarknetMessagingEvents
MessageToL2CancellationStarted