nanmu42 / etherscan-api

:guitar: Golang client for Ethereum Etherscan API (and its families like BscScan) / Golang 以太坊 Etherscan API库(也支持同一家族的BscScan)
MIT License
240 stars 107 forks source link

Improve GetLogs function #83

Open FournyP opened 1 year ago

FournyP commented 1 year ago

Hi,

I've improved the GetLogs function because some of mandatory parameters are not mandatory for the etherscan API (e.g: toBlock, fromBlock and topic).

I've also add missing parameter page and offset.

Tests execution:

image

Feel free to ask me any change in my codebase

Have a good day ;)

nanmu42 commented 1 year ago

Hi, @FournyP , thanks for your contribution!

I would love to see it merged but we cannot alter an existed API. I recommend to implement it as a new method GetLogsByAddr(or choose a name in your flavor).

Cheers.