Added constructor support for Human-Readable ABI.

This commit is contained in:
Richard Moore 2018-09-21 15:34:24 -04:00
parent 892f30a051
commit 15761027df
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -347,6 +347,17 @@ function parseSignatureFunction(fragment: string): FunctionFragment {
});
}
if (abi.name === 'constructor') {
abi.type = "constructor";
if (abi.outputs.length) {
throw new Error('constructor may not have outputs');
}
delete abi.name;
delete abi.outputs;
}
return abi;
}