MCPcopy Index your code
hub / github.com/OpenZeppelin/solidity-docgen

github.com/OpenZeppelin/solidity-docgen @v0.5.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.17 ↗ · + Follow
232 symbols 351 edges 21 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

solidity-docgen

Documentation generator for smart contract libraries. Use the inline documentation in your Solidity code for generating websites or any sort of document.

The output is completely customizable through Handlebars templates that provide easy access to all the metadata of your smart contract.

Usage

Note: Detailed usage information is not available yet. Please be patient!

npm install solidity-docgen

solidity-docgen takes as input a directory of contracts and README documents. This directory is specified using the --input/-i flag, defaulting to ./contracts. It produces a set of files that it will place in the output directory specified by --output/-o, defaulting to ./docs.

solidity-docgen [ -i <input-dir> ] [ -o <output-dir> ] [ -t <templates-dir> ]

Solidity 0.7

The built in compiler remains solc 0.6, but users who want to use the newer compiler version can do so by installing the desired solc version and using the flag --solc-module. Here's an example using npm aliases:

npm install -D solc-0.7@npm:solc@^0.7.0
npx solidity-docgen --solc-module solc-0.7

Extension points exported contracts — how you extend this code

ToString (Interface)
(no doc) [3 implementers]
src/source.ts
SolcOutput (Interface)
(no doc) [1 implementers]
src/solc.ts
Link (Interface)
(no doc)
src/sitemap.ts
VFile (Interface)
(no doc)
src/vfile.ts
Options (Interface)
(no doc)
src/docgen.ts
Linkable (Interface)
(no doc) [2 implementers]
src/source.ts
SourceUnit (Interface)
(no doc)
src/solc.ts
Templates (Interface)
(no doc)
src/docgen.ts

Core symbols most depended-on inside this repo

contract
called by 34
src/solc-output-builder.ts
file
called by 30
src/source.ts
function
called by 10
src/solc-output-builder.ts
toString
called by 7
src/source.ts
groupBy
called by 7
src/sitemap.ts
memoized
called by 6
src/memoize.ts
compile
called by 5
src/solc.ts
import
called by 4
src/solc-output-builder.ts

Shape

Method 106
Class 53
Function 52
Interface 21

Languages

TypeScript100%

Modules by API surface

src/source.ts115 symbols
src/solc.ts28 symbols
src/sitemap.ts22 symbols
src/page.ts22 symbols
src/solc-output-builder.ts10 symbols
src/filter.ts6 symbols
src/docgen.ts6 symbols
src/memoize.ts4 symbols
src/memoize.test.ts4 symbols
src/handlebars.ts3 symbols
src/cli.ts3 symbols
src/source.test.ts2 symbols

For agents

$ claude mcp add solidity-docgen \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact