|
|
|
@ -7,7 +7,6 @@ module.exports = { |
|
|
|
|
decodeIntFromHex: decodeIntFromHex, |
|
|
|
|
extractHexValue: extractHexValue, |
|
|
|
|
extractHexByteSlice: extractHexByteSlice, |
|
|
|
|
sha3: sha3, |
|
|
|
|
toBN: toBN, |
|
|
|
|
add: add, |
|
|
|
|
extractLocation: extractLocation, |
|
|
|
@ -67,12 +66,6 @@ async function extractHexValue (location, storageContent, byteLength) { |
|
|
|
|
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) { |
|
|
|
|
if (value instanceof BN) { |
|
|
|
|
return value |
|
|
|
|