Config reference
DipDup project configuration file
- Parameters:
- spec_version (ToStr) – Version of config specification, currently always 3.0
- package (str) – Name of indexer’s Python package, existing or not
- datasources (dict[str, CoinbaseDatasourceConfig | AbiEtherscanDatasourceConfig | HttpDatasourceConfig | IpfsDatasourceConfig | EvmSubsquidDatasourceConfig | EvmNodeDatasourceConfig | TzipMetadataDatasourceConfig | TezosTzktDatasourceConfig | StarknetSubsquidDatasourceConfig | StarknetNodeDatasourceConfig]) – Mapping of datasource aliases and datasource configs
- database (SqliteDatabaseConfig | PostgresDatabaseConfig) – Database config
- contracts (dict[str, EvmContractConfig | TezosContractConfig | StarknetContractConfig]) – Mapping of contract aliases and contract configs
- indexes (dict[str, TezosBigMapsIndexConfig | TezosEventsIndexConfig | TezosHeadIndexConfig | TezosOperationsIndexConfig | TezosOperationsUnfilteredIndexConfig | TezosTokenTransfersIndexConfig | TezosTokenBalancesIndexConfig | EvmEventsIndexConfig | EvmTransactionsIndexConfig | StarknetEventsIndexConfig | IndexTemplateConfig]) – Mapping of index aliases and index configs
- templates (dict[str, TezosBigMapsIndexConfig | TezosEventsIndexConfig | TezosHeadIndexConfig | TezosOperationsIndexConfig | TezosOperationsUnfilteredIndexConfig | TezosTokenTransfersIndexConfig | TezosTokenBalancesIndexConfig | EvmEventsIndexConfig | EvmTransactionsIndexConfig | StarknetEventsIndexConfig]) – 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=None, database=None, contracts=None, indexes=None, templates=None, jobs=None, hooks=None, hasura=None, sentry=None, prometheus=None, api=None, advanced=None, custom=None, 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.AbiEtherscanDatasourceConfig
class dipdup.config.abi_etherscan.AbiEtherscanDatasourceConfig(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).
- 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)
- kwargs (Any)
dipdup.config.AdvancedConfig
class dipdup.config.AdvancedConfig(reindex=None, scheduler=None, postpone_jobs=False, early_realtime=False, rollback_depth=None, decimal_precision=None, unsafe_sqlite=False, alt_operation_matcher=False, **kwargs)
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.coinbase.CoinbaseDatasourceConfig
class dipdup.config.coinbase.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 (EvmAddress | None) – Contract address
- abi (EvmAddress | 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)
EVM node datasource config
- Parameters:
- kind (Literal['evm.node']) – Always ‘evm.node’
- url (Url) – EVM node URL
- ws_url (WsUrl | None) – EVM 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_events.EvmEventsHandlerConfig
class dipdup.config.evm_events.EvmEventsHandlerConfig(callback, contract, name)
Subsquid datasource config
- Parameters:
- kind (Literal['evm.events']) – Always ‘evm.events’
- datasources (tuple[str | EvmSubsquidDatasourceConfig | EvmNodeDatasourceConfig | AbiEtherscanDatasourceConfig, ...]) – evm datasources to use
- handlers (tuple[EvmEventsHandlerConfig, ...]) – Event handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing and disable this index
dipdup.config.evm_events.EvmEventsIndexConfig
class dipdup.config.evm_events.EvmEventsIndexConfig(kind, datasources, handlers, first_level=0, last_level=0)
Subsquid datasource config
- Parameters:
- kind (Literal['evm.subsquid']) – always ‘evm.subsquid’
- url (Url) – URL of Subsquid Network API
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.evm_subsquid.EvmSubsquidDatasourceConfig
class dipdup.config.evm_subsquid.EvmSubsquidDatasourceConfig(kind, url, http=None)
EVM index that use Subsquid Network as a datasource
- Parameters:
- kind (str) – starts with ‘evm’
- datasources (tuple[str | EvmSubsquidDatasourceConfig | EvmNodeDatasourceConfig | AbiEtherscanDatasourceConfig, ...]) – evm datasources to use
dipdup.config.evm.EvmIndexConfig
class dipdup.config.evm.EvmIndexConfig(kind, datasources)
Subsquid transaction handler
- Parameters:
- callback (str) – Callback name
- from – Transaction sender
- to (str | EvmContractConfig | None) – Transaction receiver
- method (str | None) – Method name
- signature (str | None) – Method signature
- from_ (str | EvmContractConfig | None)
dipdup.config.evm_transactions.EvmTransactionsHandlerConfig
class dipdup.config.evm_transactions.EvmTransactionsHandlerConfig(callback, from_=None, to=None, method=None, signature=None)
Index that uses Subsquid Network as a datasource for transactions
- Parameters:
- kind (Literal['evm.transactions']) – always ‘evm.transactions’
- datasources (tuple[str | EvmSubsquidDatasourceConfig | EvmNodeDatasourceConfig | AbiEtherscanDatasourceConfig, ...]) – evm datasources to use
- handlers (tuple[EvmTransactionsHandlerConfig, ...]) – Transaction handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.evm_transactions.EvmTransactionsIndexConfig
class dipdup.config.evm_transactions.EvmTransactionsIndexConfig(kind, datasources, handlers, 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 (Url) – 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
- hide_internal (bool) – Whether to make internal tables (prefixed with “dipdup”) private.
- hide (list[str]) – List of table/view names to make private.
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, hide_internal=False, hide=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, 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.http.HttpDatasourceConfig
class dipdup.config.http.HttpDatasourceConfig(kind, url, http=None)
Index config
- Parameters:
- kind (str) – Defined by child class
- datasources (tuple[str | DatasourceConfig, ...]) – Aliases of index datasources in datasources section
dipdup.config.IndexConfig
class dipdup.config.IndexConfig(kind, datasources)
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, Any]) – 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, 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=None, 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='127.0.0.1', 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 | None) – 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=None, 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 .sqlite 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=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.SystemHookConfig
class dipdup.config.SystemHookConfig(callback, atomic=False)
Tezos contract config.
- Parameters:
- kind (Literal['tezos']) – Always tezos
- address (TezosAddress | None) – Contract address
- code_hash (int | TezosAddress | 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)
TzKT index config
- Parameters:
- kind (str) – starts with ‘tezos’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
dipdup.config.tezos.TezosIndexConfig
class dipdup.config.tezos.TezosIndexConfig(kind, datasources)
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_big_maps.TezosBigMapsHandlerConfig
class dipdup.config.tezos_big_maps.TezosBigMapsHandlerConfig(callback, contract, path)
Big map index config
- Parameters:
- kind (Literal['tezos.big_maps']) – always ‘tezos.big_maps’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – Tezos datasources to use
- handlers (tuple[TezosBigMapsHandlerConfig, ...]) – 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_big_maps.TezosBigMapsIndexConfig
class dipdup.config.tezos_big_maps.TezosBigMapsIndexConfig(kind, datasources, 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_events.TezosEventsHandlerConfig
class dipdup.config.tezos_events.TezosEventsHandlerConfig(callback, contract, tag)
Event index config
- Parameters:
- kind (Literal['tezos.events']) – always ‘tezos.events’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – evm datasources to use
- handlers (tuple[TezosEventsHandlerConfig | TezosEventsUnknownEventHandlerConfig, ...]) – Event handlers
- first_level (int) – First block level to index
- last_level (int) – Last block level to index
dipdup.config.tezos_events.TezosEventsIndexConfig
class dipdup.config.tezos_events.TezosEventsIndexConfig(kind, datasources, handlers, 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_events.TezosEventsUnknownEventHandlerConfig
class dipdup.config.tezos_events.TezosEventsUnknownEventHandlerConfig(callback, contract)
Head block handler config
- Parameters:
- callback (str) – Callback name
dipdup.config.tezos_head.TezosTzktHeadHandlerConfig
class dipdup.config.tezos_head.TezosTzktHeadHandlerConfig(callback)
Head block index config
- Parameters:
- kind (Literal['tezos.head']) – always ‘tezos.head’
- callback (str) – Callback name
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
dipdup.config.tezos_head.TezosHeadIndexConfig
class dipdup.config.tezos_head.TezosHeadIndexConfig(kind, datasources, callback)
Operation handler config
- Parameters:
- callback (str) – Callback name
- pattern (tuple[TezosOperationsHandlerTransactionPatternConfig | TezosOperationsHandlerOriginationPatternConfig | TezosOperationsHandlerSmartRollupCementPatternConfig | TezosOperationsHandlerSmartRollupExecutePatternConfig, ...]) – Filters to match operation groups
dipdup.config.tezos_operations.TezosOperationsHandlerConfig
class dipdup.config.tezos_operations.TezosOperationsHandlerConfig(callback, pattern)
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_operations.TezosOperationsHandlerOriginationPatternConfig
class dipdup.config.tezos_operations.TezosOperationsHandlerOriginationPatternConfig(type='origination', source=None, originated_contract=None, optional=False, strict=False, alias=None)
Operation handler pattern config
- Parameters:
- type (Literal['sr_cement']) – always ‘sr_cement’
- 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_operations.TezosOperationsHandlerSmartRollupCementPatternConfig
class dipdup.config.tezos_operations.TezosOperationsHandlerSmartRollupCementPatternConfig(type='sr_cement', source=None, destination=None, optional=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_operations.TezosOperationsHandlerSmartRollupExecutePatternConfig
class dipdup.config.tezos_operations.TezosOperationsHandlerSmartRollupExecutePatternConfig(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_operations.TezosOperationsHandlerTransactionPatternConfig
class dipdup.config.tezos_operations.TezosOperationsHandlerTransactionPatternConfig(type='transaction', source=None, destination=None, entrypoint=None, optional=False, alias=None)
Operation index config
- Parameters:
- kind (Literal['tezos.operations']) – always ‘tezos.operations’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
- handlers (tuple[TezosOperationsHandlerConfig, ...]) – List of indexer handlers
- types (tuple[TezosOperationType, ...]) – 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_operations.TezosOperationsIndexConfig
class dipdup.config.tezos_operations.TezosOperationsIndexConfig(kind, datasources, handlers, contracts=None, types=(TezosOperationType.transaction,), first_level=0, last_level=0)
Base class for pattern config items.
Contains methods for import and method signature generation during handler callbacks codegen.
dipdup.config.tezos_operations.TezosOperationsPatternConfig
class dipdup.config.tezos_operations.TezosOperationsPatternConfig
Handler of unfiltered operation index
- Parameters:
- callback (str) – Callback name
dipdup.config.tezos_operations.TezosOperationsUnfilteredHandlerConfig
class dipdup.config.tezos_operations.TezosOperationsUnfilteredHandlerConfig(callback)
Operation index config
- Parameters:
- kind (Literal['tezos.operations_unfiltered']) – always ‘tezos.operations_unfiltered’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
- callback (str) – Callback name
- types (tuple[TezosOperationType, ...]) – Types of transaction to fetch
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_operations.TezosOperationsUnfilteredIndexConfig
class dipdup.config.tezos_operations.TezosOperationsUnfilteredIndexConfig(kind, datasources, callback, types=(TezosOperationType.transaction,), first_level=0, last_level=0)
TzKT datasource config
- Parameters:
- kind (Literal['tezos.tzkt']) – always ‘tezos.tzkt’
- url (Url) – 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.TezosTzktDatasourceConfig
class dipdup.config.tezos_tzkt.TezosTzktDatasourceConfig(kind, url='https://api.tzkt.io', http=None, buffer_size=0, merge_subscriptions=False, rollback_depth=2)
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_token_balances.TezosTokenBalancesHandlerConfig
class dipdup.config.tezos_token_balances.TezosTokenBalancesHandlerConfig(callback, contract=None, token_id=None)
Token balance index config
- Parameters:
- kind (Literal['tezos.token_balances']) – always ‘tezos.token_balances’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
- handlers (tuple[TezosTokenBalancesHandlerConfig, ...]) – Mapping of token transfer handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_token_balances.TezosTokenBalancesIndexConfig
class dipdup.config.tezos_token_balances.TezosTokenBalancesIndexConfig(kind, datasources, handlers, 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_token_transfers.TezosTokenTransfersHandlerConfig
class dipdup.config.tezos_token_transfers.TezosTokenTransfersHandlerConfig(callback, contract=None, token_id=None, from_=None, to=None)
Token transfer index config
- Parameters:
- kind (Literal['tezos.token_transfers']) – always ‘tezos.token_transfers’
- datasources (tuple[str | TezosTzktDatasourceConfig, ...]) – tezos datasources to use
- handlers (tuple[TezosTokenTransfersHandlerConfig, ...]) – Mapping of token transfer handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.tezos_token_transfers.TezosTokenTransfersIndexConfig
class dipdup.config.tezos_token_transfers.TezosTokenTransfersIndexConfig(kind, datasources, handlers, first_level=0, last_level=0)
Starknet contract config
- Parameters:
- kind (Literal['starknet']) – Always starknet
- address (StarknetAddress | None) – Contract address
- abi (StarknetAddress | None) – Contract ABI
- typename (str | None) – Alias for the contract script
dipdup.config.starknet.StarknetContractConfig
class dipdup.config.starknet.StarknetContractConfig(kind, address=None, abi=None, typename=None)
Starknet index that use Subsquid Network as a datasource
- Parameters:
- datasources (tuple[str | StarknetSubsquidDatasourceConfig | StarknetNodeDatasourceConfig, ...]) – starknet datasources to use
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing and disable this index
- kind (str)
dipdup.config.starknet.StarknetIndexConfig
class dipdup.config.starknet.StarknetIndexConfig(kind, datasources, first_level=0, last_level=0)
Subsquid event handler
- Parameters:
- callback (str) – Callback name
- contract (str | StarknetContractConfig) – Starknet contract
- name (str) – Event name
dipdup.config.starknet_events.StarknetEventsHandlerConfig
class dipdup.config.starknet_events.StarknetEventsHandlerConfig(callback, contract, name)
Starknet events index config
- Parameters:
- kind (Literal['starknet.events']) – Always ‘starknet.events’
- datasources (tuple[str | StarknetSubsquidDatasourceConfig | StarknetNodeDatasourceConfig, ...]) – Aliases of index datasources in datasources section
- handlers (tuple[StarknetEventsHandlerConfig, ...]) – Event handlers
- first_level (int) – Level to start indexing from
- last_level (int) – Level to stop indexing at
dipdup.config.starknet_events.StarknetEventsIndexConfig
class dipdup.config.starknet_events.StarknetEventsIndexConfig(kind, datasources, first_level=0, last_level=0, handlers)
Starknet node datasource config
- Parameters:
- kind (Literal['starknet.node']) – Always ‘starknet.node’
- url (Url) – Starknet node URL
- ws_url (WsUrl | None) – Starknet node WebSocket URL
- http (HttpConfig | None) – HTTP client configuration
- rollback_depth (int) – A number of blocks to store in database for rollback
dipdup.config.starknet_node.StarknetNodeDatasourceConfig
class dipdup.config.starknet_node.StarknetNodeDatasourceConfig(kind, url, ws_url=None, http=None, rollback_depth=32)
Subsquid datasource config
- Parameters:
- kind (Literal['starknet.subsquid']) – always ‘starknet.subsquid’
- url (Url) – URL of Subsquid Network API
- http (HttpConfig | None) – HTTP client configuration
dipdup.config.starknet_subsquid.StarknetSubsquidDatasourceConfig
class dipdup.config.starknet_subsquid.StarknetSubsquidDatasourceConfig(kind, url, http=None)
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)