Skip to content

gravityblast/etherscan-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etherscan-go

etherscan.io API client in Go

// main.go

package main

import (
	"fmt"
	"log"

	"github.com/gravityblast/etherscan"
)

func checkErr(err error) {
	if err != nil {
		log.Fatal(err)
	}
}

func main() {
	c, err := etherscan.NewClient(etherscan.Mainnet, "YOUR_API_KEY")
	checkErr(err)

	resp, err := c.Account("0x0000000000000000000000000000000000000000")
	checkErr(err)

	fmt.Printf("%+v\n", resp)
}
go run main.go
&{Status:1 Message:OK Result:+7641879211751631214533}

Releases

No releases published

Packages

No packages published

Languages