From 9d6fe2246eb27a50896d0d2cf6ff10f44e8875b9 Mon Sep 17 00:00:00 2001 From: Jonathan Humphreys Date: Mon, 29 Apr 2024 14:30:50 +0200 Subject: [PATCH 1/4] Update mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5837de6..9d7d1ef 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/nanmu42/etherscan-api +module github.com/jonpaulh/etherscan-api go 1.13 From 11b3c91bb57f3370467ec9e313945feb7a2c8187 Mon Sep 17 00:00:00 2001 From: Jonathan Humphreys Date: Mon, 29 Apr 2024 14:42:27 +0200 Subject: [PATCH 2/4] replace mod --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index 9d7d1ef..ea38f6a 100644 --- a/go.mod +++ b/go.mod @@ -3,3 +3,5 @@ module github.com/jonpaulh/etherscan-api go 1.13 require github.com/google/go-cmp v0.5.7 + +replace github.com/nanmu42/etherscan-api => github.com/jonpaulh/etherscan-api v0.0.0-20240312004502-0d2eec180b28 From 5020ecc8e010dab31e2a9b97b4c7a00fb2001481 Mon Sep 17 00:00:00 2001 From: Jonathan Humphreys Date: Mon, 29 Apr 2024 14:49:02 +0200 Subject: [PATCH 3/4] rewrite --- README.md | 14 +++++++------- README_ZH.md | 14 +++++++------- account.go | 2 +- doc.go | 2 +- go.mod | 2 -- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 56acd1f..78b9851 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ -**English** | [中文](https://github.com/nanmu42/etherscan-api/blob/master/README_ZH.md) +**English** | [中文](https://github.com/jonpaulh/etherscan-api/blob/master/README_ZH.md) # etherscan-api -[![GoDoc](https://godoc.org/github.com/nanmu42/etherscan-api?status.svg)](https://godoc.org/github.com/nanmu42/etherscan-api) -[![CI status](https://github.com/nanmu42/etherscan-api/actions/workflows/ci.yaml/badge.svg)](https://github.com/nanmu42/etherscan-api/actions) +[![GoDoc](https://godoc.org/github.com/jonpaulh/etherscan-api?status.svg)](https://godoc.org/github.com/jonpaulh/etherscan-api) +[![CI status](https://github.com/jonpaulh/etherscan-api/actions/workflows/ci.yaml/badge.svg)](https://github.com/jonpaulh/etherscan-api/actions) [![codecov](https://codecov.io/gh/nanmu42/etherscan-api/branch/master/graph/badge.svg)](https://codecov.io/gh/nanmu42/etherscan-api) -[![Go Report Card](https://goreportcard.com/badge/github.com/nanmu42/etherscan-api)](https://goreportcard.com/report/github.com/nanmu42/etherscan-api) +[![Go Report Card](https://goreportcard.com/badge/github.com/jonpaulh/etherscan-api)](https://goreportcard.com/report/github.com/jonpaulh/etherscan-api) 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: # Usage ```bash -go get github.com/nanmu42/etherscan-api +go get github.com/jonpaulh/etherscan-api ``` Create an API instance and off you go. :rocket: ```go import ( - "github.com/nanmu42/etherscan-api" + "github.com/jonpaulh/etherscan-api" "fmt" ) @@ -61,7 +61,7 @@ func main() { } ``` -You may find full method list at [GoDoc](https://godoc.org/github.com/nanmu42/etherscan-api). +You may find full method list at [GoDoc](https://godoc.org/github.com/jonpaulh/etherscan-api). # Etherscan API Key diff --git a/README_ZH.md b/README_ZH.md index 905a770..5488db6 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -1,11 +1,11 @@ -[English](https://github.com/nanmu42/etherscan-api/blob/master/README.md) | **中文** +[English](https://github.com/jonpaulh/etherscan-api/blob/master/README.md) | **中文** # etherscan-api -[![GoDoc](https://godoc.org/github.com/nanmu42/etherscan-api?status.svg)](https://godoc.org/github.com/nanmu42/etherscan-api) -[![CI status](https://github.com/nanmu42/etherscan-api/actions/workflows/ci.yaml/badge.svg)](https://github.com/nanmu42/etherscan-api/actions) +[![GoDoc](https://godoc.org/github.com/jonpaulh/etherscan-api?status.svg)](https://godoc.org/github.com/jonpaulh/etherscan-api) +[![CI status](https://github.com/jonpaulh/etherscan-api/actions/workflows/ci.yaml/badge.svg)](https://github.com/jonpaulh/etherscan-api/actions) [![codecov](https://codecov.io/gh/nanmu42/etherscan-api/branch/master/graph/badge.svg)](https://codecov.io/gh/nanmu42/etherscan-api) -[![Go Report Card](https://goreportcard.com/badge/github.com/nanmu42/etherscan-api)](https://goreportcard.com/report/github.com/nanmu42/etherscan-api) +[![Go Report Card](https://goreportcard.com/badge/github.com/jonpaulh/etherscan-api)](https://goreportcard.com/report/github.com/jonpaulh/etherscan-api) Etherscan API的Golang客户端, 支持几乎所有功能(accounts, transactions, tokens, contracts, blocks, stats), @@ -15,14 +15,14 @@ Etherscan API的Golang客户端, # 使用方法 ```bash -go get github.com/nanmu42/etherscan-api +go get github.com/jonpaulh/etherscan-api ``` 填入网络选项和API Key即可开始使用。 :rocket: ```go import ( - "github.com/nanmu42/etherscan-api" + "github.com/jonpaulh/etherscan-api" "fmt" ) @@ -63,7 +63,7 @@ func main() { } ``` -客户端方法列表可在[GoDoc](https://godoc.org/github.com/nanmu42/etherscan-api)查询。 +客户端方法列表可在[GoDoc](https://godoc.org/github.com/jonpaulh/etherscan-api)查询。 # Etherscan API Key diff --git a/account.go b/account.go index e6a9ac1..95d6072 100644 --- a/account.go +++ b/account.go @@ -86,7 +86,7 @@ func (c *Client) InternalTxByAddress(address string, startBlock *int, endBlock * // and TokenDecimal is 0. // // More information can be found at: -// https://github.com/nanmu42/etherscan-api/issues/8 +// https://github.com/jonpaulh/etherscan-api/issues/8 func (c *Client) ERC20Transfers(contractAddress, address *string, startBlock *int, endBlock *int, page int, offset int, desc bool) (txs []ERC20Transfer, err error) { param := M{ "page": page, diff --git a/doc.go b/doc.go index d345cab..0561e32 100644 --- a/doc.go +++ b/doc.go @@ -5,5 +5,5 @@ // with full network support(Mainnet, Ropsten, Kovan, Rinkby, Tobalaba), // and only depending on standard library. // -// Example can be found at https://github.com/nanmu42/etherscan-api +// Example can be found at https://github.com/jonpaulh/etherscan-api package etherscan diff --git a/go.mod b/go.mod index ea38f6a..9d7d1ef 100644 --- a/go.mod +++ b/go.mod @@ -3,5 +3,3 @@ module github.com/jonpaulh/etherscan-api go 1.13 require github.com/google/go-cmp v0.5.7 - -replace github.com/nanmu42/etherscan-api => github.com/jonpaulh/etherscan-api v0.0.0-20240312004502-0d2eec180b28 From b559ff140f6e7e5d241e46726ecfc2584182b686 Mon Sep 17 00:00:00 2001 From: Jonathan Humphreys Date: Mon, 29 Apr 2024 14:51:22 +0200 Subject: [PATCH 4/4] Reinit go mod --- go.mod | 4 ++-- go.sum | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9d7d1ef..6aa8135 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/jonpaulh/etherscan-api -go 1.13 +go 1.21.3 -require github.com/google/go-cmp v0.5.7 +require github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index a6ca3a4..5a8d551 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,2 @@ -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=