• The decorator for a method of a contract indexer to index all its transactions regardless of entrypoint.

    Example

    Demonstrates the method signature:

    import { DbContext } from '@tezos-dappetizer/database';
    import { indexTransaction } from '@tezos-dappetizer/decorators';
    import { TransactionIndexingContext } from '@tezos-dappetizer/indexer';

    class YourContractIndexer {
    @indexTransaction()
    indexMyContractTransaction(
    // You may want a union with narrowing on the entrypoint.
    parameter: { entrypoint: string; value: unknown },
    dbContext: DbContext,
    indexingContext: TransactionIndexingContext<TContextData, TContractData>,
    ): void | PromiseLike<void> {
    // Your indexing code.
    }
    }

    Remark

    If you want a method to index only a specific entrypoint, then see indexEntrypoint decorator.

    Remark

    This is based on ContractIndexer.indexTransaction(...).

    Returns MethodDecorator

Generated using TypeDoc