timelock

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	ABI *abi.ABI
	// contains filtered or unexported fields
}

Worker represents a worker instance. address is an array of addresses as expected by ethereum.FilterQuery, but it's enforced only to one address in the logic.

func NewTimelockWorker

func NewTimelockWorker(nodeURL, timelockAddress, callProxyAddress, privateKey string, fromBlock *big.Int, pollPeriod int64, logger *zerolog.Logger) (*Worker, error)

NewTimelockWorker initializes and returns a timelockWorker. It's a singleton, so further executions will retrieve the same timelockWorker.

func (*Worker) Listen

func (tw *Worker) Listen(ctx context.Context) error

Listen is the main function of a Timelock Worker, it subscribes to events using the ethClient and targeting the contract address set.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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