Skip to content
Markdown documentation generator for Solidity
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src increase coverage Apr 6, 2018
test
.babelrc
.commitlintrc
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md docs(readme): add coveralls badge Mar 24, 2019
_config.yml clean up branches (#14) Apr 6, 2018
package-lock.json
package.json ci: add semantic release Mar 24, 2019

README.md

solmd

Generate lightweight markdown documentation for Solidity contracts.

Build Status Coverage Status

Installation

npm install -g solmd
solmd <src> [--dest <target>]

Output will default to sol.md;

Uses Ethereum Natural Specification Format to generate method details.

// natspec example
/**
@title GavCoin
@author Gavin Wood
*/
contract GavCoin {
    /**
    @notice Send `(valueInmGAV / 1000).fixed(0,3)` GAV from the account of
    `message.caller.address()`, to an account accessible only by `to.address()
    @dev This should be the documentation of the function for the developer docs
    @param to The address of the recipient of the GavCoin
    @param valueInmGAV The GavCoin value to send
    @return {
        "done": "if done"
    }
    */
    function send(address to, uint256 valueInmGAV) returns (bool done) {
        if (balances[msg.sender] >= valueInmGAV) {
            balances[to] += valueInmGAV;
            balances[msg.sender] -= valueInmGAV;
            done = true;
        }
    }
}

Return params must be a single @param formatted as an object as shown above.

The above example will produce the following result as raw markdown.

* [GavCoin](#gavcoin)
  * [send](#function-send)

# GavCoin

Gavin Wood

## *function* send

GavCoin.Send(to, valueInmGAV) `d0679d34`

**Send `(valueInmGAV / 1000).fixed(0,3)` GAV from the account of `message.caller.address()`, to an account accessible only by `to.address()**

> This should be the documentation of the function for the developer docs

Inputs

| | | |
|-|-|-|
| *address* | to | The address of the recipient of the GavCoin |
| *uint256* | valueInmGAV | The GavCoin value to send |

Outputs

| | | |
|-|-|-|
| *bool* | done | if done |

---

The same output now parsed:

GavCoin

Gavin Wood

function send

d0679d34

Send (valueInmGAV / 1000).fixed(0,3) GAV from the account of message.caller.address(), to an account accessible only by `to.address()

This should be the documentation of the function for the developer docs

Inputs

address to The address of the recipient of the GavCoin
uint256 valueInmGAV The GavCoin value to send

License

MIT

You can’t perform that action at this time.