From 36c9ee3db220a8a08cb0fda118a67f7d530718b5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 28 Apr 2021 14:45:23 +0200 Subject: [PATCH] linting --- .../src/execution/execution-context.ts | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/libs/remix-lib/src/execution/execution-context.ts b/libs/remix-lib/src/execution/execution-context.ts index 67a336e315..0e10e31ebc 100644 --- a/libs/remix-lib/src/execution/execution-context.ts +++ b/libs/remix-lib/src/execution/execution-context.ts @@ -31,32 +31,32 @@ class StateManagerCommonStorageDump extends StateManager { this.keyHashes = {} } -S -putContractStorage (address, key, value) { - this.keyHashes[keccak(key).toString('hex')] = bufferToHex(key) - return super.putContractStorage(address, key, value) -} -dumpStorage (address) { - return new Promise((resolve, reject) => { - this._getStorageTrie(address).then((trie) => { - const storage = {} - const stream = trie.createReadStream() - stream.on('data', (val) => { - const value = rlp.decode(val.value) - storage['0x' + val.key.toString('hex')] = { - key: this.keyHashes[val.key.toString('hex')], - value: '0x' + value.toString('hex') - } - }) - stream.on('end', function () { - resolve(storage) + putContractStorage (address, key, value) { + this.keyHashes[keccak(key).toString('hex')] = bufferToHex(key) + return super.putContractStorage(address, key, value) + } + + dumpStorage (address) { + return new Promise((resolve, reject) => { + this._getStorageTrie(address).then((trie) => { + const storage = {} + const stream = trie.createReadStream() + stream.on('data', (val) => { + const value = rlp.decode(val.value) + storage['0x' + val.key.toString('hex')] = { + key: this.keyHashes[val.key.toString('hex')], + value: '0x' + value.toString('hex') + } + }) + stream.on('end', function () { + resolve(storage) + }) + }).catch((error) => { + reject(error) }) - }).catch((error) => { - reject(error) }) - }) -} + } async getStateRoot (force: boolean = false): Promise { if (!force && this._checkpointCount !== 0) {