mirror of
https://github.com/XRPLF/clio.git
synced 2026-08-21 12:40:51 +00:00
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>
Unit testing
The correctness of new implementations can be verified via running unit tests. Below are the information on how to run unit tests.
Running
To run the unit tests, first build Clio as normal, then execute ./clio_tests to run all unit tests.
Adding Unit Tests
To add unit tests, please create a separate file for the component you are trying to cover (unless it already exists) and use any other existing unit test file as an example.