Unverified Commit 24bfa5a6 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1259 from ethereum/addedPayableToABI

added copy of payable and stateMutability to the constructor ABI
parents 51f12064 99317238
......@@ -56,7 +56,7 @@ module.exports = {
},
getConstructorInterface: function (abi) {
var funABI = { 'name': '', 'inputs': [], 'type': 'constructor', 'outputs': [] }
var funABI = { 'name': '', 'inputs': [], 'type': 'constructor', 'payable': 'false', 'outputs': [] }
if (typeof abi === 'string') {
try {
abi = JSON.parse(abi)
......@@ -69,6 +69,8 @@ module.exports = {
for (var i = 0; i < abi.length; i++) {
if (abi[i].type === 'constructor') {
funABI.inputs = abi[i].inputs || []
funABI.payable = abi[i].payable
funABI.stateMutability = abi[i].stateMutability
break
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment