etherscan

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 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 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 web3.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) GetBlockByNumber

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

GetBlockByNumber returns information about a block by block number.

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