Skip to content

documenting Struct/ Enum/ Constant outside of contract #333

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

Closed
ghost opened this issue Nov 2, 2021 · 7 comments
Closed

documenting Struct/ Enum/ Constant outside of contract #333

ghost opened this issue Nov 2, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 2, 2021

Hi, I'm attempting to document an EIP-2535 Diamond contract that utilizies an 'AppStorage' pattern such as in AAVEGotchi Thing is this pattern makes extensive use of structs outside of contracts. To which I cant seem to docgen to register it.

Is documenting structs outside of contracts possible, or if not, planned to be implemented?

Thanks!

@ghost ghost changed the title documenting Struct/ Enum/ Variable outside of contract documenting Struct/ Enum/ Constant outside of contract Nov 2, 2021
@ghost
Copy link
Author

ghost commented Nov 2, 2021

specifically speaking

pragma solidity 0.8.9;
/**
* Some documentation about A
* @param b some documentation about
*/
struct A {
uint256 b;
}

contract FooBar {
...
}

@frangio
Copy link
Contributor

frangio commented Nov 14, 2021

Thanks for reaching out @Joe-mcgee. This is not currently supported. I'm interested in it but the code is structured around documenting contracts, and I haven't figure out how to implement it.

@ghost
Copy link
Author

ghost commented Nov 14, 2021

Thanks for looking into it and letting me know @frangio :)

@miltonjonat
Copy link

Hello there @frangio. I am also very interested in documenting structs outside of contracts. Are there any plans on that front nowadays? I am also unsure whether this depends on ethereum/solidity#12295 to be done first.

Cheers, and thanks for this great tool!

@frangio
Copy link
Contributor

frangio commented Nov 24, 2022

@miltonjonat This is technically supported in the 0.6 release.

Unfortunately as you point out the actual contents of the NatSpec will not show up, but the struct and enum data type definitely will show up in the produced docs.

@frangio frangio closed this as completed Nov 24, 2022
@miltonjonat
Copy link

Ok @frangio thanks! Is there any open issue covering having NatSpec comments showing up in structs?

@frangio
Copy link
Contributor

frangio commented Nov 25, 2022

The issue is on the Solidity side. ethereum/solidity#12295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants