Commit 3e60eb32 authored by duanjinfei's avatar duanjinfei

feat:add config example

parent e7474c0f
Pipeline #920 failed with stages
chain:
# 区块链节点的 RPC 地址 (HTTP 或 HTTPS)
# 示例: https://mainnet.infura.io/v3/YOUR_KEY
rpc_url: "http://localhost:8545"
# Factory 合约部署后的地址
# 必须是 Checksum 格式 (混合大小写)
factory_address: "0x0000000000000000000000000000000000000000"
# 链 ID (主网: 1, Goerli: 5, Local: 1337)
chain_id: 1337
database:
# PostgreSQL 连接字符串
# 格式: postgres://user:password@host:port/dbname?sslmode=disable
dsn: "postgres://postgres:password@localhost:5432/chainsql?sslmode=disable"
sync:
# 起始扫描区块高度 (部署合约时的区块高度)
start_block: 0
# 区块确认数 (防止重组回滚,建议: L2=1, L1=12)
confirmations: 12
# 轮询间隔 (Duration 格式: 2s, 100ms, 1m)
poll_interval: "2s"
# 每次 eth_getLogs 请求的最大区块范围
# 建议: 公共节点设为 2000,私有节点可设为 10000
max_batch_size: 100
# 分批轮询地址时的每批数量
# 如果合约数量巨大,调小此值以防止 RPC 请求过大
address_batch_size: 50
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment