basic

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: 16 Imported by: 0

README

SDK Usage Example

This directory contains a full example of how to use evm-scanner as a Go library (SDK) in your own applications.

How to Run

  1. Prepare configuration: Ensure you have a config.yaml in the root directory (you can copy config.yaml.example).

  2. Run the example:

    go run main.go
    

Key Concepts

  • Chain Presets: Register custom chain parameters (block time, reorg safety).
  • Client: High-level RPC client with failover support.
  • Persistence: Choose between Memory, Redis, or Postgres for tracking progress.
  • Scanner: The core engine that orchestrates fetching logs and managing cursors.
  • Handler: Define your own logic to process decoded logs.

Code Overview

  • pkg/scanner: Core scanning logic.
  • pkg/rpc: RPC client wrapper.
  • pkg/decoder: ABI-based event decoding.
  • pkg/storage: Progress persistence implementations.

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