From 01493790003c61e242dc35123ef9db5ef5c5b200 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 20 Sep 2021 09:07:46 +0200 Subject: [PATCH 01/19] 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 9ae13ae6677c5f1753accaf6bf2f8f6e4fbb135e Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 17:58:51 +0530 Subject: [PATCH 02/19] added dumpStorage back --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 5 ++-- .../src/tests/solidityUnittests.spec.ts | 6 ++--- .../src/web3Provider/web3VmProvider.ts | 8 +++--- libs/remix-simulator/test/blocks.ts | 26 +++++++++---------- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index f2dbe5656c..a81fb591ff 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 = `[ { diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index 067cf17b5d..284e22e929 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,4 @@ 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 e415bb6a14..9ef7df7537 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -116,7 +116,6 @@ describe('blocks', () => { }) }) - /* describe('eth_getStorageAt', () => { it('should get storage at position at given address', async () => { const abi: any = [ @@ -201,29 +200,28 @@ describe('blocks', () => { } ] - // const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029' + const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029' - // const contract = new web3.eth.Contract(abi) - // const accounts = await web3.eth.getAccounts() + const contract = new web3.eth.Contract(abi) + const accounts = await web3.eth.getAccounts() - // const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 }) - // contractInstance.currentProvider = web3.eth.currentProvider - // contractInstance.givenProvider = web3.eth.currentProvider + const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 }) + contractInstance.currentProvider = web3.eth.currentProvider + contractInstance.givenProvider = web3.eth.currentProvider - // await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 }) - // let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) - // assert.deepEqual(storage, '0x64') + await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 }) + let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) + assert.deepEqual(storage, '0x64') - // await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 }) - // storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) - // assert.deepEqual(storage, '0x64') + await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 }) + storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) + assert.deepEqual(storage, '0x64') await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 }) storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) assert.deepEqual(storage, '0xc8') }) }) - */ describe('eth_call', () => { it('should get a value', async () => { From 99134763a01a22dc2adfe4a437dece3b6e981338 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 17:59:32 +0530 Subject: [PATCH 03/19] fix ts-jest warnings --- libs/remix-tests/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-tests/jest.config.js b/libs/remix-tests/jest.config.js index 0f08d413b7..6e6de8df08 100644 --- a/libs/remix-tests/jest.config.js +++ b/libs/remix-tests/jest.config.js @@ -6,7 +6,7 @@ module.exports = { transform: { '^.+\\.[tj]sx?$': 'ts-jest', }, - transformIgnorePatterns: ["/node_modules/", "\\.pnp\\.[^\\\/]+$"], + transformIgnorePatterns: ["/node_modules/", "/dist/", "\\.pnp\\.[^\\\/]+$"], rootDir: "./", testTimeout: 40000, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'], From 6cf41b0294d53b7dde5652fa002600378eec4f6a Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 18:04:59 +0530 Subject: [PATCH 04/19] linting fix --- apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index 284e22e929..b87e08c34c 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -586,4 +586,3 @@ const locals = { type: 'uint256' } } - From aac08e4f88d64a1d395b7aafa3022a95cd7ced41 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 18:20:07 +0530 Subject: [PATCH 05/19] fixed lint warning by version update --- package-lock.json | 179 ++++++++++++++++++++-------------------------- package.json | 4 +- 2 files changed, 78 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c63a212cd..cfe4438483 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10488,12 +10488,6 @@ "integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==", "dev": true }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -11022,61 +11016,74 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.32.0.tgz", + "integrity": "sha512-+OWTuWRSbWI1KDK8iEyG/6uK2rTm3kpS38wuVifGUTDB6kjEuNrzBI1MUtxnkneuWG/23QehABe2zHHrj+4yuA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", + "@typescript-eslint/experimental-utils": "4.32.0", + "@typescript-eslint/scope-manager": "4.32.0", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.32.0.tgz", + "integrity": "sha512-WLoXcc+cQufxRYjTWr4kFt0DyEv6hDgSaFqYhIzQZ05cF+kXfqXdUh+//kgquPJVUBbL3oQGKQxwPbLxHRqm6A==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/typescript-estree": "4.32.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz", + "integrity": "sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0" } }, "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.32.0.tgz", + "integrity": "sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz", + "integrity": "sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw==", "dev": true, "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0", + "debug": "^4.3.1", + "globby": "^11.0.3", "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "semver": "^7.3.5", + "tsutils": "^3.21.0" } }, "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz", + "integrity": "sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "4.32.0", + "eslint-visitor-keys": "^2.0.0" } }, "debug": { @@ -11088,21 +11095,6 @@ "ms": "2.1.2" } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -11150,60 +11142,56 @@ } }, "@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.32.0.tgz", + "integrity": "sha512-lhtYqQ2iEPV5JqV7K+uOVlPePjClj4dOw7K4/Z1F2yvjIUvyr13yJnDzkK6uon4BjHYuHy3EG0c2Z9jEhFk56w==", "dev": true, "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/typescript-estree": "4.32.0", + "debug": "^4.3.1" }, "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "@typescript-eslint/scope-manager": { + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz", + "integrity": "sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0" } }, "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.32.0.tgz", + "integrity": "sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz", + "integrity": "sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw==", "dev": true, "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0", + "debug": "^4.3.1", + "globby": "^11.0.3", "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "semver": "^7.3.5", + "tsutils": "^3.21.0" } }, "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz", + "integrity": "sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "4.32.0", + "eslint-visitor-keys": "^2.0.0" } }, "debug": { @@ -11215,21 +11203,6 @@ "ms": "2.1.2" } }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", diff --git a/package.json b/package.json index 5c9b2f3438..e9657a347e 100644 --- a/package.json +++ b/package.json @@ -223,8 +223,8 @@ "@types/react-router-dom": "^5.3.0", "@types/tape": "^4.13.0", "@types/ws": "^7.2.4", - "@typescript-eslint/eslint-plugin": "^3.3.0", - "@typescript-eslint/parser": "^3.3.0", + "@typescript-eslint/eslint-plugin": "^4.32.0", + "@typescript-eslint/parser": "^4.32.0", "ace-mode-lexon": "^1.*.*", "ace-mode-move": "0.0.1", "ace-mode-solidity": "^0.1.0", From ef631ccd0cd5f1b591e35bdc5d702d6b20696a0f Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 19:29:26 +0530 Subject: [PATCH 06/19] linting fix after version update --- libs/remix-analyzer/.eslintrc | 3 ++- libs/remix-astwalker/.eslintrc | 3 ++- libs/remix-astwalker/src/astWalker.ts | 1 + libs/remix-astwalker/src/sourceMappings.ts | 1 + libs/remix-lib/.eslintrc | 3 ++- libs/remix-solidity/.eslintrc | 3 ++- libs/remix-tests/.eslintrc | 3 ++- libs/remix-tests/src/types.ts | 3 +-- libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts | 8 ++++---- libs/remix-ui/debugger-ui/src/types/index.ts | 6 +++--- libs/remix-ui/file-explorer/src/lib/file-explorer.tsx | 2 +- libs/remix-ui/file-explorer/src/lib/types/index.ts | 2 +- .../modal-dialog/src/lib/remix-ui-modal-dialog.tsx | 1 + libs/remix-ui/modal-dialog/src/lib/types/index.ts | 1 + .../src/lib/components/ActivePluginCard.tsx | 2 +- .../src/lib/components/ActivePluginCardContainer.tsx | 2 +- .../src/lib/components/InactivePluginCard.tsx | 2 +- .../lib/components/InactivePluginCardContainer.tsx | 2 +- .../src/lib/components/LocalPluginForm.tsx | 2 +- .../src/lib/components/moduleHeading.tsx | 2 +- .../src/lib/components/permissionsSettings.tsx | 2 +- .../plugin-manager/src/lib/components/rootView.tsx | 2 +- .../src/lib/remix-ui-plugin-manager.tsx | 2 +- libs/remix-ui/plugin-manager/src/types.d.ts | 11 ++++++----- .../publish-to-storage/src/lib/publish-to-storage.tsx | 2 +- .../solidity-compiler/src/lib/solidity-compiler.tsx | 2 +- .../remix-ui/solidity-compiler/src/lib/types/index.ts | 6 +++--- .../src/lib/remix-ui-static-analyser.tsx | 2 +- libs/remix-ui/tree-view/src/types/index.ts | 1 + .../remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 30 files changed, 47 insertions(+), 37 deletions(-) diff --git a/libs/remix-analyzer/.eslintrc b/libs/remix-analyzer/.eslintrc index cc6cabcbcd..e27a064a6d 100644 --- a/libs/remix-analyzer/.eslintrc +++ b/libs/remix-analyzer/.eslintrc @@ -4,7 +4,8 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unused-vars": "off", "no-unused-vars": "off", - "dot-notation": "off" + "dot-notation": "off", + "no-use-before-define": "off" }, "ignorePatterns": ["!**/*"] } diff --git a/libs/remix-astwalker/.eslintrc b/libs/remix-astwalker/.eslintrc index 592e8bc3e9..60e5336d5c 100644 --- a/libs/remix-astwalker/.eslintrc +++ b/libs/remix-astwalker/.eslintrc @@ -3,7 +3,8 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/prefer-namespace-keyword": "off", - "no-unused-vars": "off" + "no-unused-vars": "off", + "no-use-before-define": "off" }, "ignorePatterns": ["!**/*"] } diff --git a/libs/remix-astwalker/src/astWalker.ts b/libs/remix-astwalker/src/astWalker.ts index d784a6f378..853ff647b5 100644 --- a/libs/remix-astwalker/src/astWalker.ts +++ b/libs/remix-astwalker/src/astWalker.ts @@ -39,6 +39,7 @@ export function isYulAstNode (node: Record): boolean { * in each case, if the event emits false it does not descend into children. * If no event for the current type, children are visited. */ +// eslint-disable-next-line no-redeclare export class AstWalker extends EventEmitter { manageCallback ( node: AstNode, diff --git a/libs/remix-astwalker/src/sourceMappings.ts b/libs/remix-astwalker/src/sourceMappings.ts index 275b90f394..1246eb387b 100644 --- a/libs/remix-astwalker/src/sourceMappings.ts +++ b/libs/remix-astwalker/src/sourceMappings.ts @@ -58,6 +58,7 @@ export function sourceLocationFromSrc (src: string): Location { * Routines for retrieving solc AST object(s) using some criteria, usually * includng "src' information. */ +// eslint-disable-next-line no-redeclare export class SourceMappings { readonly source: string; readonly lineBreaks: Array; diff --git a/libs/remix-lib/.eslintrc b/libs/remix-lib/.eslintrc index 6da901f7e1..6ee9d5e4a6 100644 --- a/libs/remix-lib/.eslintrc +++ b/libs/remix-lib/.eslintrc @@ -3,7 +3,8 @@ "rules": { "standard/no-callback-literal": "off", "no-unused-vars": "off", - "dot-notation": "off" + "dot-notation": "off", + "no-use-before-define": "off" }, "env": { "browser": true, diff --git a/libs/remix-solidity/.eslintrc b/libs/remix-solidity/.eslintrc index 35c51f7ae7..f57f93144e 100644 --- a/libs/remix-solidity/.eslintrc +++ b/libs/remix-solidity/.eslintrc @@ -2,7 +2,8 @@ "extends": "../../.eslintrc", "rules": { "dot-notation": "off", - "no-unused-vars": "off" + "no-unused-vars": "off", + "no-use-before-define": "off" }, "env": { "browser": true, diff --git a/libs/remix-tests/.eslintrc b/libs/remix-tests/.eslintrc index 35c51f7ae7..f57f93144e 100644 --- a/libs/remix-tests/.eslintrc +++ b/libs/remix-tests/.eslintrc @@ -2,7 +2,8 @@ "extends": "../../.eslintrc", "rules": { "dot-notation": "off", - "no-unused-vars": "off" + "no-unused-vars": "off", + "no-use-before-define": "off" }, "env": { "browser": true, diff --git a/libs/remix-tests/src/types.ts b/libs/remix-tests/src/types.ts index b0d4145dbf..fb52c56bae 100644 --- a/libs/remix-tests/src/types.ts +++ b/libs/remix-tests/src/types.ts @@ -58,13 +58,12 @@ export interface CompilerConfiguration { usingWorker?: boolean, runs: number } - export interface CompilationErrors { name: string, errors: Array, message: string } - +// eslint-disable-next-line no-redeclare export class CompilationErrors extends Error { constructor (errors: Array) { const mapError = errors.map((e) => { return e.formattedMessage || e.message }) diff --git a/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts b/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts index 5fa07cb4e8..86476a195d 100644 --- a/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts +++ b/libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts @@ -1,10 +1,6 @@ import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts' // eslint-disable-line -export interface DebuggerUIProps { - debuggerAPI: IDebuggerApi -} - export interface LineColumnLocation { start: { line: number, column: number @@ -68,3 +64,7 @@ export interface IDebuggerApi { web3: () => any // returns an instance of web3.js showMessage (title: string, message: string): void } + +export interface DebuggerUIProps { + debuggerAPI: IDebuggerApi +} diff --git a/libs/remix-ui/debugger-ui/src/types/index.ts b/libs/remix-ui/debugger-ui/src/types/index.ts index 9d13aab883..ee5e02a85f 100644 --- a/libs/remix-ui/debugger-ui/src/types/index.ts +++ b/libs/remix-ui/debugger-ui/src/types/index.ts @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ + export interface ExtractData { children?: Array<{key: number | string, value: ExtractData}> self?: string | number, @@ -13,7 +15,7 @@ export interface ExtractData { } export type ExtractFunc = (json: any, parent?: any) => ExtractData - +export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element export interface DropdownPanelProps { dropdownName: string, dropdownMessage?: string, @@ -32,5 +34,3 @@ export interface DropdownPanelProps { headStyle?: React.CSSProperties, hexHighlight?: boolean // highlight non zero value of hex value } - -export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element diff --git a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx b/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx index 66d9886a48..a758a25e7e 100644 --- a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx +++ b/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx @@ -636,7 +636,7 @@ export const FileExplorer = (props: FileExplorerProps) => { return { ...prevState, focusModal: { ...state.focusModal, hide: true } } }) } - + // eslint-disable-next-line no-undef const modal = (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => { setState(prevState => { return { diff --git a/libs/remix-ui/file-explorer/src/lib/types/index.ts b/libs/remix-ui/file-explorer/src/lib/types/index.ts index c0c27b765f..69ca02db74 100644 --- a/libs/remix-ui/file-explorer/src/lib/types/index.ts +++ b/libs/remix-ui/file-explorer/src/lib/types/index.ts @@ -1,4 +1,5 @@ import { customAction } from '@remixproject/plugin-api/lib/file-system/file-panel' +export type MenuItems = action[] // eslint-disable-line no-use-before-define /* eslint-disable-next-line */ export interface FileExplorerProps { @@ -34,7 +35,6 @@ export interface FileExplorerMenuProps { export type action = { name: string, type: string[], path: string[], extension: string[], pattern: string[], id: string, multiselect: boolean, label: string } -export type MenuItems = action[] export interface FileExplorerContextMenuProps { actions: action[], createNewFile: (folder?: string) => void, diff --git a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx index 2e43962fb3..6e5eb36723 100644 --- a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx +++ b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx @@ -4,6 +4,7 @@ import { ModalDialogProps } from './types' // eslint-disable-line import './remix-ui-modal-dialog.css' declare global { + // eslint-disable-next-line no-unused-vars interface Window { testmode: boolean; } } diff --git a/libs/remix-ui/modal-dialog/src/lib/types/index.ts b/libs/remix-ui/modal-dialog/src/lib/types/index.ts index ee2746e3d6..db848f299e 100644 --- a/libs/remix-ui/modal-dialog/src/lib/types/index.ts +++ b/libs/remix-ui/modal-dialog/src/lib/types/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ export interface ModalDialogProps { id?: string title?: string, diff --git a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx index 59e4490f6e..593c6a2edd 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx @@ -1,4 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars +// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-use-before-define import React from 'react' import '../remix-ui-plugin-manager.css' interface PluginCardProps { diff --git a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCardContainer.tsx b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCardContainer.tsx index f3fab13d10..4c8f3dc58c 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCardContainer.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCardContainer.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Profile } from '@remixproject/plugin-utils' -import React from 'react' +import React from 'react' // eslint-disable-line no-use-before-define import { PluginManagerComponent } from '../../types' import ActivePluginCard from './ActivePluginCard' import ModuleHeading from './moduleHeading' diff --git a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx index 07a416c840..8c4d72d20c 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx @@ -1,5 +1,5 @@ import { Profile } from '@remixproject/plugin-utils' -// eslint-disable-next-line @typescript-eslint/no-unused-vars +// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-use-before-define import React from 'react' import '../remix-ui-plugin-manager.css' interface PluginCardProps { diff --git a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx index c076f5b2b0..26ffee6476 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Profile } from '@remixproject/plugin-utils' -import React from 'react' +import React from 'react' // eslint-disable-line no-use-before-define import { PluginManagerComponent, PluginManagerProfile } from '../../types' import InactivePluginCard from './InactivePluginCard' import ModuleHeading from './moduleHeading' 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..7182930737 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import React, { useEffect, useReducer, useState } from 'react' +import React, { useEffect, useReducer, useState } from 'react' // eslint-disable-line no-use-before-define import { ModalDialog } from '@remix-ui/modal-dialog' import { Toaster } from '@remix-ui/toaster' import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web' diff --git a/libs/remix-ui/plugin-manager/src/lib/components/moduleHeading.tsx b/libs/remix-ui/plugin-manager/src/lib/components/moduleHeading.tsx index b77102bb5c..0fe2534bca 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/moduleHeading.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/moduleHeading.tsx @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-unused-vars,no-use-before-define */ import React from 'react' interface ModuleHeadingProps { diff --git a/libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx b/libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx index 6dba54afc5..dd41957fbe 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import React, { Fragment, useState } from 'react' +import React, { Fragment, useState } from 'react' // eslint-disable-line no-use-before-define /* eslint-disable-line */ import { ModalDialog } from '@remix-ui/modal-dialog' import useLocalStorage from '../custom-hooks/useLocalStorage' diff --git a/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx index c889aad285..0e6d377146 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import React, { Fragment, ReactNode, useEffect, useState } from 'react' +import React, { Fragment, ReactNode, useEffect, useState } from 'react' // eslint-disable-line no-use-before-define import { PluginManagerComponent, PluginManagerSettings } from '../../types' import PermisssionsSettings from './permissionsSettings' import { Profile } from '@remixproject/plugin-utils' diff --git a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx index 56d042685c..873b37f611 100644 --- a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Profile } from '@remixproject/plugin-utils' -import React, { useState } from 'react' +import React, { useState } from 'react' // eslint-disable-line no-use-before-define import { RemixUiPluginManagerProps } from '../types' import ActivePluginCardContainer from './components/ActivePluginCardContainer' import InactivePluginCardContainer from './components/InactivePluginCardContainer' diff --git a/libs/remix-ui/plugin-manager/src/types.d.ts b/libs/remix-ui/plugin-manager/src/types.d.ts index d8563caad6..d30ae31457 100644 --- a/libs/remix-ui/plugin-manager/src/types.d.ts +++ b/libs/remix-ui/plugin-manager/src/types.d.ts @@ -32,7 +32,7 @@ export class RemixAppManager extends PluginManager { constructor() event: EventEmitter pluginsDirectory: string - pluginLoader: PluginLoader + pluginLoader: PluginLoader // eslint-disable-line no-use-before-define permissionHandler: PermissionHandler getAll(): import('@remixproject/plugin-utils').Profile[] getIds(): string[] @@ -70,11 +70,11 @@ export class PluginManagerComponent extends ViewPlugin extends Plugin implements constructor(appManager: RemixAppManager, engine: Engine) appManager: RemixAppManager pluginSettings: PluginManagerSettings - app: PluginApi + app: PluginApi // eslint-disable-line no-undef engine: Engine htmlElement: HTMLDivElement views: { root: null, items: {} } - localPlugin: LocalPlugin + localPlugin: LocalPlugin // eslint-disable-line no-use-before-define pluginNames: string[] inactivePlugins: Profile[] activePlugins: Profile[] @@ -133,7 +133,7 @@ declare class LocalPlugin { } export interface PluginManagerContextProviderProps { - children: React.ReactNode + children: React.ReactNode // eslint-disable-line no-undef pluginComponent: PluginManagerComponent } @@ -153,7 +153,7 @@ declare class PluginLoader { set(plugin: any, actives: any): void get(): any } - +// eslint-disable-next-line no-redeclare export type PluginManagerSettings = { openDialog: () => void onValidation: () => void @@ -197,6 +197,7 @@ export type PluginManagerProfile = Profile & { type: 'iframe' | 'ws' hash: string } +// eslint-disable-next-line no-redeclare export type LocalPlugin = { create: () => Profile updateName: (target: string) => void diff --git a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx index ed8ca6a65f..f9245dc15e 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx @@ -79,7 +79,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { resetStorage() } - const modal = async (title: string, message: string | JSX.Element) => { + const modal = async (title: string, message: string | JSX.Element) => { // eslint-disable-line no-undef await setState(prevState => { return { ...prevState, diff --git a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx index 3a1a59cad6..ba0c420702 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx @@ -73,7 +73,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => { setCurrentVersion(value) api.setCompilerParameters({ version: value }) } - + // eslint-disable-next-line no-undef const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => { await setState(prevState => { return { diff --git a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts index 4932b1456c..83100a0bd5 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts @@ -10,8 +10,8 @@ export interface CompilerContainerProps { api: ICompilerApi, compileTabLogic: CompileTabLogic, isHardhatProject: boolean, - tooltip: (message: string | JSX.Element) => void, - modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, + tooltip: (message: string | JSX.Element) => void, // eslint-disable-line no-undef + modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, // eslint-disable-line no-undef compiledFileName: string, updateCurrentVersion: any, configurationSettings: ConfigurationSettings @@ -21,6 +21,6 @@ export interface ContractSelectionProps { contractMap: { file: string } | Record, - modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, + modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, // eslint-disable-line no-undef contractsDetails: Record } diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index d843123cb9..6b7503af02 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useReducer } from 'react' +import React, { useEffect, useState, useReducer } from 'react' // eslint-disable-line import Button from './Button/StaticAnalyserButton' // eslint-disable-line import { util } from '@remix-project/remix-lib' import _ from 'lodash' diff --git a/libs/remix-ui/tree-view/src/types/index.ts b/libs/remix-ui/tree-view/src/types/index.ts index d602367257..1c91934c76 100644 --- a/libs/remix-ui/tree-view/src/types/index.ts +++ b/libs/remix-ui/tree-view/src/types/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ export interface TreeViewProps { children?: React.ReactNode, id?: string diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 49676c2b08..b1e2ade14b 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -292,7 +292,7 @@ export const Workspace = (props: WorkspaceProps) => { return { ...prevState, modal: { ...state.modal, hide: true, message: null } } }) } - + // eslint-disable-next-line no-undef const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel: string, cancelFn: () => void) => { await setState(prevState => { return { From 944a04221957d360435fd22e63a41001f961a0d8 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 4 Oct 2021 19:56:09 +0530 Subject: [PATCH 07/19] fixed linting for e2e --- apps/remix-ide-e2e/src/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/types/index.d.ts b/apps/remix-ide-e2e/src/types/index.d.ts index 49688472cc..bdbb6d0da7 100644 --- a/apps/remix-ide-e2e/src/types/index.d.ts +++ b/apps/remix-ide-e2e/src/types/index.d.ts @@ -1,6 +1,6 @@ // Merge custom command types with nightwatch types - -import { NightwatchBrowser } from 'nightwatch' +/* eslint-disable no-use-before-define */ +import { NightwatchBrowser } from 'nightwatch' // eslint-disable-line @typescript-eslint/no-unused-vars declare module 'nightwatch' { export interface NightwatchCustomCommands { From 81e93468fe8dccfc2f8610046a61939678276e8d Mon Sep 17 00:00:00 2001 From: Admin Date: Tue, 5 Oct 2021 19:10:30 +0530 Subject: [PATCH 08/19] revert dumpStorage changes --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 6 +++--- apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 5 +++-- libs/remix-lib/src/web3Provider/web3VmProvider.ts | 8 ++++---- libs/remix-simulator/test/blocks.ts | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index a81fb591ff..993d8ce262 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,7 @@ 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 b87e08c34c..067cf17b5d 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,3 +586,4 @@ const locals = { type: 'uint256' } } +*/ diff --git a/libs/remix-lib/src/web3Provider/web3VmProvider.ts b/libs/remix-lib/src/web3Provider/web3VmProvider.ts index 76d9eb9f01..a431507687 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 9ef7df7537..b26849b928 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -115,7 +115,7 @@ 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 +222,7 @@ describe('blocks', () => { assert.deepEqual(storage, '0xc8') }) }) - +*/ describe('eth_call', () => { it('should get a value', async () => { const abi: any = [ From af3f8c9f387ef87f89d293400301559f5a1472c4 Mon Sep 17 00:00:00 2001 From: Zachinquarantine Date: Tue, 21 Sep 2021 14:02:31 -0400 Subject: [PATCH 09/19] Remove morden --- apps/remix-ide/src/blockchain/execution-context.js | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index 2623ab0dcf..67a3f1f28c 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -76,7 +76,6 @@ export class ExecutionContext { if (err) name = 'Unknown' // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md else if (id === 1) name = 'Main' - else if (id === 2) name = 'Morden (deprecated)' else if (id === 3) name = 'Ropsten' else if (id === 4) name = 'Rinkeby' else if (id === 5) name = 'Goerli' From 6cbea7c616b378585d549a0af45efa91500c652d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=C3=B3pez?= Date: Wed, 29 Sep 2021 00:27:32 -0300 Subject: [PATCH 10/19] fix event remove annotations on compile file --- .../remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index 7d036edf12..c938cdb633 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -80,6 +80,7 @@ export class CompileTabLogic { return new Promise((resolve, reject) => { this.api.readFile(target).then((content) => { const sources = { [target]: { content } } + this.event.emit('removeAnnotations') this.event.emit('startingCompilation') // setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation') setTimeout(() => { this.compiler.compile(sources, target); resolve(true) }, 100) @@ -122,7 +123,6 @@ export class CompileTabLogic { } // TODO readd saving current file this.api.saveCurrentFile() - this.event.emit('removeAnnotations') var currentFile = this.api.currentFile return this.compileFile(currentFile) } catch (err) { From 4abc4d9e8430a79d1182ab6825ac0c30c5a96238 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 29 Sep 2021 10:39:51 +0200 Subject: [PATCH 11/19] 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 12/19] 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 13/19] 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 14/19] 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 15/19] 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 16/19] 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 17/19] 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 18/19] 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 19/19] 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) {