-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add support for natspec #2501
Comments
+1 |
This would be really cool, but the docs are awful. It's unclear how to parse these natspec comments, and it's unclear if these comments are even published with the bytecode with Solidity. I'm actually pretty sure these are not published by the bytecode, they seem to only be output as a metadata file: I would love for NatSpec definitions to be published with smart contracts, but if they aren't, there's an open question for how we can trust any documents associated with a smart contract. Closing until a solution is available for securely retrieving natspec documents from a published bytecode. |
@danfinlay the natspec is inside a metadata file which can be published to swarm and it IS always embedded in the contract bytecode, see: |
@danfinlay I think this is the solution to the problem: https://sourcify.dev/ MM could check whether they find a verified contract there, and if so, use the NatSpec comments. |
Solidity allows using natspec comments to provide a confirmation text to a user when they attempt to call a function of a contract. Right now, it seems like MetaMask doesn't support this. It would be nice to have it added.
See:
The text was updated successfully, but these errors were encountered: