decode fixedbytearray

pull/7/head
yann300 8 years ago
parent 92b28822ff
commit 5b0d8d49a6
  1. 9
      src/solidity/types/FixedByteArray.js

@ -12,4 +12,13 @@ FixedByteArray.prototype.decodeFromStorage = function (location, storageContent)
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

Loading…
Cancel
Save