Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ZeframLou/foundry-docgen
https://github.com/ZeframLou/foundry-docgen
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ZeframLou/foundry-docgen
- Owner: ZeframLou
- License: mit
- Created: 2022-06-12T06:02:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T09:19:41.000Z (over 2 years ago)
- Last Synced: 2024-07-13T12:00:11.692Z (4 months ago)
- Language: JavaScript
- Size: 71.3 KB
- Stars: 50
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-foundry - Foundry Docgen - A basic tool for generating markdown docs for a Foundry project using existing NatSpec comments in the contracts. (Tools)
README
# foundry-docgen
**Note:** Work in progress, very buggy, barely works
A basic tool for generating markdown docs for a [Foundry](https://github.com/foundry-rs/foundry) project using existing NatSpec comments in the contracts. Uses [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen) under the hood.
## Usage
In the root directory of your Foundry project, run
```bash
npx foundry-docgen
```This will generate docs for all contracts under `./docgen`. Alternatively, specify a list of contracts you want to generate docs for, e.g.
```bash
npx foundry-docgen Greeter MyNFT
```You can also specify the input and output paths. For instance,
```bash
npx foundry-docgen --in ~/Documents/foundry-project/out --out ./documentations
```Use `npx foundry-docgen help` to see all options.
## Known issues
- Running `npx foundry-docgen` for complex projects can trigger the error `Error: Circular dependency detected: aliased imports not supported`.
- Running `npx foundry-docgen SomeContract` may trigger errors like `Error: No node with id 2944 of type SourceUnit` due to `SomeContract`'s Solidity AST referencing other contracts as dependencies.