decode bool

pull/7/head
yann300 8 years ago
parent 14dde0d71d
commit 709eef2dba
  1. 8
      src/solidity/types/Bool.js

@ -12,4 +12,12 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) {
return value !== '00' return value !== '00'
} }
Bool.prototype.decodeLocals = function (stackHeight, stack, memory) {
if (stack.length - 1 < stackHeight) {
return false
} else {
return util.extractHexByteSlice(stack[stack.length - 1 - stackHeight], this.storageBytes, 0) !== '00'
}
}
module.exports = Bool module.exports = Bool

Loading…
Cancel
Save