aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-28 17:28:57 +0800
committerFabio Berger <me@fabioberger.com>2018-09-28 17:28:57 +0800
commit144561c53be3df1e03cd46de23cec4710056907a (patch)
tree5dcc33cd57eebd4cd5dd0c624895e2c984c37c81 /packages
parent8531f52456169d6b2103757e8e511710c58a54d0 (diff)
downloaddexon-0x-contracts-144561c53be3df1e03cd46de23cec4710056907a.tar.gz
dexon-0x-contracts-144561c53be3df1e03cd46de23cec4710056907a.tar.zst
dexon-0x-contracts-144561c53be3df1e03cd46de23cec4710056907a.zip
Fix missing devdoc comments in output by fixing improper encoding of methodSignatures
Diffstat (limited to 'packages')
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts11
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(',')})`;