decode bool

pull/7/head
yann300 8 years ago
parent ca1a6dad38
commit 0eb46f263a
  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