[System]
You are a helpful assistant that answers strictly in JSON. Here's the JSON schema you must adhere to:
<schema>
{"$schema":"http://json-schema.org/draft-07/schema#","id":"https://github.com/erda-project/erda/.erda/schemas/dice.yaml.json","title":"Erda dice.yml Schema","type":"object","properties":{"$schema":{"type":"string","default":"https://github.com/erda-project/erda/raw/master/.erda/schemas/dice.yaml.json"},"version":{"description":"dice.yml \u8bed\u6cd5\u89c4\u8303\u7248\u672c","type":"string","default":"2.0"},"meta":{"description":"dice.yml \u7684\u5143\u6570\u636e","type":"object","additionalProperties":{"type":"string"}},"envs":{"description":"\u5168\u5c40\u73af\u5883\u53d8\u91cf, \u4f18\u5148\u7ea7\u4f4e\u4e8e service \u6216 job \u81ea\u8eab\u7684\u73af\u5883\u53d8\u91cf","$ref":"#/definitions/EnvMap"},"services":{"description":"\u5b9a\u4e49\u670d\u52a1\u5217\u8868, \u4e00\u4e2a dice.yml \u4e0d\u80fd\u540c\u65f6\u5b9a\u4e49 services \u548c jobs","$ref":"#/definitions/Services"},"jobs":{"description":"\u5b9a\u4e49\u4efb\u52a1\u5217\u8868, \u4e00\u4e2a dice.yml \u4e0d\u80fd\u540c\u65f6\u5b9a\u4e49 services \u548c jobs","$ref":"#/definitions/Jobs"},"addons":{"$ref":"#/definitions/AddOns","description":"\u5b9a\u4e49\u670d\u52a1\u6240\u9700\u7684\u4e2d\u95f4\u4ef6, \u4e2d\u95f4\u4ef6\u7684\u76f8\u5173\u53d8\u91cf\u4ee5\u73af\u5883\u53d8\u91cf\u65b9\u5f0f\u6ce8\u5165"},"environments":{"description":"\u5982\u679c\u5404\u73af\u5883\u6709\u73af\u5883\u53d8\u91cf, Services, Addons \u5b9a\u4e49\u6709\u5dee\u5f02, \u53ef\u4ee5\u5728\u6b64\u5904\u8fdb\u884c\u5dee\u5f02\u5316\u5b9a\u4e49","$ref":"#/definitions/EnvObjects"},"values":{"description":"\u5b9a\u4e49\u5404\u73af\u5883\u7684 key-values, \u53ef\u4ee5\u5728\u5176\u4ed6\u5b57\u6bb5\u7684\u503c\u4e2d\u5f15\u7528","$ref":"#/definitions/ValueObjects"}},"required":["version"],"dependencies":{"services":{"oneOf":[{"required":["services"]},{"required":["jobs"]}]},"jobs":{"oneOf":[{"required":["services"]},{"required":["jobs"]}]}},"description":"services \u4e0e jobs \u4e0d\u80fd\u540c\u65f6\u5b58\u5728\u4e8e\u4e00\u4e2a dice.yml \u4e2d","additionalProperties":false,"definitions":{"Services":{"type":"object","additionalProperties":{"$ref":"#/definitions/Service"}},"Service":{"type":"object","properties":{"image":{"description":"\u670d\u52a1\u955c\u50cf","type":"string"},"image_username":{"description":"\u62c9\u53d6\u955c\u50cf\u7684\u7528\u6237\u540d","type":"string"},"image_password":{"description":"\u62c9\u53d6\u955c\u50cf\u7684\u5bc6\u7801","type":"string"},"cmd":{"description":"\u542f\u52a8\u547d\u4ee4, \u4e0d\u586b\u5219\u6309\u955c\u50cf\u7684 Entrypoint \u542f\u52a8","type":"string"},"ports":{"description":"\u8981\u542f\u7528\u7684\u7aef\u53e3","type":"array","items":{"$ref":"#/definitions/ServicePort"}},"envs":{"description":"\u73af\u5883\u53d8\u91cf, \u4f18\u5148\u7ea7\u9ad8\u4e8e\u5168\u5c40\u73af\u5883\u53d8\u91cf","$ref":"#/definitions/EnvMap"},"hosts":{"description":"\u57df\u540d\u5217\u8868, \u53ef\u4ee5\u5f15\u7528 values \u4e2d\u5b9a\u4e49\u7684\u503c","type":"array","items":{"type":"string"}},"resources":{"description":"\u670d\u52a1 (Pod) \u4f7f\u7528\u7684\u8d44\u6e90","$ref":"#/definitions/Resources"},"labels":{"description":"\u670d\u52a1\u6807\u7b7e","type":"object","additionalProperties":{"type":"string"}},"annotations":{"description":"\u6ce8\u89e3","type":"object","additionalProperties":{"type":"string"}},"binds":{"description":"\u6587\u4ef6\u6302\u8f7d","$ref":"#/definitions/Binds"},"volumes":{"description":"\u5b9a\u4e49\u5377","$ref":"#/definitions/Volumes"},"deployments":{"description":"\u5b9a\u4e49 K8s Deployment \u7ec6\u8282","$ref":"#/definitions/Deployments"},"depends_on":{"description":"\u4f9d\u8d56\u7684\u670d\u52a1","type":"array","items":{"type":"string"}},"expose":{"description":"\u8981\u5f00\u653e\u7684\u7aef\u53e3, Erda \u4f1a\u521b\u5efa\u4e00\u4e2a K8s Service \u5e76\u5f00\u653e\u8fd9\u4e9b\u7aef\u53e3","type":"array","items":{"type":"integer","default":8080}},"health_check":{"description":"\u5065\u5eb7\u68c0\u67e5, \u5373\u670d\u52a1\u53ef\u63d0\u4f9b\u670d\u52a1\u7684\u6761\u4ef6","$ref":"#/definitions/HealthCheck"},"sidecars":{"description":"\u5b9a\u4e49\u8fb9\u8f66\u5bb9\u5668, \u5982\u65e5\u5fd7\u6536\u96c6, \u7f51\u7edc\u4ee3\u7406\u7b49","type":"object","patternProperties":{"^[A-za-z].*":{"$ref":"#/definitions/SideCar"}}},"init":{"description":"\u5b9a\u4e49\u521d\u59cb\u5316\u5bb9\u5668, \u5982\u6570\u636e\u51c6\u5907, migration \u7b49","type":"object","additionalProperties":{"$ref":"#/definitions/InitContainer"}},"mesh_enable":{"deprecationMessage":"Erda \u5df2\u4e0d\u652f\u6301\u8be5\u529f\u80fd","type":"boolean"},"traffic_security":{"description":"\u5b9a\u4e49\u6d41\u91cf\u5b89\u5168\u7b56\u7565 (\u4f1a\u5f15\u7528\u7f51\u5173)","$ref":"#/definitions/TrafficSecurity"},"endpoints":{"description":"\u5b9a\u4e49\u57df\u540d, \u53ef\u4ee5\u5f15\u7528 values \u4e2d\u5b9a\u4e49\u7684\u503c","type":"array","items":{"$ref":"#/definitions/Endpoint"}},"k8s_snippet":{"description":"\u5b9a\u4e49\u5bb9\u5668\u7ec6\u8282","$ref":"#/definitions/K8SSnippet"}}},"ServicePort":{"type":"object","properties":{"port":{"description":"\u542f\u7528\u7684\u7aef\u53e3\u53f7","type":"integer","default":8080},"protocol":{"description":"4/7 \u5c42\u7f51\u7edc\u534f\u8bae","type":"string","default":"TCP"},"l4_protocol":{"description":"4 \u5c42\u7f51\u7edc\u534f\u8bae","type":"string","enum":["TCP","UDP"],"default":"TCP"},"expose":{"description":"\u662f\u5426\u5f00\u653e\u8be5\u7aef\u53e3","type":"boolean","default":false},"default":{"description":"\u662f\u5426\u4e3a\u9ed8\u8ba4\u7aef\u53e3, \u8bbe\u7f6e\u57df\u540d\u65f6\u4f1a\u5c06\u5bf9\u8be5\u57df\u540d\u7684\u8bbf\u95ee\u53cd\u5411\u4ee3\u7406\u5230\u9ed8\u8ba4\u7aef\u53e3","type":"boolean","default":false}}},"EnvMap":{"type":"object","patternProperties":{"^[A-Z][^a-z]*$":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}]}},"additionalProperties":false},"Resources":{"description":"\u53ef\u4ee5\u7528 cpu: ${request_cpu:1} \u5f15\u7528 values \u548c\u8bbe\u7f6e\u9ed8\u8ba4\u503c","type":"object","properties":{"cpu":{"anyOf":[{"type":"number"},{"type":"string"}],"description":"CPU \u6838\u5fc3\u6570, \u5bf9\u5e94 K8s \u4e2d request \u503c.\n\u53ef\u4ee5\u7528 ${request_cpu:1} \u5f15\u7528 values \u548c\u8bbe\u7f6e\u9ed8\u8ba4\u503c","examples":["${request_cpu:1}"],"default":1},"mem":{"description":"\u5185\u5b58\u6570, \u5355\u4f4d M","anyOf":[{"type":"integer"},{"type":"string"}]},"max_cpu":{"description":"\u6700\u5927 CPU \u6838\u5fc3\u6570","type":"number"},"max_mem":{"description":"\u6700\u5927\u5185\u5b58\u6570","type":"integer"},"disk":{"description":"\u78c1\u76d8\u8bf7\u6c42\u91cf","type":"integer"},"network":{"description":"\u7f51\u7edc\u914d\u7f6e","type":"object","additionalProperties":{"type":"string"}},"emptydir_size":{"type":"integer"},"ephemeral_storage_size":{"type":"integer"}}},"Binds":{"type":"array","items":{"type":"string"}},"Jobs":{"type":"object","additionalProperties":{"$ref":"#/definitions/Job"}},"AddOns":{"type":"object","additionalProperties":{"$ref":"#/definitions/AddOn"}},"ValueObjects":{"type":"object","patternProperties":{"development|test|staging|production":{"$ref":"#/definitions/ValueMap"}}},"Volume":{"type":"object","properties":{"id":{"type":"string"},"storage":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"},"size":{"type":"integer"},"targetPath":{"type":"string"},"readOnly":{"type":"boolean"},"snapshot":{"$ref":"#/definitions/VolumeSnapshot"}}},"Deployments":{"type":"object","properties":{"replicas":{"description":"Pod \u526f\u672c\u6570","anyOf":[{"type":"integer"},{"type":"string"}]},"policies":{"description":"\u7b56\u7565","type":"string"},"labels":{"description":"\u6807\u7b7e","type":"object","additionalProperties":{"type":"string"}},"workload":{"description":"\u8d1f\u8f7d","type":"string"},"selectors":{"description":"K8s selector","$ref":"#/definitions/Selectors"}}},"HealthCheck":{"type":"object","properties":{"http":{"description":"\u901a\u8fc7 HTTP \u63a5\u53e3\u8fdb\u884c\u5065\u5eb7\u68c0\u67e5","$ref":"#/definitions/HTTPCheck","default":{"port":8080,"path":"/api/health","duration":120}},"exec":{"description":"\u901a\u8fc7\u6267\u884c\u5bb9\u5668\u547d\u4ee4\u8fdb\u884c\u5065\u5eb7\u68c0\u67e5","$ref":"#/definitions/ExecCheck"}}},"SideCar":{"type":"object","properties":{"image":{"description":"\u5bb9\u5668\u955c\u50cf","type":"string"},"cmd":{"description":"\u5bb9\u5668\u542f\u52a8\u547d\u4ee4","type":"string"},"envs":{"description":"\u5bb9\u5668\u73af\u5883\u53d8\u91cf","$ref":"#/definitions/EnvMap"},"resources":{"description":"\u5bb9\u5668\u8d44\u6e90","$ref":"#/definitions/Resources"}}},"InitContainer":{"type":"object","properties":{"image":{"description":"\u5bb9\u5668\u955c\u50cf","type":"string"},"shared_dir":{"description":"\u5171\u4eab\u76ee\u5f55","type":"array","items":{"description":"\u5171\u4eab\u76ee\u5f55\u5217\u8868","$ref":"#/definitions/SharedDir"}},"cmd":{"description":"\u5bb9\u5668\u542f\u52a8\u547d\u4ee4","type":"string"},"resources":{"description":"\u5bb9\u5668\u8d44\u6e90","$ref":"#/definitions/Resources"}}},"TrafficSecurity":{"type":"object","properties":{"mode":{"description":"\u6d41\u91cf\u5b89\u5168\u7b56\u7565\u6a21\u5f0f","type":"string"}}},"Endpoint":{"type":"object","properties":{"domain":{"description":"\u57df\u540d, \u5c06\u8be5\u670d\u52a1\u7684\u63a5\u53e3\u805a\u5408\u5230\u8be5\u57df\u540d\u4e0b","type":"string"},"path":{"description":"\u805a\u5408\u8def\u7531\u7684\u8def\u7531\u8def\u5f84","type":"string"},"backend_path":{"description":"\u805a\u5408\u8def\u7531\u7684\u540e\u7aef\u670d\u52a1\u8def\u5f84","type":"string"},"policies":{"description":"\u8def\u7531\u7b56\u7565","$ref":"#/definitions/EndpointPolicies"}}},"K8SSnippet":{"type":"object","description":"\u5b9a\u4e49\u5bb9\u5668\u7ec6\u8282, \u9700\u8981\u719f\u6089 Kubernetes, \u53c2\u8003 k8s.io/api/core/v1.Container","properties":{"container":{"description":"\u5b9a\u4e49\u5bb9\u5668\u7ec6\u8282, \u9700\u8981\u719f\u6089 Kubernetes, \u53c2\u8003 k8s.io/api/core/v1.Container","$ref":"#/definitions/ContainerSnippet"}}},"Job":{"type":"object","properties":{"image":{"description":"\u5bb9\u5668\u955c\u50cf","type":"string"},"cmd":{"description":"\u5bb9\u5668\u542f\u52a8\u547d\u4ee4, \u5982\u4e0d\u586b\u5219\u9ed8\u8ba4\u4e3a\u5bb9\u5668\u7684 Entrypoint","type":"string"},"envs":{"description":"\u5bb9\u5668\u73af\u5883\u53d8\u91cf","$ref":"#/definitions/EnvMap"},"resources":{"description":"\u5b9a\u4e49 Pod \u8fd0\u884c\u6240\u8bf7\u6c42\u7684\u8d44\u6e90","$ref":"#/definitions/Resources"},"labels":{"description":"\u5b9a\u4e49 Pod \u6807\u7b7e","type":"object","additionalProperties":{"type":"string"}},"binds":{"description":"\u5b9a\u4e49\u6302\u8f7d\u7684\u76ee\u5f55","$ref":"#/definitions/Binds"},"volumes":{"description":"\u5b9a\u4e49\u5377","$ref":"#/definitions/Volumes"},"init":{"description":"\u5b9a\u4e49\u521d\u59cb\u5316\u5bb9\u5668, \u5982\u6570\u636e\u51c6\u5907, migration \u7b49","type":"object","additionalProperties":{"$ref":"#/definitions/InitContainer"}},"hosts":{"description":"\u5b9a\u4e49\u670d\u52a1\u57df\u540d","type":"string","items":{"type":"string"}}}},"Volumes":{"type":"array","items":{"$ref":"#/definitions/Volume"}},"AddOn":{"type":"object","properties":{"plan":{"description":"\u4e2d\u95f4\u4ef6 engine \u548c\u89c4\u683c, \u5982 mysql:basic","type":"string"},"as":{"type":"string"},"options":{"type":"object","description":"\u4e2d\u95f4\u4ef6\u7684\u5143\u6570\u636e\u548c\u914d\u7f6e","additionalProperties":{"type":"string"}},"actions":{"type":"object","additionalProperties":true},"image":{"description":"\u4e2d\u95f4\u4ef6\u955c\u50cf","type":"string"}}},"ValueMap":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"}]}},"VolumeSnapshot":{"type":"object","properties":{"maxHistory":{"type":"integer"}}},"Selectors":{"type":"object","additionalProperties":{"$ref":"#/definitions/Selector"}},"HTTPCheck":{"type":"object","properties":{"port":{"description":"\u7aef\u53e3","type":"integer","default":8080},"path":{"description":"\u8def\u5f84","type":"string","default":"/api/health"},"duration":{"description":"\u6267\u884c\u5065\u5eb7\u68c0\u67e5\u7684\u95f4\u9694\u65f6\u95f4","type":"integer","default":120}}},"ExecCheck":{"type":"object","properties":{"cmd":{"description":"\u6267\u884c\u5065\u5eb7\u68c0\u67e5\u7684\u5bb9\u5668\u547d\u4ee4","type":"string"},"duration":{"description":"\u6267\u884c\u5065\u5eb7\u68c0\u67e5\u7684\u95f4\u9694\u65f6\u95f4","type":"integer"}}},"SharedDir":{"type":"object","properties":{"main":{"description":"\u4e3b\u5bb9\u5668\u7684\u76ee\u5f55","type":"string"},"sidecar":{"description":"\u8fb9\u8f66\u5bb9\u5668\u7684\u76ee\u5f55","type":"string"}}},"EndpointPolicies":{"type":"object","properties":{"cors":{"description":"\u8de8\u57df\u7b56\u7565","type":"object","additionalProperties":true},"rate_limit":{"description":"\u9650\u6d41\u7b56\u7565","type":"object","additionalProperties":true}}},"Selector":{"type":"object","properties":{"not":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}}},"ContainerSnippet":{"description":"\u53c2\u8003 k8s.io/api/core/v1.Container","type":"object","additionalProperties":true},"EnvObjects":{"type":"object","patternProperties":{"development|test|staging|production":{"$ref":"#/definitions/EnvObject"}}},"EnvObject":{"type":"object","properties":{"envs":{"description":"\u73af\u5883\u53d8\u91cf","$ref":"#/definitions/EnvMap"},"services":{"description":"\u670d\u52a1\u5217\u8868","$ref":"#/definitions/Services"},"addons":{"description":"\u4e2d\u95f4\u4ef6\u5217\u8868","$ref":"#/definitions/AddOns"}}}}}
</schema>

[User] Provide a JSON object that satisfies the schema "Erda dice.yml Schema". Here are the required top‑level fields: version. Return only the valid JSON object.

Erda dice.yml Schema

dice.yml 语法规范版本

dice.yml 的元数据

全局环境变量, 优先级低于 service 或 job 自身的环境变量

定义服务列表, 一个 dice.yml 不能同时定义 services 和 jobs

定义任务列表, 一个 dice.yml 不能同时定义 services 和 jobs

定义服务所需的中间件, 中间件的相关变量以环境变量方式注入

如果各环境有环境变量, Services, Addons 定义有差异, 可以在此处进行差异化定义

定义各环境的 key-values, 可以在其他字段的值中引用

services 与 jobs 不能同时存在于一个 dice.yml 中

服务镜像

拉取镜像的用户名

拉取镜像的密码

启动命令, 不填则按镜像的 Entrypoint 启动

要启用的端口

环境变量, 优先级高于全局环境变量

域名列表, 可以引用 values 中定义的值

服务 (Pod) 使用的资源

服务标签

注解

文件挂载

定义卷

定义 K8s Deployment 细节

依赖的服务

要开放的端口, Erda 会创建一个 K8s Service 并开放这些端口

健康检查, 即服务可提供服务的条件

定义边车容器, 如日志收集, 网络代理等

定义初始化容器, 如数据准备, migration 等

Erda 已不支持该功能

定义流量安全策略 (会引用网关)

定义域名, 可以引用 values 中定义的值

定义容器细节

启用的端口号

4/7 层网络协议

4 层网络协议

是否开放该端口

是否为默认端口, 设置域名时会将对该域名的访问反向代理到默认端口

可以用 cpu: ${request_cpu:1} 引用 values 和设置默认值

CPU 核心数, 对应 K8s 中 request 值.
可以用 ${request_cpu:1} 引用 values 和设置默认值

内存数, 单位 M

最大 CPU 核心数

最大内存数

磁盘请求量

网络配置

Pod 副本数

策略

标签

负载

K8s selector

通过 HTTP 接口进行健康检查

通过执行容器命令进行健康检查

容器镜像

容器启动命令

容器环境变量

容器资源

容器镜像

共享目录

共享目录列表

容器启动命令

容器资源

流量安全策略模式

域名, 将该服务的接口聚合到该域名下

聚合路由的路由路径

聚合路由的后端服务路径

路由策略

定义容器细节, 需要熟悉 Kubernetes, 参考 k8s.io/api/core/v1.Container

容器镜像

容器启动命令, 如不填则默认为容器的 Entrypoint

容器环境变量

定义 Pod 运行所请求的资源

定义 Pod 标签

定义挂载的目录

定义卷

定义初始化容器, 如数据准备, migration 等

定义服务域名

中间件 engine 和规格, 如 mysql:basic

中间件的元数据和配置

中间件镜像

端口

路径

执行健康检查的间隔时间

执行健康检查的容器命令

执行健康检查的间隔时间

主容器的目录

边车容器的目录

跨域策略

限流策略

参考 k8s.io/api/core/v1.Container

环境变量

服务列表

中间件列表

Provide a JSON object that satisfies the schema "Erda dice.yml Schema". Here are the required top‑level fields: version. Return only the valid JSON object.


[System]
You are a helpful assistant that answers strictly in JSON. Here's the JSON schema you must adhere to:
<schema>
{"$defs":{"AdvancedConfig":{"additionalProperties":true,"description":"This section allows users to tune some system-wide options, either experimental or unsuitable for generic configurations.","properties":{"alt_operation_matcher":{"default":false,"description":"Use different algorithm to match Tezos operations (dev only)","title":"alt_operation_matcher","type":"boolean"},"decimal_precision":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Overwrite precision if it's not guessed correctly based on project models.","title":"decimal_precision"},"early_realtime":{"default":false,"description":"Establish realtime connection and start collecting messages while sync is in progress (faster, but consumes more RAM).","title":"early_realtime","type":"boolean"},"postpone_jobs":{"default":false,"description":"Do not start job scheduler until all indexes reach the realtime state.","title":"postpone_jobs","type":"boolean"},"reindex":{"additionalProperties":{"$ref":"#/$defs/ReindexingAction"},"description":"Mapping of reindexing reasons and actions DipDup performs.","propertyNames":{"$ref":"#/$defs/ReindexingReason"},"title":"reindex","type":"object"},"rollback_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"A number of blocks to keep for rollback (affects all datasources)","title":"rollback_depth"},"scheduler":{"anyOf":[{"type":"object"},{"type":"null"}],"default":null,"description":"`apscheduler` scheduler config.","title":"scheduler"},"unsafe_sqlite":{"default":false,"description":"Disable journaling and data integrity checks. Use only for testing.","title":"unsafe_sqlite","type":"boolean"},"watchdog":{"additionalProperties":{"$ref":"#/$defs/WatchdogConfig"},"description":"Mapping of watchdog triggers and actions DipDup performs.","propertyNames":{"$ref":"#/$defs/WatchdogTrigger"},"title":"watchdog","type":"object"}},"title":"AdvancedConfig","type":"object"},"ApiConfig":{"additionalProperties":false,"description":"Management API config","properties":{"host":{"default":"127.0.0.1","description":"Host to bind to","title":"host","type":"string"},"port":{"default":46339,"description":"Port to bind to","title":"port","type":"integer"}},"title":"ApiConfig","type":"object"},"CoinbaseDatasourceConfig":{"additionalProperties":false,"description":"Coinbase datasource config","properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API key","title":"api_key"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"coinbase","default":"coinbase","description":"always 'coinbase'","title":"kind","type":"string"},"passphrase":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API passphrase","title":"passphrase"},"secret_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API secret key","title":"secret_key"}},"title":"CoinbaseDatasourceConfig","type":"object"},"EvmAddress":{"$ref":"#/$defs/Hex"},"EvmBlockvisionDatasourceConfig":{"additionalProperties":false,"description":"Blockvision datasource config","properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API key","title":"api_key"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"evm.blockvision","default":"evm.blockvision","description":"always 'evm.blockvision'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"API URL","title":"url"}},"required":["url"],"title":"EvmBlockvisionDatasourceConfig","type":"object"},"EvmContractConfig":{"additionalProperties":false,"description":"EVM contract config","properties":{"abi":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"description":"Contract ABI","title":"abi"},"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"description":"Contract address","title":"address"},"kind":{"const":"evm","default":"evm","description":"Always `evm`","title":"kind","type":"string"},"typename":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for the contract script","title":"typename"}},"title":"EvmContractConfig","type":"object"},"EvmEtherscanDatasourceConfig":{"additionalProperties":false,"description":"Etherscan datasource config","properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API key","title":"api_key"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"anyOf":[{"const":"evm.etherscan","type":"string"},{"const":"abi.etherscan","type":"string"}],"default":"evm.etherscan","description":"always 'evm.etherscan'","title":"kind"},"url":{"$ref":"#/$defs/Url","description":"API URL","title":"url"}},"required":["url"],"title":"EvmEtherscanDatasourceConfig","type":"object"},"EvmEventsHandlerConfig":{"additionalProperties":false,"description":"Subsquid event handler","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/EvmContractConfig"}],"description":"EVM contract","title":"contract"},"name":{"description":"Event name","title":"name","type":"string"}},"required":["callback","contract","name"],"title":"EvmEventsHandlerConfig","type":"object"},"EvmEventsIndexConfig":{"additionalProperties":false,"description":"Subsquid datasource config","properties":{"datasources":{"description":"`evm` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/EvmSubsquidDatasourceConfig"},{"$ref":"#/$defs/EvmNodeDatasourceConfig"},{"$ref":"#/$defs/EvmSourcifyDatasourceConfig"},{"$ref":"#/$defs/EvmBlockvisionDatasourceConfig"},{"$ref":"#/$defs/EvmEtherscanDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Event handlers","items":{"$ref":"#/$defs/EvmEventsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"evm.events","default":"evm.events","description":"Always 'evm.events'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing and disable this index","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"EvmEventsIndexConfig","type":"object"},"EvmNodeDatasourceConfig":{"additionalProperties":false,"description":"EVM node datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"evm.node","default":"evm.node","description":"Always 'evm.node'","title":"kind","type":"string"},"rollback_depth":{"default":32,"description":"A number of blocks to store in database for rollback","title":"rollback_depth","type":"integer"},"url":{"$ref":"#/$defs/Url","description":"EVM node URL","title":"url"},"ws_url":{"anyOf":[{"$ref":"#/$defs/WsUrl"},{"type":"null"}],"default":null,"description":"EVM node WebSocket URL","title":"ws_url"}},"required":["url"],"title":"EvmNodeDatasourceConfig","type":"object"},"EvmSourcifyDatasourceConfig":{"additionalProperties":false,"description":"Sourcify datasource config","properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API key","title":"api_key"},"chain_id":{"description":"Chain ID","title":"chain_id","type":"integer"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"evm.sourcify","default":"evm.sourcify","description":"always 'evm.sourcify'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","default":"https://sourcify.dev/server","description":"API URL","title":"url"}},"required":["chain_id"],"title":"EvmSourcifyDatasourceConfig","type":"object"},"EvmSubsquidDatasourceConfig":{"additionalProperties":false,"description":"Subsquid datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"evm.subsquid","default":"evm.subsquid","description":"always 'evm.subsquid'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"URL of Subsquid Network API","title":"url"}},"required":["url"],"title":"EvmSubsquidDatasourceConfig","type":"object"},"EvmTransactionsHandlerConfig":{"additionalProperties":false,"description":"Subsquid transaction handler","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"from":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/EvmContractConfig"},{"type":"null"}],"default":null,"description":"Transaction sender","title":"from"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Method name","title":"method"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Method signature","title":"signature"},"to":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/EvmContractConfig"},{"type":"null"}],"default":null,"description":"Transaction receiver","title":"to"}},"required":["callback"],"title":"EvmTransactionsHandlerConfig","type":"object"},"EvmTransactionsIndexConfig":{"additionalProperties":false,"description":"Index that uses Subsquid Network as a datasource for transactions","properties":{"datasources":{"description":"`evm` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/EvmSubsquidDatasourceConfig"},{"$ref":"#/$defs/EvmNodeDatasourceConfig"},{"$ref":"#/$defs/EvmSourcifyDatasourceConfig"},{"$ref":"#/$defs/EvmBlockvisionDatasourceConfig"},{"$ref":"#/$defs/EvmEtherscanDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Transaction handlers","items":{"$ref":"#/$defs/EvmTransactionsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"evm.transactions","default":"evm.transactions","description":"always 'evm.transactions'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"EvmTransactionsIndexConfig","type":"object"},"HasuraConfig":{"additionalProperties":false,"description":"Config for the Hasura integration.","properties":{"admin_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Admin secret of the Hasura instance.","title":"admin_secret"},"allow_aggregations":{"default":true,"description":"Whether to allow aggregations in unauthenticated queries.","title":"allow_aggregations","type":"boolean"},"allow_inconsistent_metadata":{"default":false,"description":"Whether to ignore errors when applying Hasura metadata.","title":"allow_inconsistent_metadata","type":"boolean"},"camel_case":{"default":false,"description":"Whether to use camelCase instead of default pascal_case for the field names.","title":"camel_case","type":"boolean"},"create_source":{"default":false,"description":"Whether source should be added to Hasura if missing.","title":"create_source","type":"boolean"},"hide":{"description":"List of table/view names to make private.","items":{"type":"string"},"title":"hide","type":"array"},"hide_internal":{"default":false,"description":"Whether to make internal tables (prefixed with \"dipdup\") private.","title":"hide_internal","type":"boolean"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP connection tunables","title":"http"},"rest":{"default":true,"description":"Enable REST API both for autogenerated and custom queries.","title":"rest","type":"boolean"},"select_limit":{"default":1000,"description":"Row limit for unauthenticated queries.","title":"select_limit","type":"integer"},"source":{"default":"default","description":"Hasura source for DipDup to configure, others will be left untouched.","title":"source","type":"string"},"url":{"$ref":"#/$defs/Url","description":"URL of the Hasura instance.","title":"url"}},"required":["url"],"title":"HasuraConfig","type":"object"},"Hex":{"type":"string"},"HookConfig":{"additionalProperties":false,"description":"Hook config","properties":{"args":{"additionalProperties":{"type":"string"},"description":"Mapping of argument names and annotations (checked lazily when possible)","title":"args","type":"object"},"atomic":{"default":false,"description":"Wrap hook in a single database transaction","title":"atomic","type":"boolean"},"callback":{"description":"Callback name","title":"callback","type":"string"}},"required":["callback"],"title":"HookConfig","type":"object"},"HttpConfig":{"additionalProperties":false,"description":"Advanced configuration of HTTP client","properties":{"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for this HTTP client (dev only)","title":"alias"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Number of items fetched in a single paginated request (when applicable)","title":"batch_size"},"connection_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Number of simultaneous connections","title":"connection_limit"},"connection_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Connection timeout in seconds","title":"connection_timeout"},"polling_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Interval between polling requests in seconds (when applicable)","title":"polling_interval"},"ratelimit_period":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Time period for rate limiting in seconds","title":"ratelimit_period"},"ratelimit_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Number of requests per period (\"drops\" in leaky bucket)","title":"ratelimit_rate"},"ratelimit_sleep":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Sleep time between requests when rate limit is reached","title":"ratelimit_sleep"},"replay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Use cached HTTP responses instead of making real requests (dev only)","title":"replay"},"replay_path":{"anyOf":[{"type":"string"},{"format":"path","type":"string"},{"type":"null"}],"default":null,"description":"Use cached HTTP responses instead of making real requests (dev only)","title":"replay_path"},"request_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Request timeout in seconds","title":"request_timeout"},"retry_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Number of retries after request failed before giving up","title":"retry_count"},"retry_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Multiplier for sleep time between retries","title":"retry_multiplier"},"retry_sleep":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Sleep time between retries","title":"retry_sleep"}},"title":"HttpConfig","type":"object"},"HttpDatasourceConfig":{"additionalProperties":false,"description":"Generic HTTP datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"http","default":"http","description":"always 'http'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"URL to fetch data from","title":"url"}},"required":["url"],"title":"HttpDatasourceConfig","type":"object"},"IndexTemplateConfig":{"additionalProperties":false,"description":"Index template config","properties":{"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"kind":{"const":"template","default":"template","description":"always 'template'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"},"template":{"description":"Template alias in `templates` section","title":"template","type":"string"},"values":{"description":"Values to be substituted in template (`<key>` -> `value`)","title":"values","type":"object"}},"required":["template","values"],"title":"IndexTemplateConfig","type":"object"},"IpfsDatasourceConfig":{"additionalProperties":false,"description":"IPFS datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"ipfs","default":"ipfs","description":"always 'ipfs'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","default":"https://ipfs.io/ipfs","description":"IPFS node URL, e.g. https://ipfs.io/ipfs/","title":"url"}},"title":"IpfsDatasourceConfig","type":"object"},"JobConfig":{"additionalProperties":false,"description":"Job schedule config","properties":{"args":{"description":"Arguments to pass to the hook","title":"args","type":"object"},"crontab":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Schedule with crontab syntax (`* * * * *`)","title":"crontab"},"daemon":{"default":false,"description":"Run hook as a daemon (never stops)","title":"daemon","type":"boolean"},"hook":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/HookConfig"}],"description":"Name of hook to run","title":"hook"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Schedule with interval in seconds","title":"interval"}},"required":["hook"],"title":"JobConfig","type":"object"},"McpConfig":{"additionalProperties":false,"description":"Config for MCP server","properties":{"api_url":{"anyOf":[{"$ref":"#/$defs/Url"},{"type":"null"}],"default":null,"description":"URL of the management API","title":"api_url"},"compatibility":{"default":true,"description":"Whether to expose resources as tools for clients that don't support MCP resources","title":"compatibility","type":"boolean"},"host":{"default":"127.0.0.1","description":"Host to bind to","title":"host","type":"string"},"port":{"default":9999,"description":"Port to bind to","title":"port","type":"integer"}},"title":"McpConfig","type":"object"},"PostgresDatabaseConfig":{"additionalProperties":false,"description":"Postgres database connection config","properties":{"connection_timeout":{"default":60,"description":"Connection timeout","title":"connection_timeout","type":"integer"},"database":{"default":"postgres","description":"Database name","title":"database","type":"string"},"host":{"description":"Host","title":"host","type":"string"},"immune_tables":{"description":"List of tables to preserve during reindexing","items":{"type":"string"},"title":"immune_tables","type":"array","uniqueItems":true},"kind":{"const":"postgres","default":"postgres","description":"always 'postgres'","title":"kind","type":"string"},"password":{"default":"","description":"Password","title":"password","type":"string"},"port":{"default":5432,"description":"Port","title":"port","type":"integer"},"schema_name":{"default":"public","description":"Schema name","title":"schema_name","type":"string"},"user":{"default":"postgres","description":"User","title":"user","type":"string"}},"required":["host"],"title":"PostgresDatabaseConfig","type":"object"},"PrometheusConfig":{"additionalProperties":false,"description":"Config for Prometheus integration.","properties":{"host":{"default":"127.0.0.1","description":"Host to bind to","title":"host","type":"string"},"port":{"default":8000,"description":"Port to bind to","title":"port","type":"integer"},"update_interval":{"default":1.0,"description":"Interval to update some metrics in seconds","title":"update_interval","type":"number"}},"title":"PrometheusConfig","type":"object"},"ReindexingAction":{"description":"Action that should be performed on reindexing\n\n:param exception: Raise `ReindexingRequiredError` exception.\n:param wipe: Wipe the database and reindex from scratch. (WARNING: This action is irreversible! All indexed data will be lost!)\n:param ignore: Ignore the reindexing cause and continue.","enum":["exception","wipe","ignore"],"title":"ReindexingAction","type":"string"},"ReindexingReason":{"description":"Reason that caused reindexing\n\n:param manual: Manual reindexing.\n:param migration: Migration of the database schema.\n:param rollback: Rollback that couldn't be handled automatically.\n:param config_modified: Index config was modified.\n:param schema_modified: Project models or database schema were modified.","enum":["manual","migration","rollback","config_modified","schema_modified"],"title":"ReindexingReason","type":"string"},"SentryConfig":{"additionalProperties":false,"description":"Config for Sentry integration.","properties":{"debug":{"default":false,"description":"Catch warning messages, increase verbosity.","title":"debug","type":"boolean"},"dsn":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"DSN of the Sentry instance","title":"dsn"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Environment; if not set, guessed from docker/ci/gha/local.","title":"environment"},"release":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Release version; defaults to DipDup package version.","title":"release"},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Server name; defaults to obfuscated hostname.","title":"server_name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"User ID; defaults to obfuscated package/environment.","title":"user_id"}},"title":"SentryConfig","type":"object"},"SkipHistory":{"description":"Whether to skip indexing big map history and use only current state\n\n:param never: Always index big map historical updates.\n:param once: Skip history once after reindexing; process updates as usual on the next resync.\n:param always: Always skip big map history.","enum":["never","once","always"],"title":"SkipHistory","type":"string"},"SqliteDatabaseConfig":{"additionalProperties":false,"description":"SQLite connection config","properties":{"immune_tables":{"description":"List of tables to preserve during reindexing","items":{"type":"string"},"title":"immune_tables","type":"array","uniqueItems":true},"kind":{"const":"sqlite","default":"sqlite","description":"always 'sqlite'","title":"kind","type":"string"},"path":{"default":":memory:","description":"Path to .sqlite file, leave default for in-memory database (`:memory:`)","title":"path","type":"string"}},"title":"SqliteDatabaseConfig","type":"object"},"StarknetAddress":{"$ref":"#/$defs/Hex"},"StarknetContractConfig":{"additionalProperties":false,"description":"Starknet contract config","properties":{"abi":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"description":"Contract ABI","title":"abi"},"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"description":"Contract address","title":"address"},"kind":{"const":"starknet","default":"starknet","description":"Always `starknet`","title":"kind","type":"string"},"typename":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for the contract script","title":"typename"}},"title":"StarknetContractConfig","type":"object"},"StarknetEventsHandlerConfig":{"additionalProperties":false,"description":"Subsquid event handler","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/StarknetContractConfig"}],"description":"Starknet contract","title":"contract"},"name":{"description":"Event name","title":"name","type":"string"}},"required":["callback","contract","name"],"title":"StarknetEventsHandlerConfig","type":"object"},"StarknetEventsIndexConfig":{"additionalProperties":false,"description":"Starknet events index config","properties":{"datasources":{"description":"Aliases of index datasources in `datasources` section","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/StarknetSubsquidDatasourceConfig"},{"$ref":"#/$defs/StarknetNodeDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Event handlers","items":{"$ref":"#/$defs/StarknetEventsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"starknet.events","default":"starknet.events","description":"Always 'starknet.events'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"StarknetEventsIndexConfig","type":"object"},"StarknetNodeDatasourceConfig":{"additionalProperties":false,"description":"Starknet node datasource config","properties":{"fetch_block_headers":{"default":false,"description":"Flag signalling that this datasource can be used for block headers fetching","title":"fetch_block_headers","type":"boolean"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"starknet.node","default":"starknet.node","description":"Always 'starknet.node'","title":"kind","type":"string"},"rollback_depth":{"default":32,"description":"A number of blocks to store in database for rollback","title":"rollback_depth","type":"integer"},"url":{"$ref":"#/$defs/Url","description":"Starknet node URL","title":"url"},"ws_url":{"anyOf":[{"$ref":"#/$defs/WsUrl"},{"type":"null"}],"default":null,"description":"Starknet node WebSocket URL","title":"ws_url"}},"required":["url"],"title":"StarknetNodeDatasourceConfig","type":"object"},"StarknetSubsquidDatasourceConfig":{"additionalProperties":false,"description":"Subsquid datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"starknet.subsquid","default":"starknet.subsquid","description":"always 'starknet.subsquid'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"URL of Subsquid Network API","title":"url"}},"required":["url"],"title":"StarknetSubsquidDatasourceConfig","type":"object"},"SubstrateEventsHandlerConfig":{"additionalProperties":false,"description":"Subsquid event handler","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"name":{"description":"Event name (pallet.event)","title":"name","type":"string"}},"required":["callback","name"],"title":"SubstrateEventsHandlerConfig","type":"object"},"SubstrateEventsIndexConfig":{"additionalProperties":false,"description":"Subsquid datasource config","properties":{"datasources":{"description":"`substrate` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/SubstrateSubsquidDatasourceConfig"},{"$ref":"#/$defs/SubstrateSubscanDatasourceConfig"},{"$ref":"#/$defs/SubstrateNodeDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Event handlers","items":{"$ref":"#/$defs/SubstrateEventsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"substrate.events","default":"substrate.events","description":"Always 'substrate.events'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing and disable this index","title":"last_level","type":"integer"},"runtime":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/SubstrateRuntimeConfig"}],"description":"Substrate runtime","title":"runtime"}},"required":["datasources","runtime","handlers"],"title":"SubstrateEventsIndexConfig","type":"object"},"SubstrateNodeDatasourceConfig":{"additionalProperties":false,"description":"Substrate node datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"substrate.node","default":"substrate.node","description":"Always 'substrate.node'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"Substrate node URL","title":"url"},"ws_url":{"anyOf":[{"$ref":"#/$defs/WsUrl"},{"type":"null"}],"default":null,"description":"Substrate node WebSocket URL","title":"ws_url"}},"required":["url"],"title":"SubstrateNodeDatasourceConfig","type":"object"},"SubstrateRuntimeConfig":{"additionalProperties":false,"description":"Substrate runtime config","properties":{"kind":{"const":"substrate","default":"substrate","description":"Always 'substrate'","title":"kind","type":"string"},"type_registry":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Path to type registry or its alias","title":"type_registry"}},"title":"SubstrateRuntimeConfig","type":"object"},"SubstrateSubscanDatasourceConfig":{"additionalProperties":false,"description":"Subscan datasource config","properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"API key","title":"api_key"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"substrate.subscan","default":"substrate.subscan","description":"always 'substrate.subscan'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"API URL","title":"url"}},"required":["url"],"title":"SubstrateSubscanDatasourceConfig","type":"object"},"SubstrateSubsquidDatasourceConfig":{"additionalProperties":false,"description":"Subsquid datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"substrate.subsquid","default":"substrate.subsquid","description":"always 'substrate.subsquid'","title":"kind","type":"string"},"url":{"$ref":"#/$defs/Url","description":"URL of Subsquid Network API","title":"url"}},"required":["url"],"title":"SubstrateSubsquidDatasourceConfig","type":"object"},"TezosAddress":{"type":"string"},"TezosBigMapsHandlerConfig":{"additionalProperties":false,"description":"Big map handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"}],"description":"Contract to fetch big map from","title":"contract"},"path":{"description":"Path to big map (alphanumeric string with dots)","title":"path","type":"string"}},"required":["callback","contract","path"],"title":"TezosBigMapsHandlerConfig","type":"object"},"TezosBigMapsIndexConfig":{"additionalProperties":false,"description":"Big map index config","properties":{"datasources":{"description":"Tezos datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Mapping of big map diff handlers","items":{"$ref":"#/$defs/TezosBigMapsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"tezos.big_maps","default":"tezos.big_maps","description":"always 'tezos.big_maps'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"},"skip_history":{"$ref":"#/$defs/SkipHistory","default":"never","description":"Fetch only current big map keys ignoring historical changes","title":"skip_history"}},"required":["datasources","handlers"],"title":"TezosBigMapsIndexConfig","type":"object"},"TezosContractConfig":{"additionalProperties":false,"description":"Tezos contract config.","properties":{"address":{"anyOf":[{"$ref":"#/$defs/TezosAddress"},{"type":"null"}],"default":null,"description":"Contract address","title":"address"},"code_hash":{"anyOf":[{"type":"integer"},{"$ref":"#/$defs/TezosAddress"},{"type":"null"}],"default":null,"description":"Contract code hash or address to fetch it from","title":"code_hash"},"kind":{"const":"tezos","default":"tezos","description":"Always `tezos`","title":"kind","type":"string"},"typename":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for the contract script","title":"typename"}},"title":"TezosContractConfig","type":"object"},"TezosEventsHandlerConfig":{"additionalProperties":false,"description":"Event handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"}],"description":"Contract which emits event","title":"contract"},"tag":{"description":"Event tag","title":"tag","type":"string"}},"required":["callback","contract","tag"],"title":"TezosEventsHandlerConfig","type":"object"},"TezosEventsIndexConfig":{"additionalProperties":false,"description":"Event index config","properties":{"datasources":{"description":"`evm` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"First block level to index","title":"first_level","type":"integer"},"handlers":{"description":"Event handlers","items":{"anyOf":[{"$ref":"#/$defs/TezosEventsHandlerConfig"},{"$ref":"#/$defs/TezosEventsUnknownEventHandlerConfig"}]},"title":"handlers","type":"array"},"kind":{"const":"tezos.events","default":"tezos.events","description":"always 'tezos.events'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Last block level to index","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"TezosEventsIndexConfig","type":"object"},"TezosEventsUnknownEventHandlerConfig":{"additionalProperties":false,"description":"Unknown event handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"}],"description":"Contract which emits event","title":"contract"}},"required":["callback","contract"],"title":"TezosEventsUnknownEventHandlerConfig","type":"object"},"TezosHeadIndexConfig":{"additionalProperties":false,"description":"Head block index config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"datasources":{"description":"`tezos` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"kind":{"const":"tezos.head","default":"tezos.head","description":"always 'tezos.head'","title":"kind","type":"string"}},"required":["datasources","callback"],"title":"TezosHeadIndexConfig","type":"object"},"TezosOperationType":{"description":"Type of blockchain operation\n\n:param transaction: transaction\n:param origination: origination\n:param migration: migration\n:param sr_execute: sr_execute\n:param sr_cement: sr_cement","enum":["transaction","origination","migration","sr_execute","sr_cement"],"title":"TezosOperationType","type":"string"},"TezosOperationsHandlerConfig":{"additionalProperties":false,"description":"Operation handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"pattern":{"description":"Filters to match operation groups","items":{"anyOf":[{"$ref":"#/$defs/TezosOperationsHandlerTransactionPatternConfig"},{"$ref":"#/$defs/TezosOperationsHandlerOriginationPatternConfig"},{"$ref":"#/$defs/TezosOperationsHandlerSmartRollupCementPatternConfig"},{"$ref":"#/$defs/TezosOperationsHandlerSmartRollupExecutePatternConfig"}]},"title":"pattern","type":"array"}},"required":["callback","pattern"],"title":"TezosOperationsHandlerConfig","type":"object"},"TezosOperationsHandlerOriginationPatternConfig":{"additionalProperties":false,"description":"Origination handler pattern config","properties":{"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for operation (helps to avoid duplicates)","title":"alias"},"optional":{"default":false,"description":"Whether can operation be missing in operation group","title":"optional","type":"boolean"},"originated_contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match origination of exact contract","title":"originated_contract"},"source":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by source contract alias","title":"source"},"strict":{"default":false,"description":"Match operations by storage only or by the whole code","title":"strict","type":"boolean"},"type":{"const":"origination","default":"origination","description":"always 'origination'","title":"type","type":"string"}},"title":"TezosOperationsHandlerOriginationPatternConfig","type":"object"},"TezosOperationsHandlerSmartRollupCementPatternConfig":{"additionalProperties":false,"description":"Operation handler pattern config","properties":{"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for operation (helps to avoid duplicates)","title":"alias"},"destination":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by destination contract alias","title":"destination"},"optional":{"default":false,"description":"Whether can operation be missing in operation group","title":"optional","type":"boolean"},"source":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by source contract alias","title":"source"},"type":{"const":"sr_cement","default":"sr_cement","description":"always 'sr_cement'","title":"type","type":"string"}},"title":"TezosOperationsHandlerSmartRollupCementPatternConfig","type":"object"},"TezosOperationsHandlerSmartRollupExecutePatternConfig":{"additionalProperties":false,"description":"Operation handler pattern config","properties":{"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for operation (helps to avoid duplicates)","title":"alias"},"destination":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by destination contract alias","title":"destination"},"optional":{"default":false,"description":"Whether can operation be missing in operation group","title":"optional","type":"boolean"},"source":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by source contract alias","title":"source"},"type":{"const":"sr_execute","default":"sr_execute","description":"always 'sr_execute'","title":"type","type":"string"}},"title":"TezosOperationsHandlerSmartRollupExecutePatternConfig","type":"object"},"TezosOperationsHandlerTransactionPatternConfig":{"additionalProperties":false,"description":"Transaction handler pattern config","properties":{"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Alias for operation (helps to avoid duplicates)","title":"alias"},"destination":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by destination contract alias","title":"destination"},"entrypoint":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Match operations by contract entrypoint","title":"entrypoint"},"optional":{"default":false,"description":"Whether can operation be missing in operation group","title":"optional","type":"boolean"},"source":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Match operations by source contract alias","title":"source"},"type":{"const":"transaction","default":"transaction","description":"always 'transaction'","title":"type","type":"string"}},"title":"TezosOperationsHandlerTransactionPatternConfig","type":"object"},"TezosOperationsIndexConfig":{"additionalProperties":false,"description":"Operation index config","properties":{"contracts":{"description":"Aliases of contracts being indexed in `contracts` section","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"}]},"title":"contracts","type":"array"},"datasources":{"description":"`tezos` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"List of indexer handlers","items":{"$ref":"#/$defs/TezosOperationsHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"tezos.operations","default":"tezos.operations","description":"always 'tezos.operations'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"},"types":{"default":["transaction"],"description":"Types of transaction to fetch","items":{"$ref":"#/$defs/TezosOperationType"},"title":"types","type":"array"}},"required":["datasources","handlers"],"title":"TezosOperationsIndexConfig","type":"object"},"TezosOperationsUnfilteredIndexConfig":{"additionalProperties":false,"description":"Operation index config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"datasources":{"description":"`tezos` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"kind":{"const":"tezos.operations_unfiltered","default":"tezos.operations_unfiltered","description":"always 'tezos.operations_unfiltered'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"},"types":{"default":["transaction"],"description":"Types of transaction to fetch","items":{"$ref":"#/$defs/TezosOperationType"},"title":"types","type":"array"}},"required":["datasources","callback"],"title":"TezosOperationsUnfilteredIndexConfig","type":"object"},"TezosTokenBalancesHandlerConfig":{"additionalProperties":false,"description":"Token balance handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Filter by contract","title":"contract"},"token_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Filter by token ID","title":"token_id"}},"required":["callback"],"title":"TezosTokenBalancesHandlerConfig","type":"object"},"TezosTokenBalancesIndexConfig":{"additionalProperties":false,"description":"Token balance index config","properties":{"datasources":{"description":"`tezos` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Mapping of token transfer handlers","items":{"$ref":"#/$defs/TezosTokenBalancesHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"tezos.token_balances","default":"tezos.token_balances","description":"always 'tezos.token_balances'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"TezosTokenBalancesIndexConfig","type":"object"},"TezosTokenTransfersHandlerConfig":{"additionalProperties":false,"description":"Token transfer handler config","properties":{"callback":{"description":"Callback name","title":"callback","type":"string"},"contract":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Filter by contract","title":"contract"},"from":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Filter by sender","title":"from"},"to":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosContractConfig"},{"type":"null"}],"default":null,"description":"Filter by recipient","title":"to"},"token_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Filter by token ID","title":"token_id"}},"required":["callback"],"title":"TezosTokenTransfersHandlerConfig","type":"object"},"TezosTokenTransfersIndexConfig":{"additionalProperties":false,"description":"Token transfer index config","properties":{"datasources":{"description":"`tezos` datasources to use","items":{"anyOf":[{"type":"string"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"}]},"title":"datasources","type":"array"},"first_level":{"default":0,"description":"Level to start indexing from","title":"first_level","type":"integer"},"handlers":{"description":"Mapping of token transfer handlers","items":{"$ref":"#/$defs/TezosTokenTransfersHandlerConfig"},"title":"handlers","type":"array"},"kind":{"const":"tezos.token_transfers","default":"tezos.token_transfers","description":"always 'tezos.token_transfers'","title":"kind","type":"string"},"last_level":{"default":0,"description":"Level to stop indexing at","title":"last_level","type":"integer"}},"required":["datasources","handlers"],"title":"TezosTokenTransfersIndexConfig","type":"object"},"TezosTzktDatasourceConfig":{"additionalProperties":false,"description":"TzKT datasource config","properties":{"buffer_size":{"default":0,"description":"Number of levels to keep in FIFO buffer before processing","title":"buffer_size","type":"integer"},"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"tezos.tzkt","default":"tezos.tzkt","description":"always 'tezos.tzkt'","title":"kind","type":"string"},"merge_subscriptions":{"default":false,"description":"Whether to merge realtime subscriptions","title":"merge_subscriptions","type":"boolean"},"rollback_depth":{"default":2,"description":"Number of blocks to keep in the database to handle reorgs","title":"rollback_depth","type":"integer"},"url":{"$ref":"#/$defs/Url","default":"https://api.tzkt.io","description":"Base API URL, e.g. https://api.tzkt.io/","title":"url"}},"title":"TezosTzktDatasourceConfig","type":"object"},"ToStr":{"anyOf":[{"type":"string"},{"type":"number"}]},"TzipMetadataDatasourceConfig":{"additionalProperties":false,"description":"DipDup Metadata datasource config","properties":{"http":{"anyOf":[{"$ref":"#/$defs/HttpConfig"},{"type":"null"}],"default":null,"description":"HTTP client configuration","title":"http"},"kind":{"const":"tzip_metadata","default":"tzip_metadata","description":"always 'tzip_metadata'","title":"kind","type":"string"},"network":{"description":"Network name, e.g. mainnet, ghostnet, etc.","title":"network","type":"string"},"url":{"$ref":"#/$defs/Url","default":"https://metadata.dipdup.net","description":"GraphQL API URL, e.g. https://metadata.dipdup.net","title":"url"}},"required":["network"],"title":"TzipMetadataDatasourceConfig","type":"object"},"Url":{"type":"string"},"WatchdogAction":{"enum":["exception","warning","ignore"],"title":"WatchdogAction","type":"string"},"WatchdogConfig":{"additionalProperties":false,"description":"Config for the watchdog","properties":{"action":{"anyOf":[{"$ref":"#/$defs/WatchdogAction"},{"type":"null"}],"default":null,"description":"Action to perform when watchdog timeout is reached","title":"action"},"timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Watchdog timeout in seconds","title":"timeout"}},"title":"WatchdogConfig","type":"object"},"WatchdogTrigger":{"enum":["callback","transaction","websocket"],"title":"WatchdogTrigger","type":"string"},"WsUrl":{"type":"string"}},"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"description":"DipDup project configuration file","properties":{"advanced":{"$ref":"#/$defs/AdvancedConfig","description":"Advanced config","title":"advanced"},"api":{"anyOf":[{"$ref":"#/$defs/ApiConfig"},{"type":"null"}],"default":null,"description":"Management API config","title":"api"},"contracts":{"additionalProperties":{"anyOf":[{"$ref":"#/$defs/EvmContractConfig"},{"$ref":"#/$defs/TezosContractConfig"},{"$ref":"#/$defs/StarknetContractConfig"}]},"description":"Mapping of contract aliases and contract configs","title":"contracts","type":"object"},"custom":{"description":"User-defined configuration to use in callbacks","title":"custom","type":"object"},"database":{"anyOf":[{"$ref":"#/$defs/SqliteDatabaseConfig"},{"$ref":"#/$defs/PostgresDatabaseConfig"}],"description":"Database config","title":"database"},"datasources":{"additionalProperties":{"anyOf":[{"$ref":"#/$defs/CoinbaseDatasourceConfig"},{"$ref":"#/$defs/EvmEtherscanDatasourceConfig"},{"$ref":"#/$defs/EvmSourcifyDatasourceConfig"},{"$ref":"#/$defs/EvmBlockvisionDatasourceConfig"},{"$ref":"#/$defs/HttpDatasourceConfig"},{"$ref":"#/$defs/IpfsDatasourceConfig"},{"$ref":"#/$defs/EvmSubsquidDatasourceConfig"},{"$ref":"#/$defs/EvmNodeDatasourceConfig"},{"$ref":"#/$defs/TzipMetadataDatasourceConfig"},{"$ref":"#/$defs/TezosTzktDatasourceConfig"},{"$ref":"#/$defs/StarknetSubsquidDatasourceConfig"},{"$ref":"#/$defs/StarknetNodeDatasourceConfig"},{"$ref":"#/$defs/SubstrateSubsquidDatasourceConfig"},{"$ref":"#/$defs/SubstrateSubscanDatasourceConfig"},{"$ref":"#/$defs/SubstrateNodeDatasourceConfig"}]},"description":"Mapping of datasource aliases and datasource configs","title":"datasources","type":"object"},"hasura":{"anyOf":[{"$ref":"#/$defs/HasuraConfig"},{"type":"null"}],"default":null,"description":"Hasura integration config","title":"hasura"},"hooks":{"additionalProperties":{"$ref":"#/$defs/HookConfig"},"description":"Mapping of hook aliases and hook configs","title":"hooks","type":"object"},"indexes":{"additionalProperties":{"anyOf":[{"$ref":"#/$defs/TezosBigMapsIndexConfig"},{"$ref":"#/$defs/TezosEventsIndexConfig"},{"$ref":"#/$defs/TezosHeadIndexConfig"},{"$ref":"#/$defs/TezosOperationsIndexConfig"},{"$ref":"#/$defs/TezosOperationsUnfilteredIndexConfig"},{"$ref":"#/$defs/TezosTokenTransfersIndexConfig"},{"$ref":"#/$defs/TezosTokenBalancesIndexConfig"},{"$ref":"#/$defs/EvmEventsIndexConfig"},{"$ref":"#/$defs/EvmTransactionsIndexConfig"},{"$ref":"#/$defs/StarknetEventsIndexConfig"},{"$ref":"#/$defs/SubstrateEventsIndexConfig"},{"$ref":"#/$defs/IndexTemplateConfig"}]},"description":"Mapping of index aliases and index configs","title":"indexes","type":"object"},"jobs":{"additionalProperties":{"$ref":"#/$defs/JobConfig"},"description":"Mapping of job aliases and job configs","title":"jobs","type":"object"},"logging":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object"},{"type":"string"},{"type":"integer"}],"default":"INFO","description":"Modify logging verbosity","title":"logging"},"mcp":{"anyOf":[{"$ref":"#/$defs/McpConfig"},{"type":"null"}],"default":null,"description":"MCP server config","title":"mcp"},"package":{"description":"Name of indexer's Python package, existing or not","title":"package","type":"string"},"prometheus":{"anyOf":[{"$ref":"#/$defs/PrometheusConfig"},{"type":"null"}],"default":null,"description":"Prometheus integration config","title":"prometheus"},"runtimes":{"additionalProperties":{"$ref":"#/$defs/SubstrateRuntimeConfig"},"description":"Mapping of runtime aliases and runtime configs","title":"runtimes","type":"object"},"sentry":{"anyOf":[{"$ref":"#/$defs/SentryConfig"},{"type":"null"}],"default":null,"description":"Sentry integration config","title":"sentry"},"spec_version":{"$ref":"#/$defs/ToStr","description":"Version of config specification, currently always `3.0`","title":"spec_version"},"templates":{"additionalProperties":{"anyOf":[{"$ref":"#/$defs/TezosBigMapsIndexConfig"},{"$ref":"#/$defs/TezosEventsIndexConfig"},{"$ref":"#/$defs/TezosHeadIndexConfig"},{"$ref":"#/$defs/TezosOperationsIndexConfig"},{"$ref":"#/$defs/TezosOperationsUnfilteredIndexConfig"},{"$ref":"#/$defs/TezosTokenTransfersIndexConfig"},{"$ref":"#/$defs/TezosTokenBalancesIndexConfig"},{"$ref":"#/$defs/EvmEventsIndexConfig"},{"$ref":"#/$defs/EvmTransactionsIndexConfig"},{"$ref":"#/$defs/StarknetEventsIndexConfig"},{"$ref":"#/$defs/SubstrateEventsIndexConfig"}]},"description":"Mapping of template aliases and index templates","title":"templates","type":"object"}},"required":[],"title":"DipDup","type":"object"}
</schema>

[User] Provide a JSON object that satisfies the schema "DipDup". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.

This section allows users to tune some system-wide options, either experimental or unsuitable for generic configurations.

Use different algorithm to match Tezos operations (dev only)

alt_operation_matcher

Overwrite precision if it's not guessed correctly based on project models.

decimal_precision

Establish realtime connection and start collecting messages while sync is in progress (faster, but consumes more RAM).

early_realtime

Do not start job scheduler until all indexes reach the realtime state.

postpone_jobs

Mapping of reindexing reasons and actions DipDup performs.

reindex

A number of blocks to keep for rollback (affects all datasources)

rollback_depth

`apscheduler` scheduler config.

scheduler

Disable journaling and data integrity checks. Use only for testing.

unsafe_sqlite

Mapping of watchdog triggers and actions DipDup performs.

watchdog

AdvancedConfig

Management API config

Host to bind to

host

Port to bind to

port

ApiConfig

Coinbase datasource config

API key

api_key

HTTP client configuration

http

always 'coinbase'

kind

API passphrase

passphrase

API secret key

secret_key

CoinbaseDatasourceConfig

Blockvision datasource config

API key

api_key

HTTP client configuration

http

always 'evm.blockvision'

kind

API URL

url

EvmBlockvisionDatasourceConfig

EVM contract config

Contract ABI

abi

Contract address

address

Always `evm`

kind

Alias for the contract script

typename

EvmContractConfig

Etherscan datasource config

API key

api_key

HTTP client configuration

http

always 'evm.etherscan'

kind

API URL

url

EvmEtherscanDatasourceConfig

Subsquid event handler

Callback name

callback

EVM contract

contract

Event name

name

EvmEventsHandlerConfig

Subsquid datasource config

`evm` datasources to use

datasources

Level to start indexing from

first_level

Event handlers

handlers

Always 'evm.events'

kind

Level to stop indexing and disable this index

last_level

EvmEventsIndexConfig

EVM node datasource config

HTTP client configuration

http

Always 'evm.node'

kind

A number of blocks to store in database for rollback

rollback_depth

EVM node URL

url

EVM node WebSocket URL

ws_url

EvmNodeDatasourceConfig

Sourcify datasource config

API key

api_key

Chain ID

chain_id

HTTP client configuration

http

always 'evm.sourcify'

kind

API URL

url

EvmSourcifyDatasourceConfig

Subsquid datasource config

HTTP client configuration

http

always 'evm.subsquid'

kind

URL of Subsquid Network API

url

EvmSubsquidDatasourceConfig

Subsquid transaction handler

Callback name

callback

Transaction sender

from

Method name

method

Method signature

signature

Transaction receiver

to

EvmTransactionsHandlerConfig

Index that uses Subsquid Network as a datasource for transactions

`evm` datasources to use

datasources

Level to start indexing from

first_level

Transaction handlers

handlers

always 'evm.transactions'

kind

Level to stop indexing at

last_level

EvmTransactionsIndexConfig

Config for the Hasura integration.

Admin secret of the Hasura instance.

admin_secret

Whether to allow aggregations in unauthenticated queries.

allow_aggregations

Whether to ignore errors when applying Hasura metadata.

allow_inconsistent_metadata

Whether to use camelCase instead of default pascal_case for the field names.

camel_case

Whether source should be added to Hasura if missing.

create_source

List of table/view names to make private.

hide

Whether to make internal tables (prefixed with "dipdup") private.

hide_internal

HTTP connection tunables

http

Enable REST API both for autogenerated and custom queries.

rest

Row limit for unauthenticated queries.

select_limit

Hasura source for DipDup to configure, others will be left untouched.

source

URL of the Hasura instance.

url

HasuraConfig

Hook config

Mapping of argument names and annotations (checked lazily when possible)

args

Wrap hook in a single database transaction

atomic

Callback name

callback

HookConfig

Advanced configuration of HTTP client

Alias for this HTTP client (dev only)

alias

Number of items fetched in a single paginated request (when applicable)

batch_size

Number of simultaneous connections

connection_limit

Connection timeout in seconds

connection_timeout

Interval between polling requests in seconds (when applicable)

polling_interval

Time period for rate limiting in seconds

ratelimit_period

Number of requests per period ("drops" in leaky bucket)

ratelimit_rate

Sleep time between requests when rate limit is reached

ratelimit_sleep

Use cached HTTP responses instead of making real requests (dev only)

replay

replay_path

Request timeout in seconds

request_timeout

Number of retries after request failed before giving up

retry_count

Multiplier for sleep time between retries

retry_multiplier

Sleep time between retries

retry_sleep

HttpConfig

Generic HTTP datasource config

HTTP client configuration

http

always 'http'

kind

URL to fetch data from

url

HttpDatasourceConfig

Index template config

Level to start indexing from

first_level

always 'template'

kind

Level to stop indexing at

last_level

Template alias in `templates` section

template

Values to be substituted in template (`<key>` -> `value`)

values

IndexTemplateConfig

IPFS datasource config

HTTP client configuration

http

always 'ipfs'

kind

IPFS node URL, e.g. https://ipfs.io/ipfs/

url

IpfsDatasourceConfig

Job schedule config

Arguments to pass to the hook

args

Schedule with crontab syntax (`* * * * *`)

crontab

Run hook as a daemon (never stops)

daemon

Name of hook to run

hook

Schedule with interval in seconds

interval

JobConfig

Config for MCP server

URL of the management API

api_url

Whether to expose resources as tools for clients that don't support MCP resources

compatibility

Host to bind to

host

Port to bind to

port

McpConfig

Postgres database connection config

Connection timeout

connection_timeout

Database name

database

Host

host

List of tables to preserve during reindexing

immune_tables

always 'postgres'

kind

Password

password

Port

port

Schema name

schema_name

User

user

PostgresDatabaseConfig

Config for Prometheus integration.

Host to bind to

host

Port to bind to

port

Interval to update some metrics in seconds

update_interval

PrometheusConfig

Action that should be performed on reindexing

:param exception: Raise `ReindexingRequiredError` exception.
:param wipe: Wipe the database and reindex from scratch. (WARNING: This action is irreversible! All indexed data will be lost!)
:param ignore: Ignore the reindexing cause and continue.

ReindexingAction

Reason that caused reindexing

:param manual: Manual reindexing.
:param migration: Migration of the database schema.
:param rollback: Rollback that couldn't be handled automatically.
:param config_modified: Index config was modified.
:param schema_modified: Project models or database schema were modified.

ReindexingReason

Config for Sentry integration.

Catch warning messages, increase verbosity.

debug

DSN of the Sentry instance

dsn

Environment; if not set, guessed from docker/ci/gha/local.

environment

Release version; defaults to DipDup package version.

release

Server name; defaults to obfuscated hostname.

server_name

User ID; defaults to obfuscated package/environment.

user_id

SentryConfig

Whether to skip indexing big map history and use only current state

:param never: Always index big map historical updates.
:param once: Skip history once after reindexing; process updates as usual on the next resync.
:param always: Always skip big map history.

SkipHistory

SQLite connection config

immune_tables

always 'sqlite'

kind

Path to .sqlite file, leave default for in-memory database (`:memory:`)

path

SqliteDatabaseConfig

Starknet contract config

Contract ABI

abi

Contract address

address

Always `starknet`

kind

Alias for the contract script

typename

StarknetContractConfig

Subsquid event handler

Callback name

callback

Starknet contract

contract

Event name

name

StarknetEventsHandlerConfig

Starknet events index config

Aliases of index datasources in `datasources` section

datasources

Level to start indexing from

first_level

Event handlers

handlers

Always 'starknet.events'

kind

Level to stop indexing at

last_level

StarknetEventsIndexConfig

Starknet node datasource config

Flag signalling that this datasource can be used for block headers fetching

fetch_block_headers

HTTP client configuration

http

Always 'starknet.node'

kind

rollback_depth

Starknet node URL

url

Starknet node WebSocket URL

ws_url

StarknetNodeDatasourceConfig

Subsquid datasource config

HTTP client configuration

http

always 'starknet.subsquid'

kind

URL of Subsquid Network API

url

StarknetSubsquidDatasourceConfig

Subsquid event handler

Callback name

callback

Event name (pallet.event)

name

SubstrateEventsHandlerConfig

Subsquid datasource config

`substrate` datasources to use

datasources

Level to start indexing from

first_level

Event handlers

handlers

Always 'substrate.events'

kind

Level to stop indexing and disable this index

last_level

Substrate runtime

runtime

SubstrateEventsIndexConfig

Substrate node datasource config

HTTP client configuration

http

Always 'substrate.node'

kind

Substrate node URL

url

Substrate node WebSocket URL

ws_url

SubstrateNodeDatasourceConfig

Substrate runtime config

Always 'substrate'

kind

Path to type registry or its alias

type_registry

SubstrateRuntimeConfig

Subscan datasource config

API key

api_key

HTTP client configuration

http

always 'substrate.subscan'

kind

API URL

url

SubstrateSubscanDatasourceConfig

Subsquid datasource config

HTTP client configuration

http

always 'substrate.subsquid'

kind

URL of Subsquid Network API

url

SubstrateSubsquidDatasourceConfig

Big map handler config

Callback name

callback

Contract to fetch big map from

contract

Path to big map (alphanumeric string with dots)

path

TezosBigMapsHandlerConfig

Big map index config

Tezos datasources to use

datasources

Level to start indexing from

first_level

Mapping of big map diff handlers

handlers

always 'tezos.big_maps'

kind

Level to stop indexing at

last_level

Fetch only current big map keys ignoring historical changes

skip_history

TezosBigMapsIndexConfig

Tezos contract config.

Contract address

address

Contract code hash or address to fetch it from

code_hash

Always `tezos`

kind

Alias for the contract script

typename

TezosContractConfig

Event handler config

Callback name

callback

Contract which emits event

contract

Event tag

tag

TezosEventsHandlerConfig

Event index config

`evm` datasources to use

datasources

First block level to index

first_level

Event handlers

handlers

always 'tezos.events'

kind

Last block level to index

last_level

TezosEventsIndexConfig

Unknown event handler config

Callback name

callback

Contract which emits event

contract

TezosEventsUnknownEventHandlerConfig

Head block index config

Callback name

callback

`tezos` datasources to use

datasources

always 'tezos.head'

kind

TezosHeadIndexConfig

Type of blockchain operation

:param transaction: transaction
:param origination: origination
:param migration: migration
:param sr_execute: sr_execute
:param sr_cement: sr_cement

TezosOperationType

Operation handler config

Callback name

callback

Filters to match operation groups

pattern

TezosOperationsHandlerConfig

Origination handler pattern config

Alias for operation (helps to avoid duplicates)

alias

Whether can operation be missing in operation group

optional

Match origination of exact contract

originated_contract

Match operations by source contract alias

source

Match operations by storage only or by the whole code

strict

always 'origination'

type

TezosOperationsHandlerOriginationPatternConfig

Operation handler pattern config

alias

Match operations by destination contract alias

destination

optional

source

always 'sr_cement'

type

TezosOperationsHandlerSmartRollupCementPatternConfig

Operation handler pattern config

alias

destination

optional

source

always 'sr_execute'

type

TezosOperationsHandlerSmartRollupExecutePatternConfig

Transaction handler pattern config

alias

destination

Match operations by contract entrypoint

entrypoint

optional

source

always 'transaction'

type

TezosOperationsHandlerTransactionPatternConfig

Operation index config

Aliases of contracts being indexed in `contracts` section

contracts

`tezos` datasources to use

datasources

Level to start indexing from

first_level

List of indexer handlers

handlers

always 'tezos.operations'

kind

Level to stop indexing at

last_level

Types of transaction to fetch

types

TezosOperationsIndexConfig

Operation index config

Callback name

callback

`tezos` datasources to use

datasources

Level to start indexing from

first_level

always 'tezos.operations_unfiltered'

kind

Level to stop indexing at

last_level

Types of transaction to fetch

types

TezosOperationsUnfilteredIndexConfig

Token balance handler config

Callback name

callback

Filter by contract

contract

Filter by token ID

token_id

TezosTokenBalancesHandlerConfig

Token balance index config

`tezos` datasources to use

datasources

Level to start indexing from

first_level

Mapping of token transfer handlers

handlers

always 'tezos.token_balances'

kind

Level to stop indexing at

last_level

TezosTokenBalancesIndexConfig

Token transfer handler config

Callback name

callback

Filter by contract

contract

Filter by sender

from

Filter by recipient

to

Filter by token ID

token_id

TezosTokenTransfersHandlerConfig

Token transfer index config

`tezos` datasources to use

datasources

Level to start indexing from

first_level

Mapping of token transfer handlers

handlers

always 'tezos.token_transfers'

kind

Level to stop indexing at

last_level

TezosTokenTransfersIndexConfig

TzKT datasource config

Number of levels to keep in FIFO buffer before processing

buffer_size

HTTP client configuration

http

always 'tezos.tzkt'

kind

Whether to merge realtime subscriptions

merge_subscriptions

Number of blocks to keep in the database to handle reorgs

rollback_depth

Base API URL, e.g. https://api.tzkt.io/

url

TezosTzktDatasourceConfig

DipDup Metadata datasource config

HTTP client configuration

http

always 'tzip_metadata'

kind

Network name, e.g. mainnet, ghostnet, etc.

network

GraphQL API URL, e.g. https://metadata.dipdup.net

url

TzipMetadataDatasourceConfig

WatchdogAction

Config for the watchdog

Action to perform when watchdog timeout is reached

action

Watchdog timeout in seconds

timeout

WatchdogConfig

WatchdogTrigger

DipDup project configuration file

Advanced config

advanced

Management API config

api

Mapping of contract aliases and contract configs

contracts

User-defined configuration to use in callbacks

custom

Database config

database

Mapping of datasource aliases and datasource configs

datasources

Hasura integration config

hasura

Mapping of hook aliases and hook configs

hooks

Mapping of index aliases and index configs

indexes

Mapping of job aliases and job configs

jobs

Modify logging verbosity

logging

MCP server config

mcp

Name of indexer's Python package, existing or not

package

Prometheus integration config

prometheus

Mapping of runtime aliases and runtime configs

runtimes

Sentry integration config

sentry

Version of config specification, currently always `3.0`

spec_version

Mapping of template aliases and index templates

templates

DipDup

Provide a JSON object that satisfies the schema "DipDup". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.


[User] Provide a JSON object that satisfies the schema "djlint schema". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.

JSON schema fcor djLint's configuration file

{filename}:{line}: {code} {message} {match}

html django jinja nunjucks handlebars golang angular

djlint schema

Provide a JSON object that satisfies the schema "djlint schema". Here are the required top‑level fields: none (all optional). Return only the valid JSON object.