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

added copy of payable and stateMutability to the constructor ABI #1259

Merged
merged 2 commits into from
Aug 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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