Skip to content
Markdown documentation generator for Solidity
Branch: develop
Clone or download
dpilch Feature/npm audit (#35)
* update packages

* add coverage
Latest commit 7331638 May 11, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test increase coverage Apr 6, 2018
.babelrc Feature/npm audit (#35) May 11, 2018
.eslintrc
.gitignore
.npmignore add lib to tracking Aug 20, 2017
.travis.yml
LICENSE
README.md Revert "Feature/coverage" Apr 6, 2018
_config.yml clean up branches (#14) Apr 6, 2018
package-lock.json
package.json Feature/npm audit (#35) May 11, 2018

README.md

solmd

Generate lightweight markdown documentation for Solidity contracts.

Build 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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.