fetcher

package
v0.0.12-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher struct {
	BlockChain core.BlockChain // Underlying Blockchain
}

Fetcher struct

func (Fetcher) FetchAddress

func (f Fetcher) FetchAddress(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (common.Address, error)

FetchAddress is the method used to fetch address value from contract

func (Fetcher) FetchBigInt

func (f Fetcher) FetchBigInt(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (big.Int, error)

FetchBigInt is the method used to fetch big.Int value from contract

func (Fetcher) FetchBool

func (f Fetcher) FetchBool(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (bool, error)

FetchBool is the method used to fetch bool value from contract

func (Fetcher) FetchHash

func (f Fetcher) FetchHash(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (common.Hash, error)

FetchHash is the method used to fetch hash value from contract

func (Fetcher) FetchString

func (f Fetcher) FetchString(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (string, error)

FetchString is the method used to fetch string value from contract

type FetcherInterface

type FetcherInterface interface {
	FetchBigInt(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (big.Int, error)
	FetchBool(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (bool, error)
	FetchAddress(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (common.Address, error)
	FetchString(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (string, error)
	FetchHash(method, contractAbi, contractAddress string, blockNumber int64, methodArgs []interface{}) (common.Hash, error)
}

FetcherInterface is the interface definition for a fetcher

type LogFetcher

type LogFetcher interface {
	FetchLogs(contractAddresses []string, topics []common.Hash, missingHeader core.Header) ([]types.Log, error)
}

Fetcher is the fetching interface

func NewFetcher

func NewFetcher(blockchain core.BlockChain) LogFetcher

NewFetcher returns a new Fetcher

Jump to

Keyboard shortcuts

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