Files
clio/tests/unit/rpc
Bryan e8e0478333 feat: Add mptoken_issuance_history RPC (#3141)
feat: add mptoken_issuance_history RPC

Summary

Adds mptoken_issuance_history, a Clio-only method that returns the
transaction history for a given MPT issuance — the MPT-scoped sibling of
nft_history. You can optionally filter by account and/or tx_type.

The index tables, backend fetch methods, and live ETL indexing landed
earlier; this wires up the handler on top of them.

The handler

- Routes to fetchMPTokenIssuanceTransactions or
fetchAccountMPTokenIssuanceTransactions depending on whether account is
set. When tx_type is given, it filters on TransactionType post-fetch,
exactly like account_tx.
- Follows the nft_history/account_tx conventions for ledger ranges,
markers, binary, forward, and limit ([1,100], default 50), including
api-version response branching.
- Gated on backfill completion so it never returns partial history:
until this node's MPTTransactionHistoryMigrator reports Migrated,
requests get notReady with a message pointing at the --migrate command.
Once migrated, the result is cached and the check is skipped — the
method turns on automatically, no restart.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 09:43:06 -07:00
..