Added constructor support for Human-Readable ABI.
This commit is contained in:
parent
892f30a051
commit
15761027df
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user