etherscan

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Http http.Client
	// contains filtered or unexported fields
}

Client for etherscan

func NewEtherscanService

func NewEtherscanService(apikey string) *Client

NewEtherscanService is the constructor that creates an etherscanService

func (*Client) SuggestGasPrice

func (e *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error)

SuggestGasPrice retrieves the gas price estimation from etherscan

type Config

type Config struct {
	// Need API key to use etherscan, if it's empty etherscan is not used
	ApiKey string `mapstructure:"ApiKey"`
	// URL of the etherscan API. Overwritten with a hardcoded URL:
	// "https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey="
	Url string
}

Config structure

Jump to

Keyboard shortcuts

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