Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
MPTHelpers.hpp File Reference
#include "data/DBHelpers.hpp"
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/TxMeta.h>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for MPTHelpers.hpp:

Go to the source code of this file.

Functions

std::vector< MPTHolderDataetl::getMPTHolderFromTx (xrpl::TxMeta const &txMeta, xrpl::STTx const &sttx)
 Pull MPT data from TX via ETLService.
std::optional< MPTHolderDataetl::getMPTHolderFromObj (std::string const &key, std::string const &blob)
 Pull MPT data from ledger object via loadInitialLedger.
std::vector< MPTokenIssuanceTransactionsDataetl::getMPTokenIssuanceTxsFromTx (xrpl::TxMeta const &txMeta, xrpl::STTx const &sttx)
 Pull MPT issuance transaction index data from a transaction.

Function Documentation

◆ getMPTHolderFromObj()

std::optional< MPTHolderData > etl::getMPTHolderFromObj ( std::string const & key,
std::string const & blob )

Pull MPT data from ledger object via loadInitialLedger.

Parameters
keyThe owner key
blobObject data as blob
Returns
The MPTIssuanceID and holder pair as a optional

◆ getMPTHolderFromTx()

std::vector< MPTHolderData > etl::getMPTHolderFromTx ( xrpl::TxMeta const & txMeta,
xrpl::STTx const & sttx )

Pull MPT data from TX via ETLService.

Parameters
txMetaTransaction metadata
sttxThe transaction
Returns
The MPTIssuanceID and holder pairs created by the transaction; empty if the transaction failed or created no MPToken.

◆ getMPTokenIssuanceTxsFromTx()

std::vector< MPTokenIssuanceTransactionsData > etl::getMPTokenIssuanceTxsFromTx ( xrpl::TxMeta const & txMeta,
xrpl::STTx const & sttx )

Pull MPT issuance transaction index data from a transaction.

Note
This scans the transaction's metadata for affected MPTokenIssuance/MPToken ledger objects and transaction fields for attached MPTokenIssuanceID/MPT issue references. It produces one record per distinct issuance, each carrying the full set of affected accounts. Transaction fields are scanned so failed transactions that carry an issuance reference are indexed even when metadata has no affected MPT objects. Used by live ETL and reused by the historical backfill migrator.
Parameters
txMetaTransaction metadata.
sttxThe transaction.
Returns
One record per distinct MPT issuance referenced by metadata or transaction fields; empty if no MPT issuance reference is found.