etherscan

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 10 Imported by: 0

README

Etherscan API Client Library - Go

Client library for the Etherscan library, written in Go. Provides methods corresponding to each of the Etherscan API endpoints.

Features

  • Namespaced by API module
  • Full context support for cancellation/deadline control
  • Allows full configuration of http client object
  • Uses standard library and go-ethereum types.

Install

$ go get github.com/ryanc414/etherscan-api-go

Basic Usage

	client := etherscan.New(&etherscan.Params{
		APIKey: os.Getenv("ETHERSCAN_API_KEY"),
	})

	gas, err := client.Gas.GetGasOracle(ctx)
	if err != nil {
		return errors.Wrap(err, "GetGasOracle")
	}

	log.Print("fast gas price: ", gas.FastGasPrice)

See https://pkg.go.dev/github.com/ryanc414/etherscan-api-go for full API documentation!

Documentation

Overview

etherscan is a client library for the etherscan.io API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

Client is the main etherscan client.

func New

func New(params *Params) *Client

New constructs a new etherscan Client.

type Params

type Params = httpapi.Params

Params are construction parameters for the etherscan Client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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