dethcrypto/eth-sdk

Feature Request: Embed Solidity Comments/Documentation with Typescript Types

wottpal opened this issue · 4 comments

Disclaimer: I'm very new in this field of development. Sorry, if I have taken something completely wrong in advance :D

Wouldn't it be nice if the types generated by typechain/eth-sdk would also include the comments/documentation provided within the solidity contract files? So that if I hover over a function in VSCode the documentation pops up? I guess that task is not so easy as the comments are not included within the ABIs downloaded from etherscan, right?

Hey @wottpal,

this is a great question actually and having this feature would have a perfect sense!

These kinds of comments are called natspect and TypeChain (which we use under the hood) has already limited support for them. The problem is that natspec is stripped out by etherscan so we don't have a good source for abi with natspec.

I think that Sourcify provides them but the amount of verified contracts there is limited for now.

Hey, thanks for your reply. So to conclude, it would be helpful if the etherscan APIs would also provide natspect side-by-side with the ABIs, right? Should we ask in their Reddit for it? (I just noticed their project isn't OS which feels a little bit odd as they are such an integral part of web3-tooling).

@wottpal yeah, sounds good. You should ask them about it.