|
|
@ -56,7 +56,7 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getConstructorInterface: function (abi) { |
|
|
|
getConstructorInterface: function (abi) { |
|
|
|
var funABI = { 'name': '', 'inputs': [], 'type': 'constructor', 'outputs': [] } |
|
|
|
var funABI = { 'name': '', 'inputs': [], 'type': 'constructor', 'payable': 'false', 'outputs': [] } |
|
|
|
if (typeof abi === 'string') { |
|
|
|
if (typeof abi === 'string') { |
|
|
|
try { |
|
|
|
try { |
|
|
|
abi = JSON.parse(abi) |
|
|
|
abi = JSON.parse(abi) |
|
|
@ -69,6 +69,8 @@ module.exports = { |
|
|
|
for (var i = 0; i < abi.length; i++) { |
|
|
|
for (var i = 0; i < abi.length; i++) { |
|
|
|
if (abi[i].type === 'constructor') { |
|
|
|
if (abi[i].type === 'constructor') { |
|
|
|
funABI.inputs = abi[i].inputs || [] |
|
|
|
funABI.inputs = abi[i].inputs || [] |
|
|
|
|
|
|
|
funABI.payable = abi[i].payable |
|
|
|
|
|
|
|
funABI.stateMutability = abi[i].stateMutability |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|