/ Docs
7.0
/

What's New

New interactive installer

Starting from this release, DipDup comes with an interactive installer to help you install necessary dependencies.

Run the command below in the terminal:

curl -Lsf https://dipdup.io/install.py | python3

Follow the instructions to complete the installation.

Now you have dipdup command available systemwide! Run it without arguments to see available commands.

You can use dipdup install/update/uninstall commands to manage the local installation.

Project scaffolding

dipdup new command is now available to create a new project from a template. Run it and follow the questions; a new project will be created in the current directory. You can also use a replay file instead; see dipdup new --help for details.

Scaffolder screenshot

Kathmandu contract events

Kathmandu Tezos protocol upgrade has introduced contract events, a new way to interact with smart contracts. This index allows indexing events using strictly typed payloads. From the developer's perspective, it's similar to the big_map index with a few differences.

An example below is artificial since no known contracts in mainnet are currently using events.

dipdup.yaml
spec_version: 2.0
package: demo_events
datasources:
  tzkt:
    kind: tezos.tzkt
    url: https://api.ghostnet.tzkt.io
contracts:
  events_contract:
    kind: tezos
    address: KT1Up6AMehze2VTdt3w85xaZPtrEWn1AeyR3
indexes:
  events:
    kind: tezos.tzkt.events
    datasource: tzkt
    handlers:
      - callback: on_move_event
        contract: events_contract
        tag: move
      - callback: on_roll_event
        contract: events_contract
        tag: roll
      - callback: on_other_event
        contract: events_contract

Unlike big maps, contracts may introduce new event tags and payloads at any time, so the index must be updated accordingly.

from demo_events import models as models
from demo_events.types.events_contract.tezos_events.move import MovePayload
from dipdup.context import HandlerContext
from dipdup.models.tezos_tzkt import TzktEvent
async def on_move_event(
    ctx: HandlerContext,
    event: TzktEvent[MovePayload],
) -> None:
    ...

Each contract can have a fallback handler called for all unknown events so you can process untyped data.

from demo_events import models as models
from dipdup.context import HandlerContext
from dipdup.models.tezos_tzkt import TzktUnknownEvent
async def on_other_event(
    ctx: HandlerContext,
    event: TzktUnknownEvent,
) -> None:
    ...

Changes since 5.1.3

Added

  • cli: new command to create a new project interactively.
  • cli: install/update/uninstall commands to manage local DipDup installation.
  • index: New index kind event to process contract events.
  • install: New interactive installer based on pipx (install.py or dipdup-install).

Fixed

  • cli: Fixed commands that don't require a valid config yet crash with ConfigurationError.
  • codegen: Fail on demand when datamodel-codegen is not available.
  • codegen: Fixed Jinja2 template caching.
  • config: Allow sentry.dsn field to be empty.
  • config: Fixed greedy environment variable regex.
  • hooks: Raise a FeatureAvailabilityHook instead of a warning when trying to execute hooks on SQLite.

Improved

  • cli: Detect src/ layout when guessing package path.
  • codegen: Improved cross-platform compatibility.
  • config: sentry.user_id option to set user ID for Sentry (affects release adoption data).
  • sentry: Detect environment when not set in config (docker/gha/tests/local)
  • sentry: Expose more tags under the dipdup namespace.

Performance

  • cli: Up to 5x faster startup for some commands.

Security

  • sentry: Prevent Sentry from leaking hostname if server_name is not set.
  • sentry: Notify about using Sentry when DSN is set or crash reporting is enabled.

Other

  • ci: A significantly faster execution of GitHub Actions.
  • docs: Updated "Contributing Guide" page.
Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker