common

package
v0.0.0-...-cfcde66 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const RETRACE_FILE_NAME = "./log-retrace.json"

Variables

This section is empty.

Functions

func FormSubscribeArgs

func FormSubscribeArgs(
	fromBlock int64,
	toBlock int64,
	addresses []common.Address,
	topics [][]common.Hash,
) map[string]interface{}

func GetAccountFile

func GetAccountFile(path string, suffix string) string

func GetHeight

func GetHeight(httpClient *rpc.Client) (uint64, error)

func GetLogs

func GetLogs(httpClient *rpc.Client, fromBlock uint64, toBlock uint64, address []common.Address, topics [][]common.Hash) ([]types.Log, error)

func GetNonAnnoymousEvent

func GetNonAnnoymousEvent(abiInstatnce abi.ABI) (map[string]EventInfo, error)

func InitRetracer

func InitRetracer(config RetraceConf) *retracer

func PackMethodAndArgs

func PackMethodAndArgs(abiPath string, method_name string, args ...interface{}) ([]byte, error)

Types

type EventInfo

type EventInfo struct {
	Name           string
	IndexedArgs    []string
	NonIndexedArgs []string
}

type RetraceConf

type RetraceConf struct {
	HttpClient      *rpc.Client
	ContractAddress common.Address
	SyncInterval    time.Duration
	RetraceInterval time.Duration
}

Jump to

Keyboard shortcuts

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