geth

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_BATCH_SIZE = 100

Variables

View Source
var (
	ErrInvalidAbiFile   = errors.New("invalid abi")
	ErrMissingAbiFile   = errors.New("missing abi")
	ErrApiRequestFailed = errors.New("etherscan api request failed")
)
View Source
var ErrEmptyHeader = errors.New("empty header returned over RPC")
View Source
var (
	ErrInvalidStateAttribute = errors.New("invalid state attribute")
)

Functions

func GenURL

func GenURL(network string) string

func ParseAbi

func ParseAbi(abiString string) (abi.ABI, error)

func ParseAbiFile

func ParseAbiFile(abiFilePath string) (abi.ABI, error)

func ReadAbiFile

func ReadAbiFile(abiFilePath string) (string, error)

Types

type BlockChain

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

func NewBlockChain

func NewBlockChain(ethClient core.EthClient, rpcClient core.RpcClient, node core.Node, converter vulcCommon.TransactionConverter) *BlockChain

func (*BlockChain) FetchContractData

func (blockChain *BlockChain) FetchContractData(abiJSON string, address string, method string, methodArgs []interface{}, result interface{}, blockNumber int64) error

func (*BlockChain) GetAccountBalance

func (blockChain *BlockChain) GetAccountBalance(address common.Address, blockNumber *big.Int) (*big.Int, error)

func (*BlockChain) GetBlockByNumber

func (blockChain *BlockChain) GetBlockByNumber(blockNumber int64) (block core.Block, err error)

func (*BlockChain) GetEthLogsWithCustomQuery

func (blockChain *BlockChain) GetEthLogsWithCustomQuery(query ethereum.FilterQuery) ([]types.Log, error)

func (*BlockChain) GetFullSyncLogs added in v0.0.7

func (blockChain *BlockChain) GetFullSyncLogs(contract core.Contract, startingBlockNumber, endingBlockNumber *big.Int) ([]core.FullSyncLog, error)

func (*BlockChain) GetHeaderByNumber

func (blockChain *BlockChain) GetHeaderByNumber(blockNumber int64) (header core.Header, err error)

func (*BlockChain) GetHeadersByNumbers added in v0.0.3

func (blockChain *BlockChain) GetHeadersByNumbers(blockNumbers []int64) (header []core.Header, err error)

func (*BlockChain) GetTransactions

func (blockChain *BlockChain) GetTransactions(transactionHashes []common.Hash) ([]core.TransactionModel, error)

func (*BlockChain) LastBlock

func (blockChain *BlockChain) LastBlock() (*big.Int, error)

func (*BlockChain) Node

func (blockChain *BlockChain) Node() core.Node

type EtherScanAPI

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

func NewEtherScanClient

func NewEtherScanClient(url string) *EtherScanAPI

type Response

type Response struct {
	Status  string
	Message string
	Result  string
}

Directories

Path Synopsis
converters
rpc

Jump to

Keyboard shortcuts

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