|
|
|
@ -16,18 +16,26 @@ class SolidityLocals { |
|
|
|
|
extractData: solidityTypeFormatter.extractData |
|
|
|
|
}) |
|
|
|
|
this.init() |
|
|
|
|
this.view |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
|
return yo`<div id='soliditylocals' >${this.basicPanel.render()}</div>` |
|
|
|
|
this.view = yo`<div id='soliditylocals' >
|
|
|
|
|
<div id='warning'></div> |
|
|
|
|
${this.basicPanel.render()} |
|
|
|
|
</div>` |
|
|
|
|
return this.view |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
init () { |
|
|
|
|
this.parent.event.register('indexChanged', this, (index) => { |
|
|
|
|
var warningDiv = this.view.querySelector('#warning') |
|
|
|
|
warningDiv.innerHTML = '' |
|
|
|
|
if (index < 0) { |
|
|
|
|
this.basicPanel.update({info: 'invalid step index'}) |
|
|
|
|
warningDiv.innerHTML = 'invalid step index' |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.parent.currentStepIndex !== index) return |
|
|
|
|
|
|
|
|
|
this.traceManager.waterfall([ |
|
|
|
@ -38,8 +46,12 @@ class SolidityLocals { |
|
|
|
|
if (!error) { |
|
|
|
|
var stack = result[0].value |
|
|
|
|
var memory = result[1].value |
|
|
|
|
var locals = localDecoder.solidityLocals(index, this.internalTreeCall, stack, memory) |
|
|
|
|
this.basicPanel.update(locals) |
|
|
|
|
try { |
|
|
|
|
var locals = localDecoder.solidityLocals(index, this.internalTreeCall, stack, memory) |
|
|
|
|
this.basicPanel.update(locals) |
|
|
|
|
} catch (e) { |
|
|
|
|
warningDiv.innerHTML = e.message |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|