balanceMonitor

package
v0.0.0-...-175837b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, b *BalanceMonitor, cfg *Config) (err error)

func Serve

func Serve(ctx context.Context, c *cli.Context) (*echo.Echo, func() error)

Serve starts the metrics server on the given address, will be closed when the given context is cancelled.

Types

type BalanceMonitor

type BalanceMonitor struct {
	// contains filtered or unexported fields
}

func (*BalanceMonitor) Close

func (b *BalanceMonitor) Close(ctx context.Context)

func (*BalanceMonitor) InitFromCli

func (b *BalanceMonitor) InitFromCli(ctx context.Context, c *cli.Context) error

InitFromCli inits a new Indexer from command line or environment variables.

func (*BalanceMonitor) Name

func (b *BalanceMonitor) Name() string

func (*BalanceMonitor) Start

func (b *BalanceMonitor) Start() error

type Config

type Config struct {
	Addresses      []common.Address
	L1RPCUrl       string
	L2RPCUrl       string
	ERC20Addresses []common.Address
	Interval       int
}

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

type ERC20

type ERC20 interface {
	BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error)
}

Jump to

Keyboard shortcuts

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