-
Notifications
You must be signed in to change notification settings - Fork 462
Add POST /v2/verify/etherscan/{chainId}/{address}
endpoint
#2090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ils/etherscan-utils.ts
Etherscan does not provide the contractPath of the target contract when fetching its source code. Before we were recompiling to get the contract path. This improves performance by making the compilation step obsolete.
Version 8 only works as esmodule but our server is not set up for that
I decided to move the processing step into the worker because parsing can be computationally expensive. Fetching from Etherscan can still be done easily inside the server main thread which provides better UX.
22e3c92
to
e6040b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The endpoint is not present in the Swagger page: http://localhost:5555/api-docs/#/
Good catch! Just updated the spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! I think we can update the etherscan instances tests to use the new /v2 apis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!! 🚀
Closes #1912
As per specification: https://sourcify.stoplight.io/docs/sourcify-apiv2/ago7z944i2qg8-import-from-etherscan
Notes:
etherscan.common.ts
logic from API v1 and refactored it. It's now calledetherscan-util.ts
.