Skip to content

Commit 794ef38

Browse files
committed
add example
1 parent 881be9b commit 794ef38

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

example/main.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"log"
6+
7+
"github.com/gravityblast/etherscan"
8+
)
9+
10+
func checkErr(err error) {
11+
if err != nil {
12+
log.Fatal(err)
13+
}
14+
}
15+
16+
func main() {
17+
c, err := etherscan.NewClient(etherscan.Mainnet, "")
18+
checkErr(err)
19+
20+
resp, err := c.Account("0x0000000000000000000000000000000000000000")
21+
checkErr(err)
22+
23+
fmt.Printf("%+v\n", resp)
24+
}

0 commit comments

Comments
 (0)