|
|
@ -6,6 +6,7 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) { |
|
|
|
return { 'error': 'Can\'t display locals. reason: compilation result might not have been provided' } |
|
|
|
return { 'error': 'Can\'t display locals. reason: compilation result might not have been provided' } |
|
|
|
} |
|
|
|
} |
|
|
|
var locals = {} |
|
|
|
var locals = {} |
|
|
|
|
|
|
|
memory = formatMemory(memory) |
|
|
|
for (var local in scope.locals) { |
|
|
|
for (var local in scope.locals) { |
|
|
|
let variable = scope.locals[local] |
|
|
|
let variable = scope.locals[local] |
|
|
|
if (variable.type.decodeLocals) { |
|
|
|
if (variable.type.decodeLocals) { |
|
|
@ -17,6 +18,13 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) { |
|
|
|
return locals |
|
|
|
return locals |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function formatMemory (memory) { |
|
|
|
|
|
|
|
if (memory instanceof Array) { |
|
|
|
|
|
|
|
memory = memory.join('').replace(/0x/g, '') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return memory |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
solidityLocals: solidityLocals |
|
|
|
solidityLocals: solidityLocals |
|
|
|
} |
|
|
|
} |
|
|
|