Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Project string `mapstructure:"project"`
Log LogConfig `mapstructure:"log"`
Scanner ScannerConfig `mapstructure:"scanner"`
RPC []rpc.NodeConfig `mapstructure:"rpc_nodes"`
}
Config represents the global configuration for the scanner application.
type LogConfig ¶
type LogConfig struct {
Level string `mapstructure:"level"` // debug, info, warn, error
Format string `mapstructure:"format"` // text, json
}
LogConfig holds configuration for application logging.
type ScannerConfig ¶
type ScannerConfig struct {
ChainID string `mapstructure:"chain_id"`
BatchSize uint64 `mapstructure:"batch_size"`
Interval time.Duration `mapstructure:"interval"`
// Confirmations (ReorgSafeDepth): Protection at the scanning endpoint
Confirmations uint64 `mapstructure:"confirmations"`
// Startup strategy
StartBlock uint64 `mapstructure:"start_block"` // If > 0 and ForceStart=true, forces start from here
ForceStart bool `mapstructure:"force_start"` // Whether to force override persistence records
Rewind uint64 `mapstructure:"start_rewind"` // If no saved cursor, start from Latest - Rewind
CursorRewind uint64 `mapstructure:"cursor_rewind"` // If saved cursor exists, start from Cursor - CursorRewind (safety buffer)
UseBloom bool `mapstructure:"use_bloom"`
// StoragePrefix: Prefix for storage layer (e.g., PG table prefix or Redis Key prefix)
StoragePrefix string `mapstructure:"storage_prefix"`
}
ScannerConfig holds specific settings for the EVM scanning process.
Click to show internal directories.
Click to hide internal directories.