Tezos Dappetizer
  • Quick Start
  • How-to Guides
    • Using PostgreSQL
    • Exposing API with Hasura
  • Reference
    • Decorator-based Indexing
      • Indexing Entrypoint Call
      • Indexing Storage Change
      • Indexing Bigmap Update
      • Indexing Incoming Transaction
    • Interface-based Indexing
    • Configuration
    • Command Line
    • Usage Statistics
  • Technical Concepts
    • Indexing Cycle
    • Indexer Modules
  • Token Indexer
    • Introduction
    • Running Standalone in Docker
  • API Docs
  • dappetizer GitLab
Powered by GitBook
On this page
  • Parameters
  • Example

Was this helpful?

  1. Reference
  2. Decorator-based Indexing

Indexing Entrypoint Call

PreviousDecorator-based IndexingNextIndexing Storage Change

Last updated 3 years ago

Was this helpful?

The 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, 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.

Parameters

The following parameters will be passed to the indexing method:

Name
Description

parameter

The entrypoint parameter value. The exact type will depend on the code of the contract.

dbContext

indexingContext

Example

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 {
    @indexEntrypoint('foo')
    async indexFoo(
        parameter: FooEntrypointParameter,
        dbContext: DbContext,
        indexingContext: TransactionIndexingContext,
    ): Promise<void> {
        console.log(parameter.bar);
    }
}

The to store data to.

The with additional information about the call.

@indexEntrypoint
@indexTransaction
DbContext
TransactionIndexingContext