|
|
@ -7,7 +7,6 @@ module.exports = { |
|
|
|
decodeIntFromHex: decodeIntFromHex, |
|
|
|
decodeIntFromHex: decodeIntFromHex, |
|
|
|
extractHexValue: extractHexValue, |
|
|
|
extractHexValue: extractHexValue, |
|
|
|
extractHexByteSlice: extractHexByteSlice, |
|
|
|
extractHexByteSlice: extractHexByteSlice, |
|
|
|
sha3: sha3, |
|
|
|
|
|
|
|
toBN: toBN, |
|
|
|
toBN: toBN, |
|
|
|
add: add, |
|
|
|
add: add, |
|
|
|
extractLocation: extractLocation, |
|
|
|
extractLocation: extractLocation, |
|
|
@ -67,12 +66,6 @@ async function extractHexValue (location, storageContent, byteLength) { |
|
|
|
return extractHexByteSlice(slotvalue, byteLength, location.offset) |
|
|
|
return extractHexByteSlice(slotvalue, byteLength, location.offset) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function sha3 (slot) { |
|
|
|
|
|
|
|
var remoteSlot = ethutil.bufferToHex(ethutil.setLengthLeft(slot, 32)) |
|
|
|
|
|
|
|
var key = ethutil.sha3(remoteSlot) |
|
|
|
|
|
|
|
return ethutil.bufferToHex(key) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toBN (value) { |
|
|
|
function toBN (value) { |
|
|
|
if (value instanceof BN) { |
|
|
|
if (value instanceof BN) { |
|
|
|
return value |
|
|
|
return value |
|
|
|