/ Docs
7.3
/

tezos.tzkt.operations_unfiltered index

This index allows indexing all operations of the Tezos blockchain. It's a low-level index that doesn't parse operation storage/parameter and doesn't filter operations by type. Here's a minimal config example:

dipdup.yaml
spec_version: 2.0
package: demo_raw

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

indexes:
  mainnet_operations:
    kind: tezos.tzkt.operations_unfiltered
    datasource: tzkt_mainnet
    types:
      - origination
      - transaction
      - migration
    callback: on_operation
    first_level: 1589000
    last_level: 1590000

Handlers receive TzktOperationData model that contains untyped operation data.

from demo_raw import models
from dipdup.context import HandlerContext
from dipdup.models.tezos_tzkt import TzktOperationData


async def on_operation(
    ctx: HandlerContext,
    operation: TzktOperationData,
) -> None:
    await models.Operation.create(
        hash=operation.hash,
        level=operation.level,
        type=operation.type,
    )

To use this demo as a template choose demo_raw in dipdup new command.

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