Commit 3b7e0333 authored by yann300's avatar yann300

standard

parent cd4706be
...@@ -13,7 +13,6 @@ class Mapping extends RefType { ...@@ -13,7 +13,6 @@ class Mapping extends RefType {
async decodeFromStorage (location, storageResolver) { async decodeFromStorage (location, storageResolver) {
var corrections = this.valueType.members ? this.valueType.members.map((value) => { return value.storagelocation }) : [] var corrections = this.valueType.members ? this.valueType.members.map((value) => { return value.storagelocation }) : []
if (!this.initialDecodedState) { // cache the decoded initial storage if (!this.initialDecodedState) { // cache the decoded initial storage
var mappingsInitialPreimages var mappingsInitialPreimages
try { try {
......
...@@ -9,6 +9,7 @@ module.exports = { ...@@ -9,6 +9,7 @@ module.exports = {
extractHexByteSlice: extractHexByteSlice, extractHexByteSlice: extractHexByteSlice,
toBN: toBN, toBN: toBN,
add: add, add: add,
sub: sub,
extractLocation: extractLocation, extractLocation: extractLocation,
removeLocation: removeLocation, removeLocation: removeLocation,
normalizeHex: normalizeHex, normalizeHex: normalizeHex,
......
...@@ -97,7 +97,7 @@ class StorageViewer { ...@@ -97,7 +97,7 @@ class StorageViewer {
async mappingsLocation (corrections) { async mappingsLocation (corrections) {
if (!this.currentMappingsLocationPromise) { if (!this.currentMappingsLocationPromise) {
this.currentMappingsLocationPromise = new Promise((resolve, reject) => { this.currentMappingsLocationPromise = new Promise((resolve, reject) => {
this.extractMappingsLocationChanges(this.storageChanges, corrections, (error, mappingsLocationChanges) => { this.extractMappingsLocationChanges(this.storageChanges, corrections, (error, mappingsLocationChanges) => {
if (error) { if (error) {
reject(error) reject(error)
} else { } else {
...@@ -111,7 +111,6 @@ class StorageViewer { ...@@ -111,7 +111,6 @@ class StorageViewer {
/** /**
* retrieve mapping location changes from the storage changes. * retrieve mapping location changes from the storage changes.
* @param {Map} storageChanges * @param {Map} storageChanges
* @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping). * @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping).
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment