custom-chain

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

Custom Chain Preset Example

Not all chains are equal. Some have 12-second block times (Ethereum), while others have 1-second or even sub-second block times. Similarly, reorg safety windows vary significantly.

Features Shown

  • Chain Registration: How to use pkg/chain to register a new network's parameters.
  • Preset Inheritance: Using the registered preset to configure the scanner.Config automatically.
  • Parameter Optimization: Adjusting BatchSize and Interval for high-throughput networks.

Why use Presets?

In a multi-scanner environment (e.g., an indexing service supporting 20+ chains), presets allow you to centralize the network knowledge (block times, safety limits) rather than hardcoding values for every individual scanner instance.

How to Run

go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL