Indexing Entrypoint Call
Last updated
Last updated
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:
Name | Description |
---|---|
The following code will print the value of the property bar
every time the contract's entrypoint foo
is called:
parameter
The entrypoint parameter value. The exact type will depend on the code of the contract.
dbContext
The DbContext to store data to.
indexingContext
The TransactionIndexingContext with additional information about the call.