Commit 11337d85 authored by yann300's avatar yann300

manage webDeploy as pre, interface and metadata as TreeView

parent bcf27572
......@@ -7,6 +7,7 @@ const copy = require('clipboard-copy')
var parseContracts = require('../contract/contractParser')
var publishOnSwarm = require('../contract/publishOnSwarm')
var modalDialog = require('../ui/modaldialog')
var TreeView = require('ethereum-remix').ui.TreeView
// -------------- styling ----------------------
var csjs = require('csjs-inject')
......@@ -351,7 +352,12 @@ function compileTab (container, appAPI, appEvents, opts) {
var value = yo`<pre class="${css.value}"></pre>`
var node
if (x === 'bytecode' || x === 'metadataHash' || x === 'swarmLocation' || x === 'Runtime Bytecode' || x === 'Opcodes') {
node = yo`<div>${JSON.stringify((details[x].slice(1, 40) + '...'), null, 4)}</div>`
node = yo`<div>${details[x]}</div>`
} else if (x === 'web3Deploy') {
node = yo`<pre>${details[x]}</pre>`
} else if (x === 'interface' || x === 'metadata') {
var treeView = new TreeView({})
node = yo`<div>${treeView.render(JSON.parse(details[x]))}</div>`
} else {
node = yo`<div>${JSON.stringify(details[x], null, 4)}</div>`
}
......
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