Config reference
DipDup project configuration file
- Parameters:
- spec_version (str | float) – Version of config specification, currently always 2.0
- package (str) – Name of indexer’s Python package, existing or not
- datasources (dict[str, CoinbaseDatasourceConfig | EtherscanDatasourceConfig | HttpDatasourceConfig | IpfsDatasourceConfig | SubsquidDatasourceConfig | EvmNodeDatasourceConfig | TzipMetadataDatasourceConfig | TzktDatasourceConfig]) – Mapping of datasource aliases and datasource configs
- database (SqliteDatabaseConfig | PostgresDatabaseConfig) – Database config
- contracts (dict[str, EvmContractConfig | TezosContractConfig]) – Mapping of contract aliases and contract configs
- indexes (dict[str, TzktBigMapsIndexConfig | TzktEventsIndexConfig | TzktHeadIndexConfig | TzktOperationsIndexConfig | TzktOperationsUnfilteredIndexConfig | TzktTokenTransfersIndexConfig | TzktTokenBalancesIndexConfig | SubsquidEventsIndexConfig | SubsquidTransactionsIndexConfig | IndexTemplateConfig]) – Mapping of index aliases and index configs
- templates (dict[str, TzktBigMapsIndexConfig | TzktEventsIndexConfig | TzktHeadIndexConfig | TzktOperationsIndexConfig | TzktOperationsUnfilteredIndexConfig | TzktTokenTransfersIndexConfig | TzktTokenBalancesIndexConfig | SubsquidEventsIndexConfig | SubsquidTransactionsIndexConfig]) – Mapping of template aliases and index templates
- jobs (dict[str, JobConfig]) – Mapping of job aliases and job configs
- hooks (dict[str, HookConfig]) – Mapping of hook aliases and hook configs
- hasura (HasuraConfig | None) – Hasura integration config
- sentry (SentryConfig | None) – Sentry integration config
- prometheus (PrometheusConfig | None) – Prometheus integration config
- api (ApiConfig | None) – Management API config
- advanced (AdvancedConfig) – Advanced config
- custom (dict[str, Any]) – User-defined configuration to use in callbacks
- logging (dict[str, str | int] | str | int) – Modify logging verbosity
dipdup.config.DipDupConfig
class dipdup.config.DipDupConfig(spec_version, package, datasources=<factory>, database=<factory>, contracts=<factory>, indexes=<factory>, templates=<factory>, jobs=<factory>, hooks=<factory>, hasura=None, sentry=None, prometheus=None, api=None, advanced=<factory>, custom=<factory>, logging='INFO')
Provider of EVM contract ABIs. Datasource kind starts with ‘abi.’
dipdup.config.AbiDatasourceConfig
class dipdup.config.AbiDatasourceConfig
Etherscan datasource config
- Parameters:
- kind (Literal['abi.etherscan']) – always ‘abi.etherscan’
- url (str) – API URL
- api_key (str | None) – API key
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.abi_etherscan.EtherscanDatasourceConfig
class dipdup.config.abi_etherscan.EtherscanDatasourceConfig(*, kind, url='https://api.etherscan.io/api', api_key=None, http=None)
This section allows users to tune some system-wide options, either experimental or unsuitable for generic configurations.
- Parameters:
- reindex (dict[ReindexingReason, ReindexingAction]) – Mapping of reindexing reasons and actions DipDup performs.
- scheduler (dict[str, Any] | None) – apscheduler scheduler config.
- postpone_jobs (bool) – Do not start job scheduler until all indexes reach the realtime state.
- early_realtime (bool) – Establish realtime connection and start collecting messages while sync is in progress (faster, but consumes more RAM).
- skip_version_check (bool) – Disable warning about running unstable or out-of-date DipDup version.
- rollback_depth (int | None) – A number of levels to keep for rollback.
- decimal_precision (int | None) – Overwrite precision if it’s not guessed correctly based on project models.
- unsafe_sqlite (bool) – Disable journaling and data integrity checks. Use only for testing.
- alt_operation_matcher (bool) – Use different algorithm to match Tezos operations (dev only)
dipdup.config.AdvancedConfig
class dipdup.config.AdvancedConfig(*, reindex=<factory>, scheduler=None, postpone_jobs=False, early_realtime=False, skip_version_check=False, rollback_depth=None, decimal_precision=None, unsafe_sqlite=False, alt_operation_matcher=False)
Management API config
- Parameters:
- host (str) – Host to bind to
- port (int) – Port to bind to
dipdup.config.ApiConfig
class dipdup.config.ApiConfig(*, host='127.0.0.1', port=46339)
Coinbase datasource config
- Parameters:
- kind (Literal['coinbase']) – always ‘coinbase’
- api_key (str | None) – API key
- secret_key (str | None) – API secret key
- passphrase (str | None) – API passphrase
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.CoinbaseDatasourceConfig
class dipdup.config.CoinbaseDatasourceConfig(*, kind, api_key=None, secret_key=None, passphrase=None, http=None)
Contract config
- Parameters:
- kind – Defined by child class
- typename – Alias for the contract script
dipdup.config.ContractConfig
class dipdup.config.ContractConfig
Base class for datasource configs
- Parameters:
- kind – Defined by child class
- url – URL of the API
- http – HTTP connection tunables
dipdup.config.DatasourceConfig
class dipdup.config.DatasourceConfig
EVM contract config
- Parameters:
- kind (Literal['evm']) – Always evm
- address (str | None) – Contract address
- abi (str | None) – Contract ABI
- typename (str | None) – Alias for the contract script
dipdup.config.evm.EvmContractConfig
class dipdup.config.evm.EvmContractConfig(*, kind, address=None, abi=None, typename=None)
Subsquid datasource config
- Parameters:
- kind (Literal['evm.node']) – Always ‘evm.node’
- url (str) – Ethereum node URL
- ws_url (str | None) – Ethereum node WebSocket URL
- http (HttpConfig | None) – HTTP client configuration
- rollback_depth (int) – A number of blocks to store in database for rollback
dipdup.config.evm_node.EvmNodeDatasourceConfig
class dipdup.config.evm_node.EvmNodeDatasourceConfig(*, kind, url, ws_url=None, http=None, rollback_depth=32)
Subsquid event handler
- Parameters:
- callback (str) – Callback name
- contract (str | EvmContractConfig) – EVM contract
- name (str) – Event name
dipdup.config.evm_subsquid_events.SubsquidEventsHandlerConfig
class dipdup.config.evm_subsquid_events.SubsquidEventsHandlerConfig(*, callback, contract, name)
Subsquid datasource config
- Parameters:
- kind (Literal['evm.subsquid.events']) – Always ‘evm.subsquid.events’
- datasource (str | SubsquidDatasourceConfig | EvmNodeDatasourceConfig) – Subsquid datasource
- handlers (tuple[SubsquidEventsHandlerConfig, ...]) – Event handlers
- abi (AbiDatasourceConfig | tuple[AbiDatasourceConfig, ...] | None) – One or more evm.abi datasource(s) for the same network
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing and disable this index
- node_only (bool) – Whether to use only node datasource
dipdup.config.evm_subsquid_events.SubsquidEventsIndexConfig
class dipdup.config.evm_subsquid_events.SubsquidEventsIndexConfig(*, kind, datasource, handlers=<factory>, abi=None, node_only=False, first_level=0, last_level=0)
Subsquid datasource config
- Parameters:
- kind (Literal['evm.subsquid']) – always ‘evm.subsquid’
- url (str) – URL of Subsquid Network API
- node (str | tuple[str, ...] | EvmNodeDatasourceConfig | tuple[EvmNodeDatasourceConfig, ...] | None) – One or more evm.node datasource(s) for the same network
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.evm_subsquid.SubsquidDatasourceConfig
class dipdup.config.evm_subsquid.SubsquidDatasourceConfig(*, kind, url, node=None, http=None)
EVM index that use Subsquid Network as a datasource
- Parameters:
- kind (str) – starts with ‘evm.subsquid’
- datasource (str | SubsquidDatasourceConfig | EvmNodeDatasourceConfig) – Subsquid datasource config
dipdup.config.evm_subsquid.SubsquidIndexConfig
class dipdup.config.evm_subsquid.SubsquidIndexConfig(*, kind, datasource)
Subsquid transaction handler
- Parameters:
- callback (str) – Callback name
- from – Transaction sender
- to (str | EvmContractConfig | None) – Transaction receiver
- method (str | None) – Method name
- from_ (str | EvmContractConfig | None)
dipdup.config.evm_subsquid_transactions.SubsquidTransactionsHandlerConfig
class dipdup.config.evm_subsquid_transactions.SubsquidTransactionsHandlerConfig(*, callback, from_=None, to=None, method=None)
Index that uses Subsquid Network as a datasource for transactions
- Parameters:
- kind (Literal['evm.subsquid.transactions']) – always ‘evm.subsquid.transactions’
- datasource (str | SubsquidDatasourceConfig | EvmNodeDatasourceConfig) – Subsquid datasource config
- handlers (tuple[SubsquidTransactionsHandlerConfig, ...]) – Transaction handlers
- abi (AbiDatasourceConfig | tuple[AbiDatasourceConfig, ...] | None) – One or many ABI datasource(s)
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
- node_only (bool) – Whether to use only node datasource
dipdup.config.evm_subsquid_transactions.SubsquidTransactionsIndexConfig
class dipdup.config.evm_subsquid_transactions.SubsquidTransactionsIndexConfig(*, kind, datasource, handlers=<factory>, abi=None, node_only=False, first_level=0, last_level=0)
Base class for index handlers
- Parameters:
callback (str) – Callback name
dipdup.config.HandlerConfig
class dipdup.config.HandlerConfig(*, callback)
Config for the Hasura integration.
- Parameters:
- url (str) – URL of the Hasura instance.
- admin_secret (str | None) – Admin secret of the Hasura instance.
- create_source (bool) – Whether source should be added to Hasura if missing.
- source (str) – Hasura source for DipDup to configure, others will be left untouched.
- select_limit (int) – Row limit for unauthenticated queries.
- allow_aggregations (bool) – Whether to allow aggregations in unauthenticated queries.
- allow_inconsistent_metadata (bool) – Whether to ignore errors when applying Hasura metadata.
- camel_case (bool) – Whether to use camelCase instead of default pascal_case for the field names.
- rest (bool) – Enable REST API both for autogenerated and custom queries.
- http (HttpConfig | None) – HTTP connection tunables
dipdup.config.HasuraConfig
class dipdup.config.HasuraConfig(*, url, admin_secret=None, create_source=False, source='default', select_limit=1000, allow_aggregations=True, allow_inconsistent_metadata=False, camel_case=False, rest=True, http=None)
Hook config
- Parameters:
- callback (str) – Callback name
- args (dict[str, str]) – Mapping of argument names and annotations (checked lazily when possible)
- atomic (bool) – Wrap hook in a single database transaction
dipdup.config.HookConfig
class dipdup.config.HookConfig(*, callback, args=<factory>, atomic=False)
Advanced configuration of HTTP client
- Parameters:
- retry_count (int | None) – Number of retries after request failed before giving up
- retry_sleep (float | None) – Sleep time between retries
- retry_multiplier (float | None) – Multiplier for sleep time between retries
- ratelimit_rate (int | None) – Number of requests per period (“drops” in leaky bucket)
- ratelimit_period (int | None) – Time period for rate limiting in seconds
- ratelimit_sleep (float | None) – Sleep time between requests when rate limit is reached
- connection_limit (int | None) – Number of simultaneous connections
- connection_timeout (int | None) – Connection timeout in seconds
- request_timeout (int | None) – Request timeout in seconds
- batch_size (int | None) – Number of items fetched in a single paginated request (when applicable)
- polling_interval (float | None) – Interval between polling requests in seconds (when applicable)
- replay_path (str | None) – Use cached HTTP responses instead of making real requests (dev only)
- alias (str | None) – Alias for this HTTP client (dev only)
dipdup.config.HttpConfig
class dipdup.config.HttpConfig(*, retry_count=None, retry_sleep=None, retry_multiplier=None, ratelimit_rate=None, ratelimit_period=None, ratelimit_sleep=None, connection_limit=None, connection_timeout=None, request_timeout=None, batch_size=None, polling_interval=None, replay_path=None, alias=None)
Generic HTTP datasource config
- Parameters:
- kind (Literal['http']) – always ‘http’
- url (str) – URL to fetch data from
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.HttpDatasourceConfig
class dipdup.config.HttpDatasourceConfig(*, kind, url, http=None)
Index config
- Parameters:
- kind (str) – Defined by child class
- datasource (DatasourceConfig) – Alias of index datasource in datasources section
dipdup.config.IndexConfig
class dipdup.config.IndexConfig(*, kind, datasource)
Datasource that can be used as a primary source of historical data
dipdup.config.IndexDatasourceConfig
class dipdup.config.IndexDatasourceConfig
Index template config
- Parameters:
- kind – always ‘template’
- values (dict[str, str]) – Values to be substituted in template (<key> -> value)
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
- template (str) – Template alias in templates section
dipdup.config.IndexTemplateConfig
class dipdup.config.IndexTemplateConfig(*, template, values, first_level=0, last_level=0)
IPFS datasource config
- Parameters:
- kind (Literal['ipfs']) – always ‘ipfs’
- url (str) – IPFS node URL, e.g. https://ipfs.io/ipfs/
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.ipfs.IpfsDatasourceConfig
class dipdup.config.ipfs.IpfsDatasourceConfig(*, kind, url='https://ipfs.io/ipfs', http=None)
Job schedule config
- Parameters:
- hook (str | HookConfig) – Name of hook to run
- args (dict[str, Any]) – Arguments to pass to the hook
- crontab (str | None) – Schedule with crontab syntax (* * * * *)
- interval (int | None) – Schedule with interval in seconds
- daemon (bool) – Run hook as a daemon (never stops)
dipdup.config.JobConfig
class dipdup.config.JobConfig(*, hook, args=<factory>, crontab=None, interval=None, daemon=False)
Postgres database connection config
- Parameters:
- kind (Literal['postgres']) – always ‘postgres’
- host (str) – Host
- port (int) – Port
- user (str) – User
- password (str) – Password
- database (str) – Database name
- schema_name (str) – Schema name
- immune_tables (set[str]) – List of tables to preserve during reindexing
- connection_timeout (int) – Connection timeout
dipdup.config.PostgresDatabaseConfig
class dipdup.config.PostgresDatabaseConfig(*, kind, host, user='postgres', database='postgres', port=5432, schema_name='public', password='', immune_tables=<factory>, connection_timeout=60)
Config for Prometheus integration.
- Parameters:
- host (str) – Host to bind to
- port (int) – Port to bind to
- update_interval (float) – Interval to update some metrics in seconds
dipdup.config.PrometheusConfig
class dipdup.config.PrometheusConfig(*, host, port=8000, update_interval=1.0)
Advanced configuration of HTTP client
- Parameters:
- retry_count (int) – Number of retries after request failed before giving up
- retry_sleep (float) – Sleep time between retries
- retry_multiplier (float) – Multiplier for sleep time between retries
- ratelimit_rate (int) – Number of requests per period (“drops” in leaky bucket)
- ratelimit_period (int) – Time period for rate limiting in seconds
- ratelimit_sleep (float) – Sleep time between requests when rate limit is reached
- connection_limit (int) – Number of simultaneous connections
- connection_timeout (int) – Connection timeout in seconds
- request_timeout (int) – Request timeout in seconds
- batch_size (int) – Number of items fetched in a single paginated request (when applicable)
- polling_interval (float) – Interval between polling requests in seconds (when applicable)
- replay_path (str | None) – Use cached HTTP responses instead of making real requests (dev only)
- alias (str | None) – Alias for this HTTP client (dev only)
dipdup.config.ResolvedHttpConfig
class dipdup.config.ResolvedHttpConfig(*, retry_count=10, retry_sleep=1.0, retry_multiplier=2.0, ratelimit_rate=0, ratelimit_period=0, ratelimit_sleep=0.0, connection_limit=100, connection_timeout=60, request_timeout=60, batch_size=10000, polling_interval=1.0, replay_path=None, alias=None)
Config for Sentry integration.
- Parameters:
- dsn (str) – DSN of the Sentry instance
- environment (str | None) – Environment; if not set, guessed from docker/ci/gha/local.
- server_name (str | None) – Server name; defaults to obfuscated hostname.
- release (str | None) – Release version; defaults to DipDup package version.
- user_id (str | None) – User ID; defaults to obfuscated package/environment.
- debug (bool) – Catch warning messages, increase verbosity.
dipdup.config.SentryConfig
class dipdup.config.SentryConfig(*, dsn, environment=None, server_name=None, release=None, user_id=None, debug=False)
SQLite connection config
- Parameters:
- kind (Literal['sqlite']) – always ‘sqlite’
- path (str) – Path to .sqlite3 file, leave default for in-memory database (:memory:)
- immune_tables (set[str]) – List of tables to preserve during reindexing
dipdup.config.SqliteDatabaseConfig
class dipdup.config.SqliteDatabaseConfig(*, kind, path=':memory:', immune_tables=<factory>)
Hook config
- Parameters:
- callback (str) – Callback name
- args (dict[str, str]) – Mapping of argument names and annotations (checked lazily when possible)
- atomic (bool) – Wrap hook in a single database transaction
dipdup.config.SystemHookConfig
class dipdup.config.SystemHookConfig(*, callback, args=<factory>, atomic=False)
Tezos contract config.
- Parameters:
- kind (Literal['tezos']) – Always tezos
- address (str | None) – Contract address
- code_hash (int | str | None) – Contract code hash or address to fetch it from
- typename (str | None) – Alias for the contract script
dipdup.config.tezos.TezosContractConfig
class dipdup.config.tezos.TezosContractConfig(*, kind, address=None, code_hash=None, typename=None)
Big map handler config
- Parameters:
- callback (str) – Callback name
- contract (str | TezosContractConfig) – Contract to fetch big map from
- path (str) – Path to big map (alphanumeric string with dots)
dipdup.config.tezos_tzkt_big_maps.TzktBigMapsHandlerConfig
class dipdup.config.tezos_tzkt_big_maps.TzktBigMapsHandlerConfig(*, callback, contract, path)
Big map index config
- Parameters:
- kind (Literal['tezos.tzkt.big_maps']) – always ‘tezos.tzkt.big_maps’
- datasource (str | TzktDatasourceConfig) – Index datasource to fetch big maps with
- handlers (tuple[TzktBigMapsHandlerConfig, ...]) – Mapping of big map diff handlers
- skip_history (SkipHistory) – Fetch only current big map keys ignoring historical changes
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_tzkt_big_maps.TzktBigMapsIndexConfig
class dipdup.config.tezos_tzkt_big_maps.TzktBigMapsIndexConfig(*, kind, datasource, handlers, skip_history=SkipHistory.never, first_level=0, last_level=0)
Event handler config
- Parameters:
- callback (str) – Callback name
- contract (str | TezosContractConfig) – Contract which emits event
- tag (str) – Event tag
dipdup.config.tezos_tzkt_events.TzktEventsHandlerConfig
class dipdup.config.tezos_tzkt_events.TzktEventsHandlerConfig(*, callback, contract, tag)
Event index config
- Parameters:
- kind (Literal['tezos.tzkt.events']) – always ‘tezos.tzkt.events’
- datasource (str | TzktDatasourceConfig) – Datasource config
- handlers (tuple[TzktEventsHandlerConfig | TzktEventsUnknownEventHandlerConfig, ...]) – Event handlers
- first_level (int) – First block level to index
- last_level (int) – Last block level to index
dipdup.config.tezos_tzkt_events.TzktEventsIndexConfig
class dipdup.config.tezos_tzkt_events.TzktEventsIndexConfig(*, kind, datasource, handlers=<factory>, first_level=0, last_level=0)
Unknown event handler config
- Parameters:
- callback (str) – Callback name
- contract (str | TezosContractConfig) – Contract which emits event
dipdup.config.tezos_tzkt_events.TzktEventsUnknownEventHandlerConfig
class dipdup.config.tezos_tzkt_events.TzktEventsUnknownEventHandlerConfig(*, callback, contract)
Head block index config
- Parameters:
- kind (Literal['tezos.tzkt.head']) – always ‘tezos.tzkt.head’
- callback (str) – Callback name
- datasource (str | TzktDatasourceConfig) – Index datasource to receive head blocks
- handlers – Mapping of head block handlers
dipdup.config.tezos_tzkt_head.TzktHeadIndexConfig
class dipdup.config.tezos_tzkt_head.TzktHeadIndexConfig(*, kind, datasource, callback)
Head block handler config
- Parameters:
callback (str) – Callback name
dipdup.config.tezos_tzkt_head.HeadHandlerConfig
class dipdup.config.tezos_tzkt_head.HeadHandlerConfig(*, callback)
Origination handler pattern config
- Parameters:
- type (Literal['origination']) – always ‘origination’
- source (str | TezosContractConfig | None) – Match operations by source contract alias
- originated_contract (str | TezosContractConfig | None) – Match origination of exact contract
- optional (bool) – Whether can operation be missing in operation group
- strict (bool) – Match operations by storage only or by the whole code
- alias (str | None) – Alias for operation (helps to avoid duplicates)
dipdup.config.tezos_tzkt_operations.OperationsHandlerOriginationPatternConfig
class dipdup.config.tezos_tzkt_operations.OperationsHandlerOriginationPatternConfig(*, type='origination', source=None, originated_contract=None, optional=False, strict=False, alias=None)
Operation handler pattern config
- Parameters:
- type (Literal['sr_execute']) – always ‘sr_execute’
- source (str | TezosContractConfig | None) – Match operations by source contract alias
- destination (str | TezosContractConfig | None) – Match operations by destination contract alias
- optional (bool) – Whether can operation be missing in operation group
- alias (str | None) – Alias for operation (helps to avoid duplicates)
dipdup.config.tezos_tzkt_operations.OperationsHandlerSmartRollupExecutePatternConfig
class dipdup.config.tezos_tzkt_operations.OperationsHandlerSmartRollupExecutePatternConfig(*, type='sr_execute', source=None, destination=None, optional=False, alias=None)
Transaction handler pattern config
- Parameters:
- type (Literal['transaction']) – always ‘transaction’
- source (str | TezosContractConfig | None) – Match operations by source contract alias
- destination (str | TezosContractConfig | None) – Match operations by destination contract alias
- entrypoint (str | None) – Match operations by contract entrypoint
- optional (bool) – Whether can operation be missing in operation group
- alias (str | None) – Alias for operation (helps to avoid duplicates)
dipdup.config.tezos_tzkt_operations.OperationsHandlerTransactionPatternConfig
class dipdup.config.tezos_tzkt_operations.OperationsHandlerTransactionPatternConfig(*, type='transaction', source=None, destination=None, entrypoint=None, optional=False, alias=None)
Handler of unfiltered operation index
- Parameters:
callback (str) – Callback name
dipdup.config.tezos_tzkt_operations.OperationUnfilteredHandlerConfig
class dipdup.config.tezos_tzkt_operations.OperationUnfilteredHandlerConfig(*, callback)
Base class for pattern config items.
Contains methods for import and method signature generation during handler callbacks codegen.
dipdup.config.tezos_tzkt_operations.TezosPatternConfig
class dipdup.config.tezos_tzkt_operations.TezosPatternConfig
Operation handler config
- Parameters:
- callback (str) – Callback name
- pattern (tuple[OperationsHandlerTransactionPatternConfig | OperationsHandlerOriginationPatternConfig | OperationsHandlerSmartRollupExecutePatternConfig, ...]) – Filters to match operation groups
dipdup.config.tezos_tzkt_operations.TzktOperationsHandlerConfig
class dipdup.config.tezos_tzkt_operations.TzktOperationsHandlerConfig(*, callback, pattern)
Operation index config
- Parameters:
- kind (Literal['tezos.tzkt.operations']) – always ‘tezos.tzkt.operations’
- datasource (str | TzktDatasourceConfig) – Alias of index datasource in datasources section
- handlers (tuple[TzktOperationsHandlerConfig, ...]) – List of indexer handlers
- types (tuple[TzktOperationType, ...]) – Types of transaction to fetch
- contracts (list[str | TezosContractConfig]) – Aliases of contracts being indexed in contracts section
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_tzkt_operations.TzktOperationsIndexConfig
class dipdup.config.tezos_tzkt_operations.TzktOperationsIndexConfig(*, kind, datasource, handlers, contracts=<factory>, types=(TzktOperationType.transaction, ), first_level=0, last_level=0)
Operation index config
- Parameters:
- kind (Literal['tezos.tzkt.operations_unfiltered']) – always ‘tezos.tzkt.operations_unfiltered’
- datasource (str | TzktDatasourceConfig) – Alias of index datasource in datasources section
- callback (str) – Callback name
- types (tuple[TzktOperationType, ...]) – Types of transaction to fetch
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_tzkt_operations.TzktOperationsUnfilteredIndexConfig
class dipdup.config.tezos_tzkt_operations.TzktOperationsUnfilteredIndexConfig(*, kind, datasource, callback, types=(TzktOperationType.transaction,), first_level=0, last_level=0)
Token balance handler config
- Parameters:
- callback (str) – Callback name
- contract (str | TezosContractConfig | None) – Filter by contract
- token_id (int | None) – Filter by token ID
dipdup.config.tezos_tzkt_token_balances.TzktTokenBalancesHandlerConfig
class dipdup.config.tezos_tzkt_token_balances.TzktTokenBalancesHandlerConfig(*, callback, contract=None, token_id=None)
Token balance index config
- Parameters:
- kind (Literal['tezos.tzkt.token_balances']) – always ‘tezos.tzkt.token_balances’
- datasource (str | TzktDatasourceConfig) – Index datasource to use
- handlers (tuple[TzktTokenBalancesHandlerConfig, ...]) – Mapping of token transfer handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_tzkt_token_balances.TzktTokenBalancesIndexConfig
class dipdup.config.tezos_tzkt_token_balances.TzktTokenBalancesIndexConfig(*, kind, datasource, handlers=FieldInfo(default=PydanticUndefined, default_factory=<class 'tuple'>, extra={}), first_level=0, last_level=0)
Token transfer handler config
- Parameters:
- callback (str) – Callback name
- contract (str | TezosContractConfig | None) – Filter by contract
- token_id (int | None) – Filter by token ID
- from – Filter by sender
- to (str | TezosContractConfig | None) – Filter by recipient
- from_ (str | TezosContractConfig | None)
dipdup.config.tezos_tzkt_token_transfers.TzktTokenTransfersHandlerConfig
class dipdup.config.tezos_tzkt_token_transfers.TzktTokenTransfersHandlerConfig(*, callback, contract=None, token_id=None, from_=None, to=None)
Token transfer index config
- Parameters:
- kind (Literal['tezos.tzkt.token_transfers']) – always ‘tezos.tzkt.token_transfers’
- datasource (str | TzktDatasourceConfig) – Index datasource to use
- handlers (tuple[TzktTokenTransfersHandlerConfig, ...]) – Mapping of token transfer handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_tzkt_token_transfers.TzktTokenTransfersIndexConfig
class dipdup.config.tezos_tzkt_token_transfers.TzktTokenTransfersIndexConfig(*, kind, datasource, handlers=FieldInfo(default=PydanticUndefined, default_factory=<class 'tuple'>, extra={}), first_level=0, last_level=0)
TzKT datasource config
- Parameters:
- kind (Literal['tezos.tzkt']) – always ‘tezos.tzkt’
- url (str) – Base API URL, e.g. https://api.tzkt.io/
- http (HttpConfig | None) – HTTP client configuration
- buffer_size (int) – Number of levels to keep in FIFO buffer before processing
- merge_subscriptions (bool) – Whether to merge realtime subscriptions
- rollback_depth (int) – Number of blocks to keep in the database to handle reorgs
dipdup.config.tezos_tzkt.TzktDatasourceConfig
class dipdup.config.tezos_tzkt.TzktDatasourceConfig(*, kind, url='https://api.tzkt.io', http=None, buffer_size=0, merge_subscriptions=False, rollback_depth=2)
TzKT index config
- Parameters:
- kind (str) – starts with ‘tezos.tzkt’
- datasource (TzktDatasourceConfig) – tezos.tzkt datasource to use
dipdup.config.tezos_tzkt.TzktIndexConfig
class dipdup.config.tezos_tzkt.TzktIndexConfig(*, kind, datasource)
DipDup Metadata datasource config
- Parameters:
- kind (Literal['tzip_metadata']) – always ‘tzip_metadata’
- network (TzipMetadataNetwork) – Network name, e.g. mainnet, ghostnet, etc.
- url (str) – GraphQL API URL, e.g. https://metadata.dipdup.net
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.tzip_metadata.TzipMetadataDatasourceConfig
class dipdup.config.tzip_metadata.TzipMetadataDatasourceConfig(*, kind, network, url='https://metadata.dipdup.net', http=None)
Action that should be performed on reindexing
- Parameters:
- exception – Raise ReindexingRequiredError exception.
- wipe – Wipe the database and reindex from scratch. (WARNING: This action is irreversible! All indexed data will be lost!)
- ignore – Ignore the reindexing cause and continue.
dipdup.models.ReindexingAction
class dipdup.models.ReindexingAction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Reason that caused reindexing
- Parameters:
- manual – Manual reindexing.
- migration – Migration of the database schema.
- rollback – Rollback that couldn’t be handled automatically.
- config_modified – Index config was modified.
- schema_modified – Project models or database schema were modified.
dipdup.models.ReindexingReason
class dipdup.models.ReindexingReason(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Whether to skip indexing big map history and use only current state
- Parameters:
- never – Always index big map historical updates.
- once – Skip history once after reindexing; process updates as usual on the next resync.
- always – Always skip big map history.
dipdup.models.SkipHistory
class dipdup.models.SkipHistory(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Type of blockchain operation
- Parameters:
- transaction – transaction
- origination – origination
- migration – migration
- sr_execute – sr_execute
dipdup.models.tezos_tzkt.TzktOperationType
class dipdup.models.tezos_tzkt.TzktOperationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Tezos network enum for TZIP-16 metadata.
- Parameters:
- mainnet – mainnet
- ghostnet – ghostnet
- mumbainet – mumbainet
- nairobinet – nairobinet
- oxfordnet – oxfordnet
- parisnet – parisnet
dipdup.models.tzip_metadata.TzipMetadataNetwork
class dipdup.models.tzip_metadata.TzipMetadataNetwork(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)