tezos.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: 3.0
package: demo_tezos_raw

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

indexes:
  mainnet_operations:
    kind: tezos.operations_unfiltered
    datasources:
      - 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_tezos_raw import models
from dipdup.context import HandlerContext
from dipdup.models.tezos import TezosOperationData


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

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

Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker
GraphQL IDE -> Open Playground