eth

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectedContract

type ConnectedContract interface {
	eth.ContractCodec
	Call(result interface{}, methodName string, args ...interface{}) error
	SubscribeToLogs(listener LogListener) (connected bool, _ UnsubscribeFunc)
}

func NewConnectedContract

func NewConnectedContract(
	codec eth.ContractCodec,
	address common.Address,
	ethClient eth.Client,
	logBroadcaster LogBroadcaster,
) ConnectedContract

type LogBroadcaster

type LogBroadcaster interface {
	Start()
	Register(address common.Address, listener LogListener) (connected bool)
	Unregister(address common.Address, listener LogListener)
	Stop()
}

The LogBroadcaster manages log subscription requests for the Chainlink node. Instead of creating a new websocket subscription for each request, it multiplexes all subscriptions to all of the relevant contracts over a single connection and forwards the logs to the relevant subscribers.

func NewLogBroadcaster

func NewLogBroadcaster(ethClient eth.Client, orm *orm.ORM) LogBroadcaster

type LogListener

type LogListener interface {
	OnConnect()
	OnDisconnect()
	HandleLog(log interface{}, err error)
}

func NewDecodingLogListener

func NewDecodingLogListener(codec eth.ContractCodec, nativeLogTypes map[common.Hash]interface{}, innerListener LogListener) LogListener

type UnsubscribeFunc

type UnsubscribeFunc func()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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