etherscan

package
v0.0.0-...-01e1646 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MPL-2.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 ContractCode

type ContractCode struct {
	SourceCode           string
	ContractName         string
	Runs                 string
	CompilerVersion      string
	ConstructorArguments string
}

type Etherscan

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

Etherscan is a provider using the Etherscan api

func NewEtherscan

func NewEtherscan(url, apiKey string) *Etherscan

NewEtherscan creates a new Etherscan service from a url

func NewEtherscanFromNetwork

func NewEtherscanFromNetwork(n core.Network, apiKey string) (*Etherscan, error)

NewEtherscanFromNetwork creates a new client from the network id

func (*Etherscan) BlockNumber

func (e *Etherscan) BlockNumber() (uint64, error)

BlockNumber returns the number of most recent block.

func (*Etherscan) GasPrice

func (e *Etherscan) GasPrice() (uint64, error)

func (*Etherscan) GetBlockByNumber

func (e *Etherscan) GetBlockByNumber(i core.BlockNumber, full bool) (*core.Block, error)

GetBlockByNumber returns information about a block by block number.

func (*Etherscan) GetContractCode

func (e *Etherscan) GetContractCode(addr core.Address) (*ContractCode, error)

func (*Etherscan) GetLogs

func (e *Etherscan) GetLogs(filter *core.LogFilter) ([]*core.Log, error)

func (*Etherscan) Query

func (e *Etherscan) Query(module, action string, out interface{}, params map[string]string) error

Query sends a query to Etherscan

Jump to

Keyboard shortcuts

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