'use strict'
var util = require('./util')

function Bool () {
  this.storageSlots = 1
  this.storageBytes = 1
  this.typeName = 'bool'
}

Bool.prototype.decodeFromStorage = function (location, storageContent) {
  var value = util.extractHexValue(location, storageContent, this.storageBytes)
  return value !== '00'
}

module.exports = Bool

@@ -311,16 +311,267 @@
 '00'%0A%7D%0A%0A
+Bool.prototype.decodeLocals = function (stackHeight, stack, memory) %7B%0A  if (stack.length - 1 %3C stackHeight) %7B%0A    return false%0A  %7D else %7B%0A    return util.extractHexByteSlice(stack%5Bstack.length - 1 - stackHeight%5D, this.storageBytes, 0) !== '00'%0A  %7D%0A%7D%0A%0A
 module.e

decode bool