Fix missing devdoc comments in output by fixing improper encoding of methodSignatures

This commit is contained in:
Fabio Berger
2018-09-28 10:28:57 +01:00
parent 8531f52456
commit 144561c53b

View File

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