From 3abc8451c3d40ce7cb985feb0f7e1fa3f95e646f Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 10 Sep 2024 15:19:08 +0200 Subject: [PATCH 01/15] fix spawn server --- .../src/githttpbackend/package.json | 6 ++++- .../src/githttpbackend/{ => src}/server.ts | 0 .../src/githttpbackend/tsconfig.json | 25 +++++++++++++++++++ .../src/githttpbackend/yarn.lock | 17 +++++++++++++ .../src/tests/dgit_local.test.ts | 2 +- 5 files changed, 48 insertions(+), 2 deletions(-) rename apps/remix-ide-e2e/src/githttpbackend/{ => src}/server.ts (100%) create mode 100644 apps/remix-ide-e2e/src/githttpbackend/tsconfig.json diff --git a/apps/remix-ide-e2e/src/githttpbackend/package.json b/apps/remix-ide-e2e/src/githttpbackend/package.json index 3e44990386..23c5fdb3fd 100644 --- a/apps/remix-ide-e2e/src/githttpbackend/package.json +++ b/apps/remix-ide-e2e/src/githttpbackend/package.json @@ -1,6 +1,6 @@ { "scripts": { - "start:server": "npx ts-node server.ts" + "start:server": "tsc && node ./dist/server.js" }, "dependencies": { "body-parser": "^1.20.2", @@ -9,5 +9,9 @@ "git-http-backend": "^1.1.2", "path": "^0.12.7", "zlib": "^1.0.5" + }, + "devDependencies": { + "@types/node": "^22.5.4", + "typescript": "^5.6.2" } } diff --git a/apps/remix-ide-e2e/src/githttpbackend/server.ts b/apps/remix-ide-e2e/src/githttpbackend/src/server.ts similarity index 100% rename from apps/remix-ide-e2e/src/githttpbackend/server.ts rename to apps/remix-ide-e2e/src/githttpbackend/src/server.ts diff --git a/apps/remix-ide-e2e/src/githttpbackend/tsconfig.json b/apps/remix-ide-e2e/src/githttpbackend/tsconfig.json new file mode 100644 index 0000000000..7b867a47ae --- /dev/null +++ b/apps/remix-ide-e2e/src/githttpbackend/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES6", // Set the ECMAScript target version + "module": "commonjs", // Specify module code generation + "strict": true, + "noImplicitAny": false, // Enable all strict type-checking options + "esModuleInterop": true, // Emit additional code to make commonJS and ES modules work together + "skipLibCheck": true, // Skip type checking of all declaration files (.d.ts) + "forceConsistentCasingInFileNames": true, // Ensure file names are treated with case sensitivity + "outDir": "./dist", // Redirect output structure to the 'dist' directory + "rootDir": "./src", // Specify the root directory of input files + "sourceMap": true, // Create source map files + "types": [ + "node" + ], // Add node types + "moduleResolution": "node", // Ensure TypeScript resolves modules like Node.js + }, + "include": [ + "src/**/*" // Include all TypeScript files in the src directory + ], + "exclude": [ + "node_modules", // Exclude the node_modules folder + "**/*.test.ts" // Exclude test files + ] +} \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/githttpbackend/yarn.lock b/apps/remix-ide-e2e/src/githttpbackend/yarn.lock index 8548a19555..b426315cd1 100644 --- a/apps/remix-ide-e2e/src/githttpbackend/yarn.lock +++ b/apps/remix-ide-e2e/src/githttpbackend/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@types/node@^22.5.4": + version "22.5.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" + integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== + dependencies: + undici-types "~6.19.2" + accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -483,6 +490,16 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typescript@^5.6.2: + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== + +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" diff --git a/apps/remix-ide-e2e/src/tests/dgit_local.test.ts b/apps/remix-ide-e2e/src/tests/dgit_local.test.ts index 659b20767a..a298f15d96 100644 --- a/apps/remix-ide-e2e/src/tests/dgit_local.test.ts +++ b/apps/remix-ide-e2e/src/tests/dgit_local.test.ts @@ -606,7 +606,7 @@ async function createCommitOnLocalServer(path: string, message: string) { async function spawnGitServer(path: string): Promise { console.log(process.cwd()) try { - const server = spawn('yarn && sh setup.sh && npx ts-node server.ts', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true }) + const server = spawn('yarn && sh setup.sh && yarn start:server', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true }) console.log('spawned', server.stdout.closed, server.stderr.closed) return new Promise((resolve, reject) => { server.stdout.on('data', function (data) { From f273dabd08666bf8a9549f636ec3a5fad37da6ab Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 13:24:21 +0530 Subject: [PATCH 02/15] fix Remix copilot status --- .../remix-ui/statusbar/src/lib/components/aiStatus.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index 255602004f..46ad4ba524 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -14,13 +14,11 @@ export default function AIStatus(props: AIStatusProps) { const [copilotActive, setCopilotActive] = useState(false) useEffect(() => { const run = async () => { - props.plugin.on('fileManager', 'currentFileChanged', async (isAiActive) => { - const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') - setCopilotActive(aiActivate) - }) + const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') + setCopilotActive(aiActivate) } run() - }, [props.plugin.isAiActive, props.isAiActive]) + }, []) useEffect(() => { const run = async () => { @@ -30,7 +28,7 @@ export default function AIStatus(props: AIStatusProps) { }) } run() - }, [props.plugin.isAiActive]) + }, [props.plugin.isAiActive, props.plugin.isAiActive]) return ( Date: Mon, 9 Sep 2024 13:32:57 +0530 Subject: [PATCH 03/15] update wording --- libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index 46ad4ba524..b6b1f68891 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -31,7 +31,7 @@ export default function AIStatus(props: AIStatusProps) { }, [props.plugin.isAiActive, props.plugin.isAiActive]) return (
From 5cfefa12dbd3bbdb42266fab8964675c1a8cea46 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 13:34:56 +0530 Subject: [PATCH 04/15] remove terminal logs --- libs/remix-ui/settings/src/lib/remix-ui-settings.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index 050cb9d539..d56fe1dff9 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -139,13 +139,11 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { const onchangeCopilotActivate = () => { if (!props.useCopilot) { copilotActivate(props.config, props.useCopilot, dispatch) - props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot not activated!` }) return } const startCopilot = async () => { copilotActivate(props.config, props.useCopilot, dispatch) - props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot activated!` }) } startCopilot() From 59e30c9810c8e259a8b85d1e5c2daf28bd912005 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 14:27:57 +0530 Subject: [PATCH 05/15] fix e2e text not visible on screen --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 91ef7d6a4f..6503ade008 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -246,7 +246,6 @@ module.exports = { .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000) .waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000) .pause(2000) - .assert.containsText('#journal > div:nth-child(4) > span', 'Before all:') .assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll') .assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:') .assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') From 2fd9537f3381c9ffaeb1556dc20a89b9f078f3d0 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 19:14:55 +0530 Subject: [PATCH 06/15] fix e2e --- .../src/tests/solidityUnittests.test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 6503ade008..8fd8ff3b68 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -246,12 +246,13 @@ module.exports = { .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000) .waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000) .pause(2000) - .assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll') - .assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:') - .assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') - .assert.containsText('#journal > div:nth-child(6) > span', 'Check int logs:') - .assert.containsText('#journal > div:nth-child(6) > span', '10 20') - .assert.containsText('#journal > div:nth-child(6) > span', 'Number is 25') + .assert.textContains('#journal > div:nth-child(3) > span', 'Before all:') + .assert.textContains('#journal > div:nth-child(3) > span', 'Inside beforeAll') + .assert.textContains('#journal > div:nth-child(4) > span', 'Check sender:') + .assert.textContains('#journal > div:nth-child(4) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') + .assert.textContains('#journal > div:nth-child(5) > span', 'Check int logs:') + .assert.textContains('#journal > div:nth-child(5) > span', '10 20') + .assert.textContains('#journal > div:nth-child(5) > span', 'Number is 25') .openFile('tests/hhLogs_test.sol') .removeFile('tests/hhLogs_test.sol', 'workspace_new') }, From 9ed694fb33346502cea6ec5cb048dcb940dc9266 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 10 Sep 2024 14:16:50 +0530 Subject: [PATCH 07/15] update text --- apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json | 6 +++--- libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json index 6541753d86..b3f77de301 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json +++ b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json @@ -4,10 +4,10 @@ "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile OR a .ts or .js file to run", "remixUiTabs.tooltipText4": "To explain a contract, choose a .sol file", "remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]", - "remixUiTabs.tooltipText6": "Enable Remix AI Copilot [BETA]", - "remixUiTabs.tooltipText7": "Disable Remix AI Copilot [BETA]", + "remixUiTabs.tooltipText6": "Enable RemixAI Copilot [BETA]", + "remixUiTabs.tooltipText7": "Disable RemixAI Copilot [BETA]", "remixUiTabs.tooltipText8": "Remix AI Tools Documentation", - "remixUiTabs.tooltipTextDisabledCopilot": "To use Remix AI Copilot, choose a .sol file", + "remixUiTabs.tooltipTextDisabledCopilot": "To use RemixAI Copilot, choose a .sol file", "remixUiTabs.zoomOut": "Zoom out", "remixUiTabs.zoomIn": "Zoom in" } diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index b6b1f68891..fc6d774ce4 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -31,11 +31,11 @@ export default function AIStatus(props: AIStatusProps) { }, [props.plugin.isAiActive, props.plugin.isAiActive]) return (
- {copilotActive === false ? 'Remix Copilot (disabled)' : 'Remix Copilot (enabled)'} + {copilotActive === false ? 'RemixAI Copilot (disabled)' : 'RemixAI Copilot (enabled)'}
From 537a56329b46f3f0344af40cf5dadf4b8351b838 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 29 Aug 2024 14:40:38 +0530 Subject: [PATCH 08/15] Update EVM to cancun for parser --- .../src/app/plugins/parser/services/code-parser-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts index 6f1d5f9152..073347a33b 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts @@ -161,7 +161,7 @@ export default class CodeParserCompiler { "*": ["evm.gasEstimates"] } }, - "evmVersion": state.evmVersion && state.evmVersion.toString() || "berlin", + "evmVersion": state.evmVersion && state.evmVersion.toString() || "cancun", } } From 2b504425011440a5ac2b446136c6e2b3f5f81d26 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 2 Sep 2024 15:02:21 +0200 Subject: [PATCH 09/15] should clear transient storage after tx execution --- apps/remix-ide-e2e/src/tests/eip1153.test.ts | 36 +++++++++++++++++++- libs/remix-lib/src/execution/txRunnerVM.ts | 1 + 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/eip1153.test.ts b/apps/remix-ide-e2e/src/tests/eip1153.test.ts index 1f8598c49c..acecf5a013 100644 --- a/apps/remix-ide-e2e/src/tests/eip1153.test.ts +++ b/apps/remix-ide-e2e/src/tests/eip1153.test.ts @@ -31,7 +31,22 @@ module.exports = { 1: 'uint256: out2 15' } }) - .end() + }, + + 'Should clear transient storage after tx execution' : function (browser: NightwatchBrowser) { + browser.addFile('clear_transient.sol', { content: clearTransient }) + .clickLaunchIcon('solidity') + .verifyContracts(['ClearTransient']) + .clickLaunchIcon('udapp') + .createContract('') + .clickInstance(0) + .clickFunction('get - call') + .testFunction('last', + { + 'decoded output': { + 0: 'uint256: 0' + } + }) } } @@ -49,3 +64,22 @@ contract TestTransientStorage { } } }` + +const clearTransient = ` +// SPDX-License-Identifier: none +pragma solidity 0.8.26; +import "hardhat/console.sol"; + +contract ClearTransient { + uint p; + constructor() { + uint256 value; + assembly { value := tload(hex"1234") } + p = value; + assembly { tstore(hex"1234", 10) } + } + + function get () public view returns (uint) { + return p; + } +}` diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index 6c4c40b27b..9447a8157b 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -146,6 +146,7 @@ export class TxRunnerVM { const root = await this.getVMObject().stateManager.getStateRoot() this.runBlockInVm(tx, block, async (err, result) => { await this.getVMObject().stateManager.setStateRoot(root) + this.getVMObject().vm.evm.transientStorage.clear() callback(err, result) }) } else { From 2eae6b8ff26d524618fd972bc9a458e8f724eee1 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 4 Sep 2024 10:34:21 +0200 Subject: [PATCH 10/15] fix test --- apps/remix-ide-e2e/src/tests/eip1153.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/eip1153.test.ts b/apps/remix-ide-e2e/src/tests/eip1153.test.ts index acecf5a013..a0a440af46 100644 --- a/apps/remix-ide-e2e/src/tests/eip1153.test.ts +++ b/apps/remix-ide-e2e/src/tests/eip1153.test.ts @@ -33,9 +33,8 @@ module.exports = { }) }, - 'Should clear transient storage after tx execution' : function (browser: NightwatchBrowser) { + 'Should clear transient storage after tx execution #group1' : function (browser: NightwatchBrowser) { browser.addFile('clear_transient.sol', { content: clearTransient }) - .clickLaunchIcon('solidity') .verifyContracts(['ClearTransient']) .clickLaunchIcon('udapp') .createContract('') From 66644a5fee57dbc84927b0cc7b0ab304911a304c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 20:56:28 +0530 Subject: [PATCH 11/15] update ethereumjs deps --- libs/remix-analyzer/package.json | 2 +- libs/remix-astwalker/package.json | 2 +- libs/remix-debug/package.json | 2 +- libs/remix-lib/src/execution/txRunnerVM.ts | 1 - libs/remix-simulator/package.json | 2 +- libs/remix-solidity/package.json | 2 +- libs/remix-tests/package.json | 6 +++--- package.json | 8 ++++---- yarn.lock | 18 +++++++++--------- 9 files changed, 21 insertions(+), 22 deletions(-) diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index bdb6ca7a35..3e39770dc4 100644 --- a/libs/remix-analyzer/package.json +++ b/libs/remix-analyzer/package.json @@ -24,7 +24,7 @@ "@ethereumjs/block": "5.3.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@remix-project/remix-astwalker": "^0.0.86", "@remix-project/remix-lib": "^0.5.63", "async": "^2.6.2", diff --git a/libs/remix-astwalker/package.json b/libs/remix-astwalker/package.json index dfc1642738..9780d528f9 100644 --- a/libs/remix-astwalker/package.json +++ b/libs/remix-astwalker/package.json @@ -36,7 +36,7 @@ "@ethereumjs/block": "5.3.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@remix-project/remix-lib": "^0.5.63", "@types/tape": "^4.2.33", "async": "^2.6.2", diff --git a/libs/remix-debug/package.json b/libs/remix-debug/package.json index 3ac26c3cf7..46d64c7e8f 100644 --- a/libs/remix-debug/package.json +++ b/libs/remix-debug/package.json @@ -25,7 +25,7 @@ "@ethereumjs/common": "4.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@remix-project/remix-astwalker": "^0.0.86", "@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-simulator": "^0.2.56", diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index 9447a8157b..6c4c40b27b 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -146,7 +146,6 @@ export class TxRunnerVM { const root = await this.getVMObject().stateManager.getStateRoot() this.runBlockInVm(tx, block, async (err, result) => { await this.getVMObject().stateManager.setStateRoot(root) - this.getVMObject().vm.evm.transientStorage.clear() callback(err, result) }) } else { diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index fce9106de5..9095287fd4 100644 --- a/libs/remix-simulator/package.json +++ b/libs/remix-simulator/package.json @@ -21,7 +21,7 @@ "@ethereumjs/common": "4.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@metamask/eth-sig-util": "^7.0.2", "@remix-project/remix-lib": "^0.5.63", "ansi-gray": "^0.1.1", diff --git a/libs/remix-solidity/package.json b/libs/remix-solidity/package.json index b95adccd1a..00d89faf89 100644 --- a/libs/remix-solidity/package.json +++ b/libs/remix-solidity/package.json @@ -18,7 +18,7 @@ "@ethereumjs/block": "5.3.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@remix-project/remix-lib": "^0.5.63", "async": "^2.6.2", "eslint-scope": "^5.0.0", diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index 5b5dc898d6..b4942a7a40 100644 --- a/libs/remix-tests/package.json +++ b/libs/remix-tests/package.json @@ -40,7 +40,7 @@ "@ethereumjs/common": "4.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@remix-project/remix-lib": "^0.5.63", "@remix-project/remix-simulator": "^0.2.56", "@remix-project/remix-solidity": "^0.5.42", @@ -81,11 +81,11 @@ "@ethereumjs/blockchain": "7.3.0", "@ethereumjs/block": "5.3.0", "@ethereumjs/common": "4.4.0", - "@ethereumjs/evm": "3.1.0", + "@ethereumjs/evm": "3.1.1", "@ethereumjs/statemanager": "2.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@ethereumjs/trie": "6.2.1" }, "typings": "src/index.d.ts", diff --git a/package.json b/package.json index 7db9ea7eb2..a34b90e2b6 100644 --- a/package.json +++ b/package.json @@ -92,11 +92,11 @@ "@erebos/bzz-node": "^0.13.0", "@ethereumjs/block": "5.3.0", "@ethereumjs/common": "4.4.0", - "@ethereumjs/evm": "3.1.0", + "@ethereumjs/evm": "3.1.1", "@ethereumjs/statemanager": "2.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@ethersphere/bee-js": "^3.2.0", "@floating-ui/react": "^0.26.15", "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -383,11 +383,11 @@ "@ethereumjs/blockchain": "7.3.0", "@ethereumjs/block": "5.3.0", "@ethereumjs/common": "4.4.0", - "@ethereumjs/evm": "3.1.0", + "@ethereumjs/evm": "3.1.1", "@ethereumjs/statemanager": "2.4.0", "@ethereumjs/tx": "5.4.0", "@ethereumjs/util": "9.1.0", - "@ethereumjs/vm": "8.1.0", + "@ethereumjs/vm": "8.1.1", "@ethereumjs/trie": "6.2.1" } } diff --git a/yarn.lock b/yarn.lock index 51c9f38f46..cdf1016ec4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2835,10 +2835,10 @@ bigint-crypto-utils "^3.2.2" ethereum-cryptography "^2.2.1" -"@ethereumjs/evm@3.1.0", "@ethereumjs/evm@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/evm/-/evm-3.1.0.tgz#d036a7986d2a4914a82324ee4fbc2ae7a503e515" - integrity sha512-m6L8wPDpNDqCBeiCQDwoKtKMcFjcvctuZs6XHaVnFocMwsAsN9Wg89nAT7Gs6ic2kDUgVGhtGTvEAaH51B70ew== +"@ethereumjs/evm@3.1.1", "@ethereumjs/evm@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/evm/-/evm-3.1.1.tgz#f593ea99e564ba6d916d81a833bb9af5713caf34" + integrity sha512-JbDXtIn0PPZFU2oqVngje0YvW/JuNa6Y+kIYp1MCh5pn9NRplR8FkBbvb991fVSSo6AzuFMHJxSwgVl+OksnvQ== dependencies: "@ethereumjs/common" "^4.4.0" "@ethereumjs/statemanager" "^2.4.0" @@ -2914,15 +2914,15 @@ ethereum-cryptography "^2.0.0" micro-ftch "^0.3.1" -"@ethereumjs/vm@8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-8.1.0.tgz#9f795a7802b0ccdedd4ca45193a3895eafe51ef9" - integrity sha512-CjQ57Kl2JYMyX8UNUW2aWFWJnb7M5a8gUEtBMZ+A3K+wNNTALVPOKx9eNCiSwBn1bijB05FyvcNMnHEDwqSuiA== +"@ethereumjs/vm@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-8.1.1.tgz#6b58f298ee6f665d4ac412cd0d3351bb9c0ceea3" + integrity sha512-h9gIN/maMKXltM4VxZ9ac581PPUUObnFVBniLuu9vJgGTELdnwqxLwJVxSfho/Bhk56YyvKBYf1RpHwoLZZ6xw== dependencies: "@ethereumjs/block" "^5.3.0" "@ethereumjs/blockchain" "^7.3.0" "@ethereumjs/common" "^4.4.0" - "@ethereumjs/evm" "^3.1.0" + "@ethereumjs/evm" "^3.1.1" "@ethereumjs/rlp" "^5.0.2" "@ethereumjs/statemanager" "^2.4.0" "@ethereumjs/trie" "^6.2.1" From 8da7892c3a2efc49c4bd49e469f852575f6c0128 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 21:19:35 +0530 Subject: [PATCH 12/15] fix instance id --- apps/remix-ide-e2e/src/tests/eip1153.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/eip1153.test.ts b/apps/remix-ide-e2e/src/tests/eip1153.test.ts index a0a440af46..9a5fae289c 100644 --- a/apps/remix-ide-e2e/src/tests/eip1153.test.ts +++ b/apps/remix-ide-e2e/src/tests/eip1153.test.ts @@ -38,7 +38,7 @@ module.exports = { .verifyContracts(['ClearTransient']) .clickLaunchIcon('udapp') .createContract('') - .clickInstance(0) + .clickInstance(1) .clickFunction('get - call') .testFunction('last', { From 27590dd40d139240b132da31443c07702715cce7 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 10 Sep 2024 13:41:07 +0530 Subject: [PATCH 13/15] fix e2e --- apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts b/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts index 2fb98cc339..2b130875e3 100644 --- a/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts +++ b/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts @@ -90,6 +90,8 @@ module.exports = { browser .clickLaunchIcon('solidity') .setSolidityCompilerVersion('soljson-v0.8.20+commit.a1b79de6.js') + .click('*[data-id="scConfigExpander"]') + .setValue('#evmVersionSelector', 'berlin') // set target EVM for parser to berlin .addFile('contracts/mytoken.sol', { content: myToken }).useXpath().waitForElementVisible("//*[@class='view-line' and contains(.,'gas')]") From f91ecff661d29b54aa8af4af60cbb660c01cace2 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 3 Sep 2024 11:35:43 +0200 Subject: [PATCH 14/15] update web3.js import --- apps/etherscan/src/app/views/VerifyView.tsx | 2 +- apps/remix-ide/src/app/providers/injected-custom-provider.tsx | 2 +- .../src/app/providers/injected-ephemery-testnet-provider.tsx | 2 +- apps/remix-ide/src/app/tabs/debugger-tab.js | 2 +- apps/remix-ide/src/blockchain/execution-context.js | 2 +- apps/remix-ide/src/blockchain/providers/injected.ts | 2 +- apps/remix-ide/src/blockchain/providers/node.ts | 2 +- apps/remix-ide/src/blockchain/providers/vm.ts | 2 +- libs/ghaction-helper/src/methods.ts | 2 +- libs/remix-debug/src/cmdline/index.ts | 2 +- libs/remix-debug/src/init.ts | 2 +- libs/remix-lib/src/execution/txRunnerWeb3.ts | 2 +- libs/remix-lib/src/init.ts | 2 +- libs/remix-simulator/test/accounts.ts | 2 +- libs/remix-simulator/test/blocks.ts | 2 +- libs/remix-simulator/test/events.ts | 2 +- libs/remix-simulator/test/misc.ts | 2 +- libs/remix-simulator/test/transactions.ts | 2 +- libs/remix-tests/src/deployer.ts | 2 +- libs/remix-tests/src/run.ts | 2 +- libs/remix-tests/src/runTestFiles.ts | 2 +- libs/remix-tests/src/runTestSources.ts | 2 +- libs/remix-tests/src/testRunner.ts | 2 +- libs/remix-tests/tests/testRunner.spec.ts | 2 +- libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts | 2 +- libs/remix-ui/run-tab/src/lib/actions/deploy.ts | 2 +- libs/remix-ui/run-tab/src/lib/actions/events.ts | 2 +- libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts | 2 +- .../src/templates/gnosisSafeMultisig/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc1155/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc20/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc721/scripts/web3-lib.ts | 2 +- .../src/templates/playground/scripts/web3-lib.ts | 2 +- .../src/templates/remixDefault/scripts/web3-lib.ts | 2 +- .../src/templates/zeroxErc20/scripts/web3-lib.ts | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/apps/etherscan/src/app/views/VerifyView.tsx b/apps/etherscan/src/app/views/VerifyView.tsx index f41e9203af..e8f4011072 100644 --- a/apps/etherscan/src/app/views/VerifyView.tsx +++ b/apps/etherscan/src/app/views/VerifyView.tsx @@ -1,5 +1,5 @@ import React, {useEffect, useRef, useState} from 'react' -import Web3 from 'web3' +import { Web3 } from 'web3' import {PluginClient} from '@remixproject/plugin' import {CustomTooltip} from '@remix-ui/helper' diff --git a/apps/remix-ide/src/app/providers/injected-custom-provider.tsx b/apps/remix-ide/src/app/providers/injected-custom-provider.tsx index bb41eeac4a..a00604b3d9 100644 --- a/apps/remix-ide/src/app/providers/injected-custom-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-custom-provider.tsx @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { InjectedProviderDefault } from './injected-provider-default' export class InjectedCustomProvider extends InjectedProviderDefault { diff --git a/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx b/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx index dd5e8266b1..4b25986ba5 100644 --- a/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-ephemery-testnet-provider.tsx @@ -1,6 +1,6 @@ import * as packageJson from '../../../../../package.json' import { InjectedCustomProvider } from './injected-custom-provider' -import Web3 from 'web3' +import { Web3 } from 'web3' const profile = { name: 'injected-ephemery-testnet-provider', diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 9c99051ef8..9560713ffe 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line import { DebuggerApiMixin } from '@remix-ui/debugger-ui' import { ViewPlugin } from '@remixproject/engine-web' diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index fd127fb20c..cf82b96ad8 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -1,6 +1,6 @@ /* global ethereum */ 'use strict' -import Web3 from 'web3' +import { Web3 } from 'web3' import { execution } from '@remix-project/remix-lib' import EventManager from '../lib/events' import { bytesToHex } from '@ethereumjs/util' diff --git a/apps/remix-ide/src/blockchain/providers/injected.ts b/apps/remix-ide/src/blockchain/providers/injected.ts index 8ef55f8093..9e10ebc68d 100644 --- a/apps/remix-ide/src/blockchain/providers/injected.ts +++ b/apps/remix-ide/src/blockchain/providers/injected.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util' import { ExecutionContext } from '../execution-context' diff --git a/apps/remix-ide/src/blockchain/providers/node.ts b/apps/remix-ide/src/blockchain/providers/node.ts index 9c7c538307..6c316e05ff 100644 --- a/apps/remix-ide/src/blockchain/providers/node.ts +++ b/apps/remix-ide/src/blockchain/providers/node.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util' import { Personal } from 'web3-eth-personal' import { ExecutionContext } from '../execution-context' diff --git a/apps/remix-ide/src/blockchain/providers/vm.ts b/apps/remix-ide/src/blockchain/providers/vm.ts index c2e6448da5..81f74137f9 100644 --- a/apps/remix-ide/src/blockchain/providers/vm.ts +++ b/apps/remix-ide/src/blockchain/providers/vm.ts @@ -1,4 +1,4 @@ -import Web3, { FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3' +import { Web3, FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3' import { fromWei, toBigInt } from 'web3-utils' import { privateToAddress, hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util' import { extend, JSONRPCRequestPayload, JSONRPCResponseCallback } from '@remix-project/remix-simulator' diff --git a/libs/ghaction-helper/src/methods.ts b/libs/ghaction-helper/src/methods.ts index 793d904db8..d7ece2b6c6 100644 --- a/libs/ghaction-helper/src/methods.ts +++ b/libs/ghaction-helper/src/methods.ts @@ -3,7 +3,7 @@ import { ethers } from "ethers" import { Provider } from '@remix-project/remix-simulator' import { getArtifactsByContractName } from './artifacts-helper' import { SignerWithAddress } from './signer' -import Web3 from "web3" +import { Web3 } from "web3" const providerConfig = { fork: global.fork || null, diff --git a/libs/remix-debug/src/cmdline/index.ts b/libs/remix-debug/src/cmdline/index.ts index 2bad4a431e..da56ba00b9 100644 --- a/libs/remix-debug/src/cmdline/index.ts +++ b/libs/remix-debug/src/cmdline/index.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Debugger } from '../debugger/debugger' import { EventEmitter } from 'events' diff --git a/libs/remix-debug/src/init.ts b/libs/remix-debug/src/init.ts index 4ddafff021..8217c0808a 100644 --- a/libs/remix-debug/src/init.ts +++ b/libs/remix-debug/src/init.ts @@ -1,5 +1,5 @@ 'use strict' -import Web3, { Web3PluginBase } from 'web3' +import { Web3, Web3PluginBase } from 'web3' import { toNumber } from 'web3-utils' export function extendWeb3 (web3) { diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 621e1c475a..8b353d6ba9 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -1,7 +1,7 @@ 'use strict' import { EventManager } from '../eventManager' import type { Transaction as InternalTransaction } from './txRunner' -import Web3 from 'web3' +import { Web3 } from 'web3' import { toBigInt, toHex } from 'web3-utils' export class TxRunnerWeb3 { diff --git a/libs/remix-lib/src/init.ts b/libs/remix-lib/src/init.ts index d22c2392ef..128702cd01 100644 --- a/libs/remix-lib/src/init.ts +++ b/libs/remix-lib/src/init.ts @@ -1,5 +1,5 @@ 'use strict' -import Web3, { Web3PluginBase } from 'web3' +import { Web3, Web3PluginBase } from 'web3' import { toNumber } from 'web3-utils' export function extendWeb3 (web3) { diff --git a/libs/remix-simulator/test/accounts.ts b/libs/remix-simulator/test/accounts.ts index 17635383fc..46d1c359f6 100644 --- a/libs/remix-simulator/test/accounts.ts +++ b/libs/remix-simulator/test/accounts.ts @@ -1,5 +1,5 @@ /* global describe, before, it */ -import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3' +import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3' import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' diff --git a/libs/remix-simulator/test/blocks.ts b/libs/remix-simulator/test/blocks.ts index 7923103edd..e0eb39d6c9 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -1,5 +1,5 @@ /* global describe, before, it */ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' diff --git a/libs/remix-simulator/test/events.ts b/libs/remix-simulator/test/events.ts index 7d8fad7e9c..cd465caaf3 100644 --- a/libs/remix-simulator/test/events.ts +++ b/libs/remix-simulator/test/events.ts @@ -1,5 +1,5 @@ /* global describe, before, it */ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' diff --git a/libs/remix-simulator/test/misc.ts b/libs/remix-simulator/test/misc.ts index 673e98a35b..dbea658c96 100644 --- a/libs/remix-simulator/test/misc.ts +++ b/libs/remix-simulator/test/misc.ts @@ -1,5 +1,5 @@ /* global describe, before, it */ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Provider } from '../src/index' const web3 = new Web3() import * as assert from 'assert' diff --git a/libs/remix-simulator/test/transactions.ts b/libs/remix-simulator/test/transactions.ts index a908e797ac..2fa2da4b4f 100644 --- a/libs/remix-simulator/test/transactions.ts +++ b/libs/remix-simulator/test/transactions.ts @@ -1,5 +1,5 @@ /* global describe, before, it */ -import Web3 from 'web3' +import { Web3 } from 'web3' import { LegacyTransaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx' import { Provider } from '../src/index' const web3 = new Web3() diff --git a/libs/remix-tests/src/deployer.ts b/libs/remix-tests/src/deployer.ts index 991847a051..0094784e0a 100644 --- a/libs/remix-tests/src/deployer.ts +++ b/libs/remix-tests/src/deployer.ts @@ -1,6 +1,6 @@ import async from 'async' import { execution } from '@remix-project/remix-lib' -import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3' +import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3' import { compilationInterface } from './types' /** diff --git a/libs/remix-tests/src/run.ts b/libs/remix-tests/src/run.ts index 83fc6c1dc9..b844bb456a 100644 --- a/libs/remix-tests/src/run.ts +++ b/libs/remix-tests/src/run.ts @@ -1,5 +1,5 @@ import { Command } from 'commander'; -import Web3 from 'web3' +import { Web3 } from 'web3' import path from 'path' import axios, { AxiosResponse } from 'axios' import { runTestFiles } from './runTestFiles' diff --git a/libs/remix-tests/src/runTestFiles.ts b/libs/remix-tests/src/runTestFiles.ts index 3ac058857b..9b1c2bde00 100644 --- a/libs/remix-tests/src/runTestFiles.ts +++ b/libs/remix-tests/src/runTestFiles.ts @@ -3,7 +3,7 @@ import fs from './fileSystem' import { runTest } from './testRunner' import { TestResultInterface, ResultsInterface, CompilerConfiguration, compilationInterface, ASTInterface, Options, AstNode } from './types' import colors from 'colors' -import Web3 from 'web3' +import { Web3 } from 'web3' import { format } from 'util' import { compileFileOrFiles } from './compiler' import { deployAll } from './deployer' diff --git a/libs/remix-tests/src/runTestSources.ts b/libs/remix-tests/src/runTestSources.ts index 7b97b2851c..3464ddb037 100644 --- a/libs/remix-tests/src/runTestSources.ts +++ b/libs/remix-tests/src/runTestSources.ts @@ -2,7 +2,7 @@ import async, { ErrorCallback } from 'async' import { compileContractSources, writeTestAccountsContract } from './compiler' import { deployAll } from './deployer' import { runTest } from './testRunner' -import Web3 from 'web3' +import { Web3 } from 'web3' import { EventEmitter } from 'events' import { Provider, extend } from '@remix-project/remix-simulator' import { diff --git a/libs/remix-tests/src/testRunner.ts b/libs/remix-tests/src/testRunner.ts index 6dcdf239b0..b9e1c5c2d5 100644 --- a/libs/remix-tests/src/testRunner.ts +++ b/libs/remix-tests/src/testRunner.ts @@ -1,6 +1,6 @@ import async from 'async' import * as changeCase from 'change-case' -import Web3 from 'web3' +import { Web3 } from 'web3' import assertionEvents from './assertionEvents' import { RunListInterface, TestCbInterface, TestResultInterface, ResultCbInterface, diff --git a/libs/remix-tests/tests/testRunner.spec.ts b/libs/remix-tests/tests/testRunner.spec.ts index 3da24b5acd..c5efe8452e 100644 --- a/libs/remix-tests/tests/testRunner.spec.ts +++ b/libs/remix-tests/tests/testRunner.spec.ts @@ -1,5 +1,5 @@ import * as async from 'async' -import Web3 from 'web3'; +import { Web3 } from 'web3'; import * as assert from 'assert' import { Provider, extend } from '@remix-project/remix-simulator' diff --git a/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts b/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts index 0f444a7464..45db6dfbf1 100644 --- a/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts +++ b/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { init , traceHelper, TransactionDebugger as Debugger } from '@remix-project/remix-debug' import { CompilerAbstract } from '@remix-project/remix-solidity' import { lineText } from '@remix-ui/editor' diff --git a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts index a1375b473d..8103a4e832 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts @@ -9,7 +9,7 @@ import { DeployMode, MainnetPrompt } from "../types" import { displayNotification, fetchProxyDeploymentsSuccess, setDecodedResponse, updateInstancesBalance } from "./payload" import { addInstance } from "./actions" import { addressToString, logBuilder } from "@remix-ui/helper" -import Web3 from "web3" +import { Web3 } from "web3" declare global { interface Window { diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index 41deac6c6f..8d13ac5776 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -6,7 +6,7 @@ import { addDeployOption, clearAllInstances, clearAllPinnedInstances, clearRecor import { updateInstanceBalance } from './deploy' import { CompilerAbstract } from '@remix-project/remix-solidity' import BN from 'bn.js' -import Web3 from 'web3' +import { Web3 } from 'web3' import { Plugin } from "@remixproject/engine" import { getNetworkProxyAddresses } from "./deploy" import { shortenAddress } from "@remix-ui/helper" diff --git a/libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts b/libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts index dd7c244c6d..83d3df2d55 100644 --- a/libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts +++ b/libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' export class ExecutionContext { event: any; diff --git a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts index 32369998ad..cdc9b31982 100644 --- a/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts index cbd4f48489..898e7c72d4 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import Web3 from 'web3' +import { Web3 } from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** From 4ed2409f0ebc1962e8603385ecb4d07223e5bd58 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 10 Sep 2024 20:08:24 +0530 Subject: [PATCH 15/15] revert change for templates --- .../src/templates/gnosisSafeMultisig/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc1155/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc20/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc721/scripts/web3-lib.ts | 2 +- .../src/templates/playground/scripts/web3-lib.ts | 2 +- .../src/templates/remixDefault/scripts/web3-lib.ts | 2 +- .../src/templates/zeroxErc20/scripts/web3-lib.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts index cdc9b31982..32369998ad 100644 --- a/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc1155/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/playground/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts index 898e7c72d4..cbd4f48489 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts @@ -1,4 +1,4 @@ -import { Web3 } from 'web3' +import Web3 from 'web3' import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /**