classYourContractIndexer { @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.
The decorator for a method of a contract indexer to index all its transactions regardless of entrypoint.
Example
Demonstrates the method signature:
Remark
If you want a method to index only a specific entrypoint, then see indexEntrypoint decorator.
Remark
This is based on ContractIndexer.indexTransaction(...).