Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1259 from ethereum/addedPayableToABI
Browse files Browse the repository at this point in the history
added copy of payable and stateMutability to the constructor ABI
  • Loading branch information
yann300 authored Aug 14, 2019
2 parents 51f1206 + 9931723 commit 24bfa5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion remix-lib/src/execution/txHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
}
Expand Down

0 comments on commit 24bfa5a

Please sign in to comment.