dpilch / solmd Goto Github PK
View Code? Open in Web Editor NEWMarkdown documentation generator for Solidity
Home Page: http://danepilcher.com/solmd
License: MIT License
Markdown documentation generator for Solidity
Home Page: http://danepilcher.com/solmd
License: MIT License
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{
//
}
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.
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
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
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;
}
}
Tnx for this useful tool!
I was wondering, is there a way to prevent it from going up and documenting the entire inheritance tree?
For example for StandardToken.sol, I am getting the output:
But i would expect
(only StandardToken)
OR
(No duplicated functions among members)
Is there any way to achieve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.