-
Notifications
You must be signed in to change notification settings - Fork 39
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
Retrieve ABI from sourcify / metadata #9
Comments
@chriseth thanks! This is a huge help. I'll make sure to prioritize this issue. |
We were thinking about implementing this as an npm package ethereum/sourcify#538 This is also what you will need right? We might want to sync on this so we won't do the same thing separately. The main goal was to return the decoded the parameters either using the ABI or the userdoc if available but an additional method that will return the ABI should be useful. |
@kuzdogan yes definately! NPM package woudl be great. It's not top prority for us now but will gonna do it in a month or so. If you want some feedback from us, we can hop on a call or meet somewhere in Lisbon. Your call. |
I'm not in Lisbon but @chriseth is there so you might bump into each other. I think it's more or less clear and seems to be quite parallel with what we want to build. I will be letting you know about the progress, thanks! |
@krzkaczor we have an initial working package and would love to have some feedback if you'd have time and to better understand what you'd need 🙂 How should I contact you? |
@kuzdogan Perfect! I am |
Thanks, these are valuable feedback. I agree that they should both be available. We'll look into it. Let me know if you have any other remarks, both on the package or Sourcify in general. @hasparus @krzkaczor |
Basic support for sourcify got released in: https://github.com/dethcrypto/eth-sdk/releases/tag/%40dethcrypto%2Feth-sdk%400.2.2 Currently, it uses sourcify API (backend), we could migrate to IPFS once npm package is done and exposes a simple interface for us to use. |
Since you, @krzkaczor , mentioned that you would like to retrieve the ABI directly from the metadata as well instead of from etherscan, I just want to quickly explain the steps. We are working on an npm package to maybe do part of this, but it's really not complicated (pseudocode):
This is the recommended decentralized way to do it. You can either use ipfs "directly" or through an http gateway. My experience with http gateways (at least the cloudfront one) is that they will also pin data that is retrieved through them, which is nice.
The access via ipfs only works if contracts are fully verified on sourcify (including the correct metadata hash). This guarantees that neither the source nor the ABI have been modified after deployment.
There is a centralized http interface to sourcify that also allows you to access partially verified contract's abis: https://github.com/ethereum/sourcify/blob/master/docs/api/server/getByChainAndAddress.md
If you have further questions, you can also come to our gitter / matrix channel: https://gitter.im/ethereum/source-verify
The text was updated successfully, but these errors were encountered: