decodeFromMemory Address, Bool

pull/7/head
yann300 8 years ago
parent 80fcf8af13
commit d4daac1fc1
  1. 6
      src/solidity/types/Address.js
  2. 5
      src/solidity/types/Bool.js

@ -20,4 +20,10 @@ Address.prototype.decodeLocals = function (stackHeight, stack, memory) {
} }
} }
Address.prototype.decodeFromMemory = function (offset, memory) {
var value = memory.substr(offset, 64)
value = util.extractHexByteSlice(value, this.storageBytes, 0)
return value
}
module.exports = Address module.exports = Address

@ -20,4 +20,9 @@ Bool.prototype.decodeLocals = function (stackHeight, stack, memory) {
} }
} }
Bool.prototype.decodeFromMemory = function (offset, memory) {
var value = memory.substr(offset, 64)
return util.extractHexByteSlice(value, this.storageBytes, 0) !== '00'
}
module.exports = Bool module.exports = Bool

Loading…
Cancel
Save