Indexing Entrypoint Call

The @indexEntrypoint decorator can be used to mark an indexer method that will be listening for entrypoint calls on a contract. Please note that if you are interested in all incoming transactions regardless of the entrypoint, @indexTransaction is better suited for the job.

When a transaction calling a given named entrypoint is detected on an indexed contract, the method will be invoked with detailed information about the call.


The following parameters will be passed to the indexing method:


The following code will print the value of the property bar every time the contract's entrypoint foo is called:

interface FooEntrypointParameter {
    bar: string;

export class MyContractIndexer {
    async indexFoo(
        parameter: FooEntrypointParameter,
        dbContext: DbContext,
        indexingContext: TransactionIndexingContext,
    ): Promise<void> {

Last updated