Merge pull request #195 from ethereum/fixlocals

Various fixes
pull/7/head
yann300 8 years ago committed by GitHub
commit e13c8fe771
  1. 1
      src/solidity/decodeInfo.js
  2. 6
      src/ui/SolidityState.js
  3. 3
      src/util/internalCallTree.js
  4. 2
      src/web3Provider/web3VmProvider.js

@ -279,6 +279,7 @@ function typeClass (fullType) {
*/
function parseType (type, stateDefinitions, contractName, location) {
var decodeInfos = {
'contract': address,
'address': address,
'array': array,
'bool': bool,

@ -44,11 +44,13 @@ SolidityState.prototype.init = function () {
self.traceManager.getStorageAt(index, this.parent.tx, function (error, storage) {
if (error) {
self.basicPanel.update({ info: error })
self.basicPanel.update({})
console.log(error)
} else {
self.solidityProxy.extractStateVariablesAt(index, function (error, stateVars) {
if (error) {
self.basicPanel.update({ info: error })
self.basicPanel.update({})
console.log(error)
} else {
self.basicPanel.update(stateDecoder.decodeState(stateVars, storage))
}

@ -4,6 +4,7 @@ var AstWalker = require('./astWalker')
var EventManager = require('../lib/eventManager')
var decodeInfo = require('../solidity/decodeInfo')
var util = require('../helpers/util')
var traceHelper = require('../helpers/traceHelper')
/**
* Tree representing internal jump into function.
@ -73,7 +74,7 @@ class InternalCallTree {
var scopeId = util.findLowerBoundValue(vmtraceIndex, scopes)
scopeId = this.scopeStarts[scopeId]
var scope = this.scopes[scopeId]
while (scope.lastStep && scope.lastStep < vmtraceIndex) {
while (scope.lastStep && scope.lastStep < vmtraceIndex && scope.firstStep > 0) {
var matched = scopeId.match(/(.\d|\d)$/)
scopeId = scopeId.replace(matched[1], '')
scope = this.scopes[scopeId]

@ -123,7 +123,7 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
this.processingAddress = uiutil.normalizeHex(step.stack[step.stack.length - 2])
if (!self.storageCache[self.processingHash][this.processingAddress]) {
self.vm.stateManager.dumpStorage(this.processingAddress, function (storage) {
self.storageCache[self.processingHash][this.processingAddress] = storage
self.storageCache[self.processingHash][self.processingAddress] = storage
})
}
}

Loading…
Cancel
Save