dripper

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyStopped = errors.New("already stopped")

Functions

func Main

func Main(version string) cliapp.LifecycleAction

Types

type CLIConfig

type CLIConfig struct {
	L1EthRpc       string
	DrippieAddress string
	PollInterval   time.Duration
	TxMgrConfig    txmgr.CLIConfig
	RPCConfig      oprpc.CLIConfig
	LogConfig      oplog.CLIConfig
	MetricsConfig  opmetrics.CLIConfig
	PprofConfig    oppprof.CLIConfig
}

func NewConfig

func NewConfig(ctx *cli.Context) *CLIConfig

func (*CLIConfig) Check

func (c *CLIConfig) Check() error

type Client

type Client interface {
	CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
	CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
}

type DripExecutor

type DripExecutor struct {
	DriverSetup
	// contains filtered or unexported fields
}

func NewDripExecutor

func NewDripExecutor(setup DriverSetup) (_ *DripExecutor, err error)

func (*DripExecutor) Start

func (d *DripExecutor) Start() error

func (*DripExecutor) Stop

func (d *DripExecutor) Stop() error

type DripExecutorConfig

type DripExecutorConfig struct {
	PollInterval   time.Duration
	NetworkTimeout time.Duration

	DrippieAddr *common.Address
}

type DripExecutorDriver

type DripExecutorDriver interface {
	Start() error
	Stop() error
}

type DripExecutorService

type DripExecutorService struct {
	Log     log.Logger
	Metrics metrics.Metricer

	DripExecutorConfig

	TxManager txmgr.TxManager
	Client    *ethclient.Client

	Version string
	// contains filtered or unexported fields
}

func DripExecutorServiceFromCLIConfig

func DripExecutorServiceFromCLIConfig(ctx context.Context, version string, cfg *CLIConfig, log log.Logger) (*DripExecutorService, error)

func (*DripExecutorService) Driver

func (*DripExecutorService) Kill

func (ds *DripExecutorService) Kill() error

func (*DripExecutorService) Start

func (ds *DripExecutorService) Start(ctx context.Context) error

func (*DripExecutorService) Stop

func (ds *DripExecutorService) Stop(ctx context.Context) error

func (*DripExecutorService) Stopped

func (ds *DripExecutorService) Stopped() bool

type DrippieContract

type DrippieContract interface {
	GetDripCount(*bind.CallOpts) (*big.Int, error)
	Created(*bind.CallOpts, *big.Int) (string, error)
	Executable(*bind.CallOpts, string) (bool, error)
}

type DriverSetup

type DriverSetup struct {
	Log    log.Logger
	Metr   metrics.Metricer
	Cfg    DripExecutorConfig
	Txmgr  txmgr.TxManager
	Client Client
}

Jump to

Keyboard shortcuts

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