ticker

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ref

func Ref[A any](a A) *A

Types

type EthClient added in v0.4.2

type EthClient interface {
	HeaderByNumber(ctx context.Context, number *big.Int) (*ethtypes.Header, error)
	TransactionReceipt(ctx context.Context, txHash common.Hash) (*ethtypes.Receipt, error)
	SuggestGasPrice(ctx context.Context) (*big.Int, error)
	EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
	SendTransaction(ctx context.Context, tx *ethtypes.Transaction) error
	PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
}

EthClient contains all the ethclient.Client methods that we use.

type Watcher

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

func New

func New(
	logger *zerolog.Logger,
	prod status.Producer,
	confirmationBlocks *big.Int,
	boostAfterBlocks *big.Int,
	dbs db.Store,
	client *ethclient.Client,
	chainID *big.Int,
	sender sender.Sender,
	walletIndex int,
) *Watcher

func (*Watcher) Tick

func (w *Watcher) Tick(ctx context.Context) error

Jump to

Keyboard shortcuts

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