Coder Social home page Coder Social logo

dpilch / solmd Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 15.0 340 KB

Markdown documentation generator for Solidity

Home Page: http://danepilcher.com/solmd

License: MIT License

JavaScript 77.49% Solidity 22.51%
documentation ethereum generator solidity

solmd's People

Contributors

dpilch avatar jirkachadima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

solmd's Issues

Unclear error "Failed to compile"

When using a contract inheriting the ERC20Basic abstract contract, I get the error that it fails to compile.
Compiling just the ERC20Basic contract works as intended. Any ideas?

Otherwise this tool is very useful mostly works great!

pragma solidity ^0.4.21;
/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

Even if empty, this contract fails to compile according to solmd:

pragma solidity ^0.4.23; 

import "./ERC20Basic.sol";

/**
 * @title ERC20Handler
 */
contract ERC20Handler is ERC20Basic{
 // 
}

Add title to table header seems doesn't work.

Update to solmd 1.6, but in generated document, there is still no title on table header.
I guess we need to update the lib/template.js as well?

I tried to update that one, but pre-commit hook blocks me.

Getting empty resultfile

Hi,

I am always getting an empty resultfile, even with the simplest contract:

/**
@title GavCoin
@author Gavin Wood
*/
contract GavCoin {
	
	/**
	@title Test
	@dev Testing
	@param nbr a number
	*/
	function test(uint nbr) {
		nbr++;
	}
}

I tried adding pragma solidity ^0.4.19; to the top of the contract, but made no difference.

Do you have any suggestions please?
I'm on node 9.0.0

Fails because of invalid asm.js

AppData\Roaming\npm\node_modules\solmd\node_modules\solc\soljson.js:3 Invalid asm.js: Invalid member of stdlib
solmd: Failed to compile contracts at .\TokenContract.sol

Support for ABIEncoderV2

ABIEncoderV2 allows structs to be passed as function params or return values. This is currently breaking solmd. For example, the follow contract fails to produce any markdown because the sig param in the validateSignature function is a struct.

pragma experimental ABIEncoderV2;
pragma solidity ^0.4.24;

contract Verifier
{
    // Represents the output of an ECDSA signature
    struct Signature {
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    /**
    @notice validates an address signed a message hash
    @param _addr public address of the private key that signed the message hash
    @param messageHash a keccak256 hash of the message being signed
    @param sig the signer's ECDSA signature of type Signature struct
    @return {
        "done": "true if the public address signed the message hash"
    }
    */
    function validateSignature(address _addr, bytes32 messageHash, Signature sig)
    public pure
    returns (bool done) {
        return ecrecover(messageHash, sig.v, sig.r, sig.s) == _addr;
    }
}

Prevent duplicated functions from inheritance tree.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.