Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInput = fmt.Errorf("one or more input parameters is wrong")
)
Blockchain monitor errors.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]ethtypes.Log, error) HeaderByNumber(ctx context.Context, number *big.Int) (*ethtypes.Header, error) }
Client defines typed wrappers for the Ethereum RPC API.
type Config ¶
type Config struct { CollectPause int64 // pause between collect iterations SchedulePause int64 // pause between schedule iterations Timeout int64 // maximum time of one operation }
Config for blockchain monitor.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor implements blockchain monitor which fetches logs from the blockchain and creates jobs accordingly.
func NewMonitor ¶
func NewMonitor(cfg *Config, logger *util.Logger, db *reform.DB, queue Queue, eth Client, pscAddr common.Address, ptcAddr common.Address) (*Monitor, error)
NewMonitor creates a Monitor with specified settings.
Click to show internal directories.
Click to hide internal directories.