From 01493790003c61e242dc35123ef9db5ef5c5b200 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 20 Sep 2021 09:07:46 +0200 Subject: [PATCH 01/10] Update LocalPluginForm.tsx --- .../plugin-manager/src/lib/components/LocalPluginForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx index c8b4f8fbcd..fcf10ce9df 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx @@ -52,7 +52,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor setMethods(Array.isArray(storagePlugin.methods) ? storagePlugin.methods.join(',') : storagePlugin.methods) setType(storagePlugin.type) setDisplayName(storagePlugin.displayName) - setCanactivate(Array.isArray(storagePlugin.canActivate) ? storagePlugin.canActivate.join(',') : storagePlugin.canActivate) + setCanactivate(Array.isArray(storagePlugin.canActivate) ? storagePlugin.canActivate.join(',') : storagePlugin.canActivate || '') }, []) const handleModalOkClick = async () => { From 4abc4d9e8430a79d1182ab6825ac0c30c5a96238 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 29 Sep 2021 10:39:51 +0200 Subject: [PATCH 02/10] Update compile-tab.js --- apps/remix-ide/src/app/tabs/compile-tab.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index baecfc8e6e..c3c3ccc608 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -124,7 +124,9 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA path: [], pattern: [] }) - this.currentFile = await this.call('fileManager', 'file') + try { + this.currentFile = await this.call('fileManager', 'file') + } catch (error) {} } getCompilerParameters () { From 711b3c6b3d64c15952dcde2a7996c776a04ac286 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 6 Oct 2021 11:06:11 +0200 Subject: [PATCH 03/10] Update compile-tab.js --- apps/remix-ide/src/app/tabs/compile-tab.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index c3c3ccc608..44760baf31 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -126,7 +126,9 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA }) try { this.currentFile = await this.call('fileManager', 'file') - } catch (error) {} + } catch (error) { + if (error.message !== 'Error: No such file or directory No file selected') throw new Error(error.message) + } } getCompilerParameters () { From b571e2caebc1ef9e2c1a7427d02c7b1ae3762387 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 6 Oct 2021 12:21:09 +0200 Subject: [PATCH 04/10] Update compile-tab.js --- apps/remix-ide/src/app/tabs/compile-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 44760baf31..19d2b72597 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -127,7 +127,7 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA try { this.currentFile = await this.call('fileManager', 'file') } catch (error) { - if (error.message !== 'Error: No such file or directory No file selected') throw new Error(error.message) + if (error.message !== 'Error: No such file or directory No file selected') throw error } } From f74c647a56cc9d3b3e2e6b8509e6dd4640934530 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Oct 2021 06:45:59 +0000 Subject: [PATCH 05/10] Bump merge from 1.2.1 to 2.1.1 Bumps [merge](https://github.com/yeikos/js.merge) from 1.2.1 to 2.1.1. - [Release notes](https://github.com/yeikos/js.merge/releases) - [Commits](https://github.com/yeikos/js.merge/compare/v1.2.1...v2.1.1) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cfe4438483..e1bbaadea1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31110,9 +31110,9 @@ } }, "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", + "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==" }, "merge-descriptors": { "version": "1.0.1", diff --git a/package.json b/package.json index e9657a347e..1ec51a58e7 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "jquery": "^3.3.1", "jszip": "^3.6.0", "latest-version": "^5.1.0", - "merge": "^1.2.0", + "merge": "^2.1.1", "npm-install-version": "^6.0.2", "react": "^17.0.2", "react-beautiful-dnd": "^13.1.0", From 5c0ca32d3aee7b861f4d3c9ea6934d8e071f1de0 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 6 Oct 2021 18:52:05 +0530 Subject: [PATCH 06/10] fixed empty hhLogs array in result --- libs/remix-tests/src/testRunner.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libs/remix-tests/src/testRunner.ts b/libs/remix-tests/src/testRunner.ts index c3b59480d0..102dae0bf5 100644 --- a/libs/remix-tests/src/testRunner.ts +++ b/libs/remix-tests/src/testRunner.ts @@ -251,7 +251,6 @@ export function runTest (testName: string, testObject: any, contractDetails: Com method.call(sendParams).then(async (result) => { const time = (Date.now() - startTime) / 1000.0 let tagTxHash - let hhLogs if (web3.eth && web3.eth.getHashFromTagBySimulator) tagTxHash = await web3.eth.getHashFromTagBySimulator(tagTimestamp) if (web3.eth && web3.eth.getHHLogsForTx) hhLogs = await web3.eth.getHHLogsForTx(tagTxHash) if (result) { @@ -262,7 +261,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com time: time, context: testName } - if (hhLogs) resp.hhLogs = hhLogs + if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs testCallback(undefined, resp) passingNum += 1 timePassed += time @@ -275,7 +274,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com errMsg: 'function returned false', context: testName } - if (hhLogs) resp.hhLogs = hhLogs + if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs testCallback(undefined, resp) failureNum += 1 timePassed += time @@ -325,7 +324,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com location, web3 } - if (hhLogs) resp.hhLogs = hhLogs + if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs testCallback(undefined, resp) failureNum += 1 timePassed += time @@ -344,11 +343,11 @@ export function runTest (testName: string, testObject: any, contractDetails: Com time: time, context: testName } - if (hhLogs) resp.hhLogs = hhLogs + if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs testCallback(undefined, resp) passingNum += 1 timePassed += time - } else if (hhLogs) { + } else if (hhLogs && hhLogs.length) { const resp: TestResultInterface = { type: 'logOnly', value: changeCase.sentenceCase(func.name), @@ -380,7 +379,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com if (err.message.includes('Transaction has been reverted by the EVM')) { const txHash = JSON.parse(err.message.replace('Transaction has been reverted by the EVM:', '')).transactionHash if (web3.eth && web3.eth.getHHLogsForTx) hhLogs = await web3.eth.getHHLogsForTx(txHash) - if (hhLogs) resp.hhLogs = hhLogs + if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs } testCallback(undefined, resp) failureNum += 1 From a42ff334679375429e5718dcb6dc5f12cf13abba Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 7 Oct 2021 09:48:22 +0200 Subject: [PATCH 07/10] remove unused deps --- libs/remix-url-resolver/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-url-resolver/package.json b/libs/remix-url-resolver/package.json index eed8e3dafe..50d5581d91 100644 --- a/libs/remix-url-resolver/package.json +++ b/libs/remix-url-resolver/package.json @@ -26,7 +26,6 @@ "dependencies": { "@erebos/bzz-node": "^0.13.0", "axios": ">=0.21.1", - "solc": "^0.7.4", "url": "^0.11.0", "valid-url": "^1.0.9" }, From 2ba6380ccf7d57147d31905d15edae61c8fb5422 Mon Sep 17 00:00:00 2001 From: Admin Date: Tue, 5 Oct 2021 19:17:07 +0530 Subject: [PATCH 08/10] added dumpStorage back --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 5 ++--- apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 5 ++--- libs/remix-lib/src/web3Provider/web3VmProvider.ts | 8 ++++---- libs/remix-simulator/test/blocks.ts | 2 -- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 993d8ce262..bc498d64f2 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -57,7 +57,7 @@ module.exports = { .goToVMTraceStep(144) .pause(2000) // Should be uncommented while fixing https://github.com/ethereum/remix-project/issues/1644 - // .checkVariableDebug('soliditystate', stateCheck) + .checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditylocals', localsCheck) }, @@ -117,7 +117,7 @@ const localsCheck = { type: 'address' } } -/* + const stateCheck = { chairperson: { value: '0xCA35B7D915458EF540ADE6068DFE2F44E8FA733C', @@ -175,7 +175,6 @@ const stateCheck = { immutable: false } } -*/ const ballotABI = `[ { "inputs": [ diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index 067cf17b5d..b87e08c34c 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -253,7 +253,7 @@ module.exports = { .waitForElementContainsText('*[data-id="functionPanel"]', 'vote(proposal)', 60000) .pause(2000) // Should be uncommented while fixing https://github.com/ethereum/remix-project/issues/1644 - // .checkVariableDebug('soliditylocals', locals) + .checkVariableDebug('soliditylocals', locals) .clickLaunchIcon('filePanel') .pause(2000) .openFile('tests/ballotFailedDebug_test.sol') @@ -558,7 +558,7 @@ const sources = [ } } ] -/* + const locals = { sender: { value: { @@ -586,4 +586,3 @@ const locals = { type: 'uint256' } } -*/ diff --git a/libs/remix-lib/src/web3Provider/web3VmProvider.ts b/libs/remix-lib/src/web3Provider/web3VmProvider.ts index a431507687..76d9eb9f01 100644 --- a/libs/remix-lib/src/web3Provider/web3VmProvider.ts +++ b/libs/remix-lib/src/web3Provider/web3VmProvider.ts @@ -132,8 +132,8 @@ export class Web3VmProvider { // dumpStorage throws error as 'Missing Node in DB' // This can be uncommented once that error is handled // https://github.com/ethereum/remix-project/issues/1644 - // const storage = await this.vm.stateManager.dumpStorage(data.to) - const storage = {} + const storage = await this.vm.stateManager.dumpStorage(data.to) + // const storage = {} this.storageCache[this.processingHash][tx['to']] = storage this.lastProcessedStorageTxHash[tx['to']] = this.processingHash } catch (e) { @@ -252,8 +252,8 @@ export class Web3VmProvider { // dumpStorage throws error as 'Missing Node in DB' // This can be uncommented once that error is handled // https://github.com/ethereum/remix-project/issues/1644 - // const storage = await this.vm.stateManager.dumpStorage(account) - const storage = {} + const storage = await this.vm.stateManager.dumpStorage(account) + // const storage = {} this.storageCache[this.processingHash][this.processingAddress] = storage this.lastProcessedStorageTxHash[this.processingAddress] = this.processingHash } catch (e) { diff --git a/libs/remix-simulator/test/blocks.ts b/libs/remix-simulator/test/blocks.ts index b26849b928..47e7f8ba9e 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -115,7 +115,6 @@ describe('blocks', () => { assert.deepEqual(numberTransactions, correctBlock.uncles.length) }) }) -/* describe('eth_getStorageAt', () => { it('should get storage at position at given address', async () => { const abi: any = [ @@ -222,7 +221,6 @@ describe('blocks', () => { assert.deepEqual(storage, '0xc8') }) }) -*/ describe('eth_call', () => { it('should get a value', async () => { const abi: any = [ From 95b8d9af2503c5084ad26479c06c7a2d5f5b3177 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 7 Oct 2021 17:37:32 +0530 Subject: [PATCH 09/10] latest MPT dep --- package-lock.json | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index e1bbaadea1..96c4924831 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2566,11 +2566,11 @@ } }, "@ethereumjs/blockchain": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.1.tgz", - "integrity": "sha512-PVNgVG4W79FZ8HacpYQkNleFsjqUbHnAW61+QFUL9LfK6MKddB5TBHcw3sE4AoXToWGq/UFpuBaaq1G0VBxM0g==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.2.tgz", + "integrity": "sha512-AOAAwz/lw2lciG9gf5wHi7M/qknraXXnLR66lYgbQ04qfyFC3ZE5x/5rLVm1Vu+kfJLlKrYZTmA0IbOkc7kvgw==", "requires": { - "@ethereumjs/block": "^3.5.0", + "@ethereumjs/block": "^3.5.1", "@ethereumjs/common": "^2.5.0", "@ethereumjs/ethash": "^1.1.0", "debug": "^2.2.0", @@ -31158,17 +31158,32 @@ "dev": true }, "merkle-patricia-tree": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.1.tgz", - "integrity": "sha512-25reMgrT8PhJy0Ba0U7fMZD2oobS1FPWB9vQa0uBpJYIQYYuFXEHoqEkTqA/UzX+s9br3pmUVVY/TOsFt/x0oQ==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.2.tgz", + "integrity": "sha512-eqZYNTshcYx9aESkSPr71EqwsR/QmpnObDEV4iLxkt/x/IoLYZYjJvKY72voP/27Vy61iMOrfOG6jrn7ttXD+Q==", "requires": { "@types/levelup": "^4.3.0", - "ethereumjs-util": "^7.1.0", + "ethereumjs-util": "^7.1.2", "level-mem": "^5.0.1", "level-ws": "^2.0.0", "readable-stream": "^3.6.0", "rlp": "^2.2.4", "semaphore-async-await": "^1.5.1" + }, + "dependencies": { + "ethereumjs-util": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.2.tgz", + "integrity": "sha512-xCV3PTAhW8Q2k88XZn9VcO4OrjpeXAlDm5LQTaOLp81SjNSSY6+MwuGXrx6vafOMheWSmZGxIXUbue5e9UvUBw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + } } }, "methods": { From 6588aea69f8af4a69c2d6d8474db7898f503e37c Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 7 Oct 2021 18:36:04 +0530 Subject: [PATCH 10/10] removed comments --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 1 - apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 1 - libs/remix-lib/src/web3Provider/web3VmProvider.ts | 8 -------- 3 files changed, 10 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index bc498d64f2..84e768f420 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -56,7 +56,6 @@ module.exports = { .waitForElementVisible('#stepdetail') .goToVMTraceStep(144) .pause(2000) - // Should be uncommented while fixing https://github.com/ethereum/remix-project/issues/1644 .checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditylocals', localsCheck) }, diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index b87e08c34c..f834a91a1f 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -252,7 +252,6 @@ module.exports = { .waitForElementContainsText('*[data-id="functionPanel"]', 'checkWinningProposal()', 60000) .waitForElementContainsText('*[data-id="functionPanel"]', 'vote(proposal)', 60000) .pause(2000) - // Should be uncommented while fixing https://github.com/ethereum/remix-project/issues/1644 .checkVariableDebug('soliditylocals', locals) .clickLaunchIcon('filePanel') .pause(2000) diff --git a/libs/remix-lib/src/web3Provider/web3VmProvider.ts b/libs/remix-lib/src/web3Provider/web3VmProvider.ts index 76d9eb9f01..f29e225e5a 100644 --- a/libs/remix-lib/src/web3Provider/web3VmProvider.ts +++ b/libs/remix-lib/src/web3Provider/web3VmProvider.ts @@ -129,11 +129,7 @@ export class Web3VmProvider { this.storageCache[this.processingHash] = {} if (data.to) { try { - // dumpStorage throws error as 'Missing Node in DB' - // This can be uncommented once that error is handled - // https://github.com/ethereum/remix-project/issues/1644 const storage = await this.vm.stateManager.dumpStorage(data.to) - // const storage = {} this.storageCache[this.processingHash][tx['to']] = storage this.lastProcessedStorageTxHash[tx['to']] = this.processingHash } catch (e) { @@ -249,11 +245,7 @@ export class Web3VmProvider { if (!this.storageCache[this.processingHash][this.processingAddress]) { const account = Address.fromString(this.processingAddress) try { - // dumpStorage throws error as 'Missing Node in DB' - // This can be uncommented once that error is handled - // https://github.com/ethereum/remix-project/issues/1644 const storage = await this.vm.stateManager.dumpStorage(account) - // const storage = {} this.storageCache[this.processingHash][this.processingAddress] = storage this.lastProcessedStorageTxHash[this.processingAddress] = this.processingHash } catch (e) {