optimism icon indicating copy to clipboard operation
optimism copied to clipboard

Feat(indexer) - Support Bridge Tx Type Filtering in API

Open ethenotethan opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Indexer API endpoints for fetching withdrawal and deposits currently expose all bridge txs independent of origination type.

Describe the solution you'd like Introduce a lightweight classification system for bridge tx types that can be filtered by when doing API lookups. This type enum can be passed as a query param when fetching deposits or withdrawals:

GET /api/v0/withdrawals/0x6969?type=standard_bridge

Type enums should be supported for native, standard_bridge, and message bridge transaction types.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

ethenotethan avatar Nov 06 '23 22:11 ethenotethan

This looks good to me! cc @roninjin10. @nitaliano would be good to get your input here as well on what API would be fine for the UI

How should we handle ETH transfers to the OptimismPortal/L2ToL1MessagePasser? Should they only be coalesced in the response if the type is ommitted?

hamdiallam avatar Nov 06 '23 22:11 hamdiallam

CC @lukasrosario for any additional requirements necessary for Base UI

ethenotethan avatar Nov 07 '23 07:11 ethenotethan

The indexer has been deprecated

tynes avatar Jun 17 '24 22:06 tynes