-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Feature request: enable proxy contract detection via Etherscan API #125
Comments
HMM, I think this is a bug, we can fix it. Opened an issue here: #126
I support adding access to these, but I'm hesitant to add a bunch of fields that are specific to a single loader source (including userdoc, devdoc). I was hoping that So let's step back for a moment and consider some alternatives instead of inlining polymorphic attributes
I lean towards 3. This way things can start in What do you think? (Particularly keep in mind that we want to add more sources of verified contracts, like thirdweb with #98) |
@shazow Thank you for the thorough response! I understand the concern about maintaining a normalized structure for ContractResult. I agree that adding fields specific to a single source could complicate things. Your third suggestion, embedding the extra data in a dedicated field, seems like a good compromise. I’m happy to go with that approach. That said, having a Would you like us to move forward with a pull request based on this idea? |
@yohamta I can make that change. :) I'm happy to add Not a great reason, though. I'm hesitant to add both |
@shazow Thanks for your quick response! I understand your concern about getting feedback from consumers. That’s a valid point, but I still think that adding Since |
@yohamta Sounds like a plan. I'll do that and will ping you with a PR when it's ready. :) |
Opened PR here: #127 Also added a test which contains your example: whatsabi/src/__tests__/loaders.test.ts Lines 118 to 124 in d6b179d
|
The Etherscan getsource API includes a proxy flag and the address of the implementation in its response. By using this data, we can enhance the flexibility of proxy detection.
For instance, in the current release of Whatsabi, the implementation of the USDCv3 Token does not seem to be retrieved. However, the Etherscan API response flags it as a proxy and provides the address of the implementation. By adding the
isProxy
andimplementation
fields to theContractResult
structure, we can enhance proxy detection and retrieve the correct implementation addresses.Proposal:
Modify the ContractResult type to include
isProxy
andimplementation
fields. Additionally, update theEtherscanABILoader
to populate these fields from the Etherscan API response.We are willing to submit a pull request to implement this feature if that would be acceptable.
The text was updated successfully, but these errors were encountered: