Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrum messages claiming #2467

Open
EvgenKor opened this issue Dec 13, 2024 · 0 comments
Open

Arbitrum messages claiming #2467

EvgenKor opened this issue Dec 13, 2024 · 0 comments
Assignees

Comments

@EvgenKor
Copy link

EvgenKor commented Dec 13, 2024

Arbitrum message claiming

Task research doc:
Notion

Mockup:
Figma

Goals

  • Enable the manual execution of L2->L1 messages (withdrawals) directly through the Blockscout interface.
  • Notify users about withdrawals initiated by a selected transaction.

Tasks

1. Create a new Transaction Withdrawals page

This page displays all withdrawals initiated by a given transaction. Typically one transaction initiates one withdrawal, complex cases may involve multiple withdrawals from a single transaction.
It’s supposed the user provide his L2 transaction hash to find all withdrawals initiated by it. The withdrawals list can be retrieved using the /api/v2/arbitrum/messages/withdrawals/:transaction_hash endpoint. A claim button can be added similarly to the previous point (note that each withdrawal requires a separate claim transaction). The user should be able to connect his Web3 wallet (e.g. Metamask) as on the contract interaction page. To claim the withdrawal UI should invoke /api/v2/arbitrum/messages/claim/:message_id with the associated message_id. The received calldata and Outbox contract address can be used to create and send a transaction via the connected user wallet (e.g. Metamask).

API:

Retrieve all L2->L1 messages initiated by a given transaction

GET /api/v2/arbitrum/messages/withdrawals/:transaction_hash

API Documentation

Construct calldata for claiming an L2->L1 message on the L1 chain

GET /api/v2/arbitrum/messages/claim/:message_id

API Documentation

Design:

Figma


2. Add link to the Transaction Withdrawals page from Withdrawals (L2 -> L1) view

The link should be create only for withdrawals with Ready for relay status. When pressed, this button will redirect to the Transaction Withdrawals page with the L2 transaction hash from the selected row.

Design:

Figma


3. Transaction view changes

It's need to expand withdrawal status on the Transaction details page. For each withdrawal with statuses Ready for relay and Relayed the link to the Transaction Withdrawals page should be added.

Design:

Figma

Note

It should be noted that a single transaction may contain multiple L2→L1 messages, though the current Blockscout implementation assume the single transaction may contain only the single withdrawal. This should be fixed in the future, and now would be a good time to add support for it in the UI.

@tom2drum tom2drum self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@EvgenKor @tom2drum and others