diff options
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(',')})`; |