HomePhabricator

[explorer] Support multi-token transactions

Description

[explorer] Support multi-token transactions

Summary:
The explorer was built under the assumption that every transaction only has one token ID. However, ALP allows multiple different tokens in one transaction, and even SLP can have arbitrarily many different tokens as inputs.

This diff adds support for transactions with multiple tokens:

  1. By showing a list of token IDs along with the transaction ID (instead of just one token ID)
  2. Shows "Multi eToken Transaction" if there are multiple tokens in the transaction (instead of just showing the first token ticker)
  3. Shows a token_info_table for each involved token (not just the first one)
  4. Shows the correct input / output token ticker and icon (instead of always showing the first token ticker + icon, which is incorrect)

Otherwise, the behavior is unchanged.

Depends on D16662.

Test Plan:

  1. cargo run
  2. Ensure txs are rendered correctly, e.g. 99d965ef70ac5c620906b72d7900721aea35295bf613aefe9f7ef91c83039a71, which now shows token inputs correctly

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16666

Details

Provenance
tobias_ruckAuthored on Tue, Aug 20, 15:25
tobias_ruckPushed on Wed, Aug 21, 18:36
Reviewer
Restricted Project
Differential Revision
D16666: [explorer] Support multi-token transactions
Parents
rABC16c48c9a5aae: [explorer] Remove trailing commma in linter file
Branches
Unknown
Tags
Unknown