/ Docs
7.5
/

tezos.tzkt.head index

This very simple index provides metadata of the latest block when it's baked. Only realtime data is processed; the synchronization stage is skipped for this index.

dipdup.yaml
spec_version: 2.0
package: demo_head

datasources:
  tzkt_mainnet:
    kind: tezos.tzkt
    url: ${TZKT_URL:-https://api.tzkt.io}

indexes:
  mainnet_head:
    kind: tezos.tzkt.head
    datasource: tzkt_mainnet
    callback: on_mainnet_head

Head index callback receives TzktHeadBlockData model that contains only basic info; no operations are included. Being useless by itself, this index is helpful for monitoring and cron-like tasks. You can define multiple indexes for each datasource used.

Subscription to the head channel is enabled by default, even if no head indexes are defined. Each time the block is baked, the dipdup_head table is updated per datasource. Use it to ensure that both index datasource and underlying blockchain are up and running.

Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker