Conversation
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
|
Semgrep found 1
When working with web applications that involve rendering user-generated content, it's important to properly escape any HTML content to prevent Cross-Site Scripting (XSS) attacks. In Go, the |
f183f17 to
0e04b92
Compare
5a1e484 to
9f68969
Compare
0e04b92 to
9c7ad44
Compare
9c7ad44 to
e858407
Compare
b9aed79 to
a36df5d
Compare
e858407 to
e30e909
Compare
WalkthroughWalkthroughThe update to the Etherscan client in Go introduces enhanced functionality and error handling. It incorporates a retry mechanism for API calls, extends the client with new types and functions for fetching ABI, bytecode, and transaction information, and adjusts its initialization to require an API key. The changes aim to improve the robustness of interactions with Etherscan's API and RPC endpoints by handling rate limits and retries. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
e30e909 to
7dbf9c5
Compare
hamdiallam
left a comment
There was a problem hiding this comment.
Looks good! Any unit tests you can add? Can hardcode some sample responses in the unit tests themselves to mock out the actual rpc call
nw if you'd just want to leverage manual tests
a36df5d to
c35ad82
Compare
7dbf9c5 to
42d11e0
Compare
c35ad82 to
d380971
Compare
42d11e0 to
a9c7e2a
Compare
d380971 to
4c3a3a8
Compare
a9c7e2a to
820e623
Compare
08e676f to
e4536f9
Compare
f33e298 to
276121d
Compare
mslipper
left a comment
There was a problem hiding this comment.
A couple of things I suggest fixing here before merge. In addition - have you looked at https://github.com/nanmu42/etherscan-api? Could be useful to pull that in as a dep and not have to maintain this at all.
@mslipper I hadn't considered using a third-party package. I think the wrapper this PR introduces is pretty minimal, providing just what we need and should be low effort to maintain if Etherscan makes an API change (most likely just requiring a route change). The package you linked had it's last code update a year ago (with most of the code not being touched in 2 - 5 years, and the author doesn't seem very active on Github), and I'm concerned with introducing a dependency that isn't actively being developed and appears to have low usage. I also looked for alternative packages, but didn't find anything better Unless you feel strongly about replacing this PR with the linked package, I prefer we keep the API wrapper as is, and reconsider replacing it with the linked package if a future situation calls for it |
|
Ok let's keep the API wrapper as-is. |
276121d to
a102c19
Compare
a102c19 to
d19211d
Compare
cce302e to
f203a03
Compare
f203a03 to
b4629be
Compare

This PR introduces an Etherscan API wrapper to be used by #8281 to sourced information about contracts to create Go bindings