diff --git a/client.go b/client.go index e69679a..b1a7b08 100644 --- a/client.go +++ b/client.go @@ -172,6 +172,9 @@ func (c *Client) call(module, action string, param map[string]interface{}, outco err = wrapErr(err, "json unmarshal envelope") return } + if envelope.Status == 0 && envelope.Message == "No records found" { + return + } if envelope.Status != 1 { err = fmt.Errorf("etherscan server: %s", envelope.Message) return diff --git a/logs.go b/logs.go index b674041..e9293fe 100644 --- a/logs.go +++ b/logs.go @@ -2,7 +2,7 @@ package etherscan // GetLogs gets a list of log for a single address // startBlock and endBlock cann`t be nil -func (c *Client) GetLogs(address string, fromBlock string, toBlock string, topic0 string) (logs []Log, err error) { +func (c *Client) GetLogs(address *string, fromBlock string, toBlock string, topic0 string) (logs []Log, err error) { param := M{ "fromBlock": fromBlock, "toBlock": toBlock,