pull/7/head
yann300 8 years ago
parent 3ff34f1f3a
commit ce16924682
  1. 4
      src/solidity/types/Mapping.js
  2. 3
      src/solidity/types/util.js

@ -19,8 +19,8 @@ class Mapping extends RefType {
type: this.type
}
}
var mapSlot = util.toBN(location.slot).toString(16)
mapSlot = ethutil.setLengthLeft('0x' + mapSlot, 32).toString('hex')
var mapSlot = util.normalizeHex(ethutil.bufferToHex(location.slot))
console.log(mapSlot, mappingsPreimages)
var mappingPreimages = mappingsPreimages[mapSlot]
var ret = {}
for (var i in mappingPreimages) {

@ -10,7 +10,8 @@ module.exports = {
toBN: toBN,
add: add,
extractLocation: extractLocation,
removeLocation: removeLocation
removeLocation: removeLocation,
normalizeHex: normalizeHex
}
function decodeIntFromHex (value, byteLength, signed) {

Loading…
Cancel
Save