types

package
v0.0.14-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Name      string
	Anonymous bool
	Fields    []Field
}

Event is our custom event type

func NewEvent

func NewEvent(e abi.Event) Event

NewEvent unpacks abi.Event into our custom Event struct

func (Event) Sig

func (e Event) Sig() common.Hash

Sig returns the hash signature for an event

type Field

type Field struct {
	abi.Argument        // Name, Type, Indexed
	PgType       string // Holds type used when committing data held in this field to postgres
}

Field is our custom event field type which associates a postgres type with the field

type Log

type Log struct {
	ID               int64             // header ID
	Values           map[string]string // Map of event input names to their values
	LogIndex         uint
	TransactionIndex uint
	Raw              []byte // json.Unmarshalled byte array of geth/core/types.Log{}
}

Log is used to hold instance of an event log data

type Method

type Method struct {
	Name   string
	Const  bool
	Args   []Field
	Return []Field
}

Method is our custom method struct

func NewMethod

func NewMethod(m abi.Method) Method

NewMethod unpacks abi.Method into our custom Method struct

func (Method) Sig

func (m Method) Sig() common.Hash

Sig returns the hash signature for the method

type Result

type Result struct {
	Method
	Inputs []interface{} // Will only use addresses
	Output interface{}
	PgType string // Holds output pg type
	Block  int64
}

Result is used to hold instance of result from method call with given inputs and block

Jump to

Keyboard shortcuts

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