diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-28 17:28:57 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-28 17:28:57 +0800 |
commit | 144561c53be3df1e03cd46de23cec4710056907a (patch) | |
tree | 5dcc33cd57eebd4cd5dd0c624895e2c984c37c81 /packages/sol-doc | |
parent | 8531f52456169d6b2103757e8e511710c58a54d0 (diff) | |
download | dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar.gz dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar.bz2 dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar.lz dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar.xz dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.tar.zst dexon-sol-tools-144561c53be3df1e03cd46de23cec4710056907a.zip |
Fix missing devdoc comments in output by fixing improper encoding of methodSignatures
Diffstat (limited to 'packages/sol-doc')
-rw-r--r-- | packages/sol-doc/src/solidity_doc_generator.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts index 362fe12c3..09137c4cf 100644 --- a/packages/sol-doc/src/solidity_doc_generator.ts +++ b/packages/sol-doc/src/solidity_doc_generator.ts @@ -340,7 +340,16 @@ function _genMethodParamsDoc( const methodSignature = `${name}(${abiParams .map(abiParam => { - return abiParam.type; + if (!_.startsWith(abiParam.type, 'tuple')) { + return abiParam.type; + } else { + // Need to expand tuples: + // E.g: fillOrder(tuple,uint256,bytes) -> fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes) + const isArray = _.endsWith(abiParam.type, '[]'); + const expandedTypes = _.map(abiParam.components, c => c.type); + const type = `(${expandedTypes.join(',')})${isArray ? '[]' : ''}`; + return type; + } }) .join(',')})`; |