|
|
@ -212,6 +212,26 @@ class Recorder { |
|
|
|
cb('cannot resolve abi') |
|
|
|
cb('cannot resolve abi') |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (tx.record.parameters) { |
|
|
|
|
|
|
|
/* check if we have some params to resolve */ |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
tx.record.parameters.forEach((value, index) => { |
|
|
|
|
|
|
|
var isString = true |
|
|
|
|
|
|
|
if (typeof value !== 'string') { |
|
|
|
|
|
|
|
isString = false |
|
|
|
|
|
|
|
value = JSON.stringify(value) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (var timestamp in self.data._createdContractsReverse) { |
|
|
|
|
|
|
|
value = value.replace(new RegExp('created\\{' + timestamp + '\\}', 'g'), self.data._createdContractsReverse[timestamp]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!isString) value = JSON.parse(value) |
|
|
|
|
|
|
|
tx.record.parameters[index] = value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
modal.alert('cannot resolve input parameters ' + JSON.stringify(tx.record.parameters) + '. Execution stopped at ' + index) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
var data = format.encodeData(fnABI, tx.record.parameters, tx.record.bytecode) |
|
|
|
var data = format.encodeData(fnABI, tx.record.parameters, tx.record.bytecode) |
|
|
|
if (data.error) { |
|
|
|
if (data.error) { |
|
|
|
modal.alert(data.error + '. Record:' + JSON.stringify(record, null, '\t') + '. Execution stopped at ' + index) |
|
|
|
modal.alert(data.error + '. Record:' + JSON.stringify(record, null, '\t') + '. Execution stopped at ' + index) |
|
|
|