-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
68 lines (61 loc) · 1.77 KB
/
config.example.yaml
File metadata and controls
68 lines (61 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Server Configuration
# holds HTTP server settings
server:
port: 8080
# Logging Configuration
logging:
# Level can be: debug, info, warn, error
level: "info"
# Format can be: json, text
format: "text"
# Database Configuration (PostgreSQL)
database:
url: "postgres://user:password@localhost:5432/watcher?sslmode=disable"
max_conns: 20
min_conns: 5
# Redis Configuration
redis:
url: "redis://localhost:6379"
# Optional password
password: ""
# Chains Configuration
# You can configure multiple chains here
chains:
- id: "1"
type: "evm"
internal_code: "ETHEREUM_MAINNET"
finality_blocks: 12
# Duration string, e.g., "10s", "1m"
scan_interval: "12s"
# Enable rescan worker
rescan_ranges: true
providers:
- name: "public"
url: "https://ethereum-rpc.publicnode.com"
# Adaptive throttling (optional) - reduces API costs by 70-90%
adaptive_throttling:
enabled: true
min_scan_interval: "500ms" # Fastest polling rate
max_scan_interval: "60s" # Slowest polling rate
head_cache_ttl: "3s" # Cache GetLatestBlock for 3s
batch_enabled: true # Enable batch block fetching (EVM only)
max_batch_size: 20 # Fetch up to 20 blocks per API call
lag_burst_threshold: 50 # Use max batch when 50+ blocks behind
- id: "137"
type: "evm"
internal_code: "POLYGON_MAINNET"
finality_blocks: 256
scan_interval: "2s"
rescan_ranges: false
providers:
- name: "public"
url: "https://polygon-rpc.com"
- id: "784"
type: "sui"
internal_code: "SUI_TEST"
finality_blocks: 12
scan_interval: "10s"
rescan_ranges: true
providers:
- name: "public"
url: "https://fullnode.testnet.sui.io:443"