Skip to content

Filtering OP Interop messages #2638

Open
@varasev

Description

@varasev

For /interop-messages page we need to add filters for all columns in the table (except the invisible Payload column) like it's done for /advanced-filter page.

blockscout/blockscout#11903 implements the following HTTP GET parameters for /api/v2/optimism/interop/messages endpoint for filtering:

  • interop_message_nonce (for the Message column) - can only contain one value, e.g.: /api/v2/optimism/interop/messages?interop_message_nonce=751. UI component should just have a text field with Filter button and Reset link.
  • interop_message_age_from and interop_message_age_to (for the Age column) are implemented like age_from and age_to in /api/v2/advanced-filters. And UI is like for the Age column on /advanced-filter page.
  • interop_message_statuses (for the Status column) can have multiple comma-separated values. Allowed ones are: SENT,RELAYED,FAILED (can be mixedcase). Implementation is like for the Type column on /advanced-filter page.
  • interop_message_init_transaction_hash (for the Source tx column) - can only contain one value, e.g.: /api/v2/optimism/interop/messages?interop_message_init_transaction_hash=0x5ceca6af22895e834c21d80754a27357769007553a4425ba1c65c7c8ce19dbb9. UI component should just have a text field with Filter button and Reset link.
  • interop_message_relay_transaction_hash (for the Destination tx column) - the same as for interop_message_init_transaction_hash.
  • interop_message_sender_address_hashes_to_include and interop_message_sender_address_hashes_to_exclude (for the Sender column) are implemented like from_address_hashes_to_include and from_address_hashes_to_exclude in /api/v2/advanced-filters. And UI is like for the From column on /advanced-filter page.
  • interop_message_target_address_hashes_to_include and interop_message_target_address_hashes_to_exclude (for the Target column) are implemented like to_address_hashes_to_include and to_address_hashes_to_exclude in /api/v2/advanced-filters. And UI is like for the To column on /advanced-filter page.
  • interop_message_direction (for the In/Out column) can be one of: "in", "out", "all". And UI is the radio switcher like for the OR column on /advanced-filter page.

There won't be Export to CSV button yet.

By default, all filters are switched off and the /interop-messages page displays all messages (paginated, of course) with the message counter like it's implemented right now. Once at least one of the filter parameters is applied, the message counter becomes hidden and the page switches to the first page. But the pagination should work as usual (next_page_params is still there).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew substantial feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions