You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Golang client for the Etherscan.io API(and its families like BscScan), with nearly full implementation(accounts, transactions, tokens, contracts, blocks, stats), full network support(Mainnet, Ropsten, Kovan, Rinkby, Goerli, Tobalaba), and only depending on standard library. :wink:
5
+
Golang client for the Etherscan.io v2 APIwith nearly full implementation(accounts, transactions, tokens, contracts, blocks, stats)and minimal dependencies.
11
6
12
7
# Usage
13
8
14
9
```bash
15
-
go get github.com/nanmu42/etherscan-api
10
+
go get github.com/timcki/etherscan-api/v2
16
11
```
17
12
18
13
Create an API instance and off you go. :rocket:
19
14
20
15
```go
21
16
import (
22
-
"github.com/nanmu42/etherscan-api"
17
+
"github.com/nanmu42/etherscan-api/v2/pkg/client"
18
+
"github.com/nanmu42/etherscan-api/v2/pkg/chain"
23
19
"fmt"
24
20
)
25
21
26
22
funcmain() {
27
23
// create a API client for specified ethereum net
28
24
// there are many pre-defined network in package
29
-
client:= etherscan.New(etherscan.Mainnet, "[your API key]")
30
-
31
-
// or, if you are working with etherscan-family API like BscScan
25
+
client:= client.NewClient(chain.EthereumMainnet, "[your API key]")
26
+
27
+
// or, if you are working with antoher chain
28
+
// client := client.NewClient(chain.OpMainnet, "[your API key]")
You may find full method list at [GoDoc](https://godoc.org/github.com/nanmu42/etherscan-api).
63
+
You may find full method list at [GoDoc](https://godoc.org/github.com/timcki/etherscan-api/v2).
65
64
66
65
# Etherscan API Key
67
66
68
67
You may apply for an API key on [etherscan](https://etherscan.io/apis).
69
68
70
-
> The Etherscan Ethereum Developer APIs are provided as a community service and without warranty, so please just use what you need and no more. They support both GET/POST requests and a rate limit of 5 requests/sec (exceed and you will be blocked).
69
+
> The Etherscan Ethereum Developer APIs are provided as a community service and without warranty, so please just use what you need and no more. They support both GET/POST requests and a rate limit of 5 requests/sec (exceed and you will be blocked).
71
70
72
71
# Paperwork Things
73
72
74
-
I am not from Etherscan and I just find their service really useful, so I implement this. :smile:
73
+
This library is not affiliated with Etherscan.io, it's developed for internal use in TokenTax.
0 commit comments