Merge pull request #2582 from ethereum/yann300-patch-41

update JSON structure
pull/2567/head^2
yann300 2 years ago committed by GitHub
commit ca41bedcde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      apps/remix-ide/src/app/tabs/runTab/model/recorder.js

@ -33,7 +33,13 @@ class Recorder extends Plugin {
// convert to and from to tokens // convert to and from to tokens
if (this.data._listen) { if (this.data._listen) {
var record = { value, parameters: payLoad.funArgs } var record = {
value,
inputs: txHelper.serializeInputs(payLoad.funAbi),
parameters: payLoad.funArgs,
name: payLoad.funAbi.name,
type: payLoad.funAbi.type
}
if (!to) { if (!to) {
var abi = payLoad.contractABI var abi = payLoad.contractABI
var keccak = ethutil.bufferToHex(ethutil.keccakFromString(JSON.stringify(abi))) var keccak = ethutil.bufferToHex(ethutil.keccakFromString(JSON.stringify(abi)))
@ -56,9 +62,6 @@ class Recorder extends Plugin {
record.to = `created{${creationTimestamp}}` record.to = `created{${creationTimestamp}}`
record.abi = this.data._contractABIReferences[creationTimestamp] record.abi = this.data._contractABIReferences[creationTimestamp]
} }
record.name = payLoad.funAbi.name
record.inputs = txHelper.serializeInputs(payLoad.funAbi)
record.type = payLoad.funAbi.type
for (var p in record.parameters) { for (var p in record.parameters) {
var thisarg = record.parameters[p] var thisarg = record.parameters[p]
var thistimestamp = this.data._createdContracts[thisarg] var thistimestamp = this.data._createdContracts[thisarg]

Loading…
Cancel
Save