diff --git a/src/solidity/types/Bool.js b/src/solidity/types/Bool.js index 6889b909da..5df3e29fa2 100644 --- a/src/solidity/types/Bool.js +++ b/src/solidity/types/Bool.js @@ -12,4 +12,12 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) { 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