events

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewScanBuilder

func NewScanBuilder() *Builder

func (*Builder) Build

func (b *Builder) Build() error

func (*Builder) BuildAndRun

func (b *Builder) BuildAndRun() (*redo2.Recipet, error)

func (*Builder) SetBlockMargin

func (b *Builder) SetBlockMargin(margin uint64) *Builder

func (*Builder) SetClient

func (b *Builder) SetClient(conn *ethclient.Client) *Builder

func (*Builder) SetContract

func (b *Builder) SetContract(addr common.Address, abi_str string, evt_names ...string) *Builder

set addr to address(0) e.g.common.Address{} to filter any contracts with same abi

func (*Builder) SetDataChan

func (b *Builder) SetDataChan(dataCh chan<- Event, errChan chan<- error) *Builder

func (*Builder) SetFrom

func (b *Builder) SetFrom(f uint64) *Builder

func (*Builder) SetGracefullExit

func (b *Builder) SetGracefullExit(yes bool) *Builder

func (*Builder) SetInterval

func (b *Builder) SetInterval(interval time.Duration) *Builder

func (*Builder) SetProgressChan

func (b *Builder) SetProgressChan(pc chan<- Progress) *Builder

func (*Builder) SetStep

func (b *Builder) SetStep(f uint64) *Builder

func (*Builder) SetTo

func (b *Builder) SetTo(f uint64) *Builder

type Event

type Event struct {
	BlockNumber uint64
	TxHash      common.Hash
	Address     common.Address
	Name        string
	Data        JSONObj
}

func (Event) String

func (evt Event) String() string

type JSONObj

type JSONObj map[string]interface{}

func NewJSONObj

func NewJSONObj() JSONObj

func (JSONObj) Get

func (obj JSONObj) Get(name string) interface{}

func (JSONObj) Set

func (obj JSONObj) Set(name string, val interface{})

func (JSONObj) String

func (obj JSONObj) String() string

func (JSONObj) Unmarshal

func (obj JSONObj) Unmarshal(obj_ptr interface{}) error

type Progress

type Progress struct {
	From uint64
	To   uint64
}

Jump to

Keyboard shortcuts

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