Interface SmartRollupIndexer<TDbContext, TContextData, TRollupData>Experimental

Provides extension points for block parts related to a smart rollup. At least one of methods must be implemented.

Type Parameters

  • TDbContext

    The type of database context. Usually DbContext, if used with standard @tezos-dappetizer/database.

  • TContextData = unknown

    The type of your custom data that flows in indexingContext through all indexers for a block. See createContextData for more details.

  • TRollupData = unknown

    The type of your custom data associated with the smart rollup that flows in indexingContext through this indexer. See shouldIndex for more details.

Hierarchy

  • SmartRollupIndexer

Properties

name?: string

The explicit name used to easily identify the indexer, for example in error messages.

Methods

  • Dynamically selects a smart rollup for indexing (remaining index*() methods) by this indexer. Firstly, the selective indexing is evaluated based on Dappetizer config file. If this method is not implemented, then all smart rollups are selected. Also, it associates returned value as your custom data with the smart rollup. Then the data flows in indexingContext through this indexer for all blocks being indexed.

    Returns

    If false, then the smart rollup will not be indexed. Otherwise, your custom data to be associated with the smart rollup if it should be indexed. If you do not care about the data, then just return true. The method can be async, so the returned value can be a Promise.

    Parameters

    • rollup: SmartRollup

      The smart rollup to be evaluated whether it should be indexed.

    • dbContext: TDbContext

      The database context but it must execute only readonly queries so that it does not interfere with block indexing.

    Returns false | TRollupData | PromiseLike<false | TRollupData>

Generated using TypeDoc