Bas_Ethereum

package
v0.0.0-...-556a089 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessPoints = []string{
	"wss://ropsten.infura.io/ws/v3/831ab04fa4964991b5fba5c52106d7b0",
	"wss://ropsten.infura.io/ws/v3/8b8db3cca50a4fcf97173b7619b1c4c3",
	"ws://75.135.96.248:3334",
}
View Source
var RetryRule = map[int]int{
	1: 5,
	2: 10,
	3: 15,
}

Functions

func GetLoopOpts

func GetLoopOpts(s uint64, e *uint64) *bind.FilterOpts

func GetOpts

func GetOpts(blockNumber uint64) *bind.CallOpts

func GetWatchOpts

func GetWatchOpts(s uint64) *bind.WatchOpts

Types

type Conn

type Conn struct {
	Client *ethclient.Client
	// contains filtered or unexported fields
}

func NewConn

func NewConn() *Conn

func (*Conn) GetClient

func (conn *Conn) GetClient() *ethclient.Client

func (*Conn) GetLastBlockNumber

func (conn *Conn) GetLastBlockNumber() uint64

func (*Conn) GetTimestamp

func (conn *Conn) GetTimestamp(blockNumber uint64) (uint64, error)

func (*Conn) IsGetTimeStamp

func (conn *Conn) IsGetTimeStamp(blockNumber uint64) bool

func (*Conn) Reset

func (conn *Conn) Reset()

type EventQueue

type EventQueue []EventWrapper

func (*EventQueue) Insert

func (q *EventQueue) Insert(blockNumber uint64, txIndex uint, name string, data interface{})

func (EventQueue) Len

func (q EventQueue) Len() int

func (EventQueue) Less

func (q EventQueue) Less(i, j int) bool

func (EventQueue) Swap

func (q EventQueue) Swap(i, j int)

type EventWrapper

type EventWrapper struct {
	BlockNumber uint64
	TxIndex     uint
	EventName   string
	EventData   interface{}
}
type Gallery []Snapshot

func (*Gallery) GetClosest

func (g *Gallery) GetClosest(blockNumber uint64, index uint) (error, interface{})

func (*Gallery) Insert

func (g *Gallery) Insert(blockNumber uint64, index uint, Data interface{})

type Hash

type Hash [32]byte

func GetHash

func GetHash(key string) Hash

func (Hash) String

func (hash Hash) String() string

type Snapshot

type Snapshot struct {
	BlockNumber uint64
	TxIndex     uint
	Data        interface{}
}

Jump to

Keyboard shortcuts

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