Commit e777c085 authored by yann300's avatar yann300

decode fixedbytearray

parent 9c28e294
...@@ -12,4 +12,13 @@ FixedByteArray.prototype.decodeFromStorage = function (location, storageContent) ...@@ -12,4 +12,13 @@ FixedByteArray.prototype.decodeFromStorage = function (location, storageContent)
return '0x' + value.toUpperCase() return '0x' + value.toUpperCase()
} }
FixedByteArray.prototype.decodeLocals = function (stackHeight, stack, memory) {
if (stack.length - 1 < stackHeight) {
return '0x'
} else {
var value = stack[stack.length - 1 - stackHeight]
return '0x' + value.substr(2, 2 * this.storageBytes).toUpperCase() // util.extractHexByteSlice(stack[stack.length - 1 - stackHeight], this.storageBytes, this.storageBytes)
}
}
module.exports = FixedByteArray module.exports = FixedByteArray
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