From 5b980f3512bc59829c0c511c8de55b5797a02a36 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 16 Feb 2023 13:07:22 +0100 Subject: [PATCH 01/60] move the mixins --- apps/debugger/src/app/debugger.ts | 2 +- apps/debugger/src/index.ts | 1 - apps/remix-ide/src/app/tabs/compile-tab.js | 2 +- apps/remix-ide/src/app/tabs/debugger-tab.js | 2 +- apps/solidity-compiler/src/app/compiler.ts | 2 +- libs/remix-ui/debugger-ui/src/index.ts | 1 + .../remix-ui/debugger-ui/src/lib/api}/debugger-api.ts | 0 libs/remix-ui/solidity-compiler/src/index.ts | 1 + .../remix-ui/solidity-compiler/src/lib/api}/compiler-api.ts | 0 yarn.lock | 4 ++-- 10 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 apps/debugger/src/index.ts rename {apps/debugger/src/app => libs/remix-ui/debugger-ui/src/lib/api}/debugger-api.ts (100%) rename {apps/solidity-compiler/src/app => libs/remix-ui/solidity-compiler/src/lib/api}/compiler-api.ts (100%) diff --git a/apps/debugger/src/app/debugger.ts b/apps/debugger/src/app/debugger.ts index fb8f769c19..28e9703470 100644 --- a/apps/debugger/src/app/debugger.ts +++ b/apps/debugger/src/app/debugger.ts @@ -2,7 +2,7 @@ import { PluginClient } from "@remixproject/plugin"; import { createClient } from "@remixproject/plugin-webview"; import { IDebuggerApi, LineColumnLocation, onBreakpointClearedListener, onBreakpointAddedListener, onEditorContentChanged, onEnvChangedListener, TransactionReceipt } from '@remix-ui/debugger-ui' -import { DebuggerApiMixin } from './debugger-api' +import { DebuggerApiMixin } from '@remix-ui/debugger-ui' import { CompilerAbstract } from '@remix-project/remix-solidity' export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) { diff --git a/apps/debugger/src/index.ts b/apps/debugger/src/index.ts deleted file mode 100644 index b38e3a7942..0000000000 --- a/apps/debugger/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './app/debugger-api'; diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 1c66b1db7a..a43e71ca4b 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -2,7 +2,7 @@ import React from 'react' // eslint-disable-line import { SolidityCompiler } from '@remix-ui/solidity-compiler' // eslint-disable-line import { CompileTabLogic } from '@remix-ui/solidity-compiler' // eslint-disable-line -import { CompilerApiMixin } from '@remixproject/solidity-compiler-plugin' // eslint-disable-line +import { CompilerApiMixin } from '@remix-ui/solidity-compiler' import { ViewPlugin } from '@remixproject/engine-web' import { QueryParams } from '@remix-project/remix-lib' // import { ICompilerApi } from '@remix-project/remix-lib' diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 8d357acc65..9e58b1cbf0 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -1,6 +1,6 @@ import Web3 from 'web3' import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line -import { DebuggerApiMixin } from '@remixproject/debugger-plugin' // eslint-disable-line +import { DebuggerApiMixin } from '@remix-ui/debugger-ui' import { ViewPlugin } from '@remixproject/engine-web' import * as packageJson from '../../../../../package.json' import React from 'react' // eslint-disable-line diff --git a/apps/solidity-compiler/src/app/compiler.ts b/apps/solidity-compiler/src/app/compiler.ts index aa04950e0c..01543be995 100644 --- a/apps/solidity-compiler/src/app/compiler.ts +++ b/apps/solidity-compiler/src/app/compiler.ts @@ -2,7 +2,7 @@ /* eslint-disable no-unused-vars */ import { PluginClient } from '@remixproject/plugin' import { createClient } from '@remixproject/plugin-webview' -import { CompilerApiMixin } from './compiler-api' +import { CompilerApiMixin } from '@remix-ui/solidity-compiler' import { ICompilerApi } from '@remix-project/remix-lib' import { CompileTabLogic } from '@remix-ui/solidity-compiler' diff --git a/libs/remix-ui/debugger-ui/src/index.ts b/libs/remix-ui/debugger-ui/src/index.ts index 840763d2ef..384ae40ad7 100644 --- a/libs/remix-ui/debugger-ui/src/index.ts +++ b/libs/remix-ui/debugger-ui/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/debugger-ui' export * from './lib/idebugger-api' +export * from './lib/api/debugger-api' diff --git a/apps/debugger/src/app/debugger-api.ts b/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts similarity index 100% rename from apps/debugger/src/app/debugger-api.ts rename to libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts diff --git a/libs/remix-ui/solidity-compiler/src/index.ts b/libs/remix-ui/solidity-compiler/src/index.ts index fe6611e472..386d3792be 100644 --- a/libs/remix-ui/solidity-compiler/src/index.ts +++ b/libs/remix-ui/solidity-compiler/src/index.ts @@ -1,3 +1,4 @@ export * from './lib/solidity-compiler' export * from './lib/logic' export * from './lib/logic/flattenerUtilities' +export * from './lib/api/compiler-api' \ No newline at end of file diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts similarity index 100% rename from apps/solidity-compiler/src/app/compiler-api.ts rename to libs/remix-ui/solidity-compiler/src/lib/api/compiler-api.ts diff --git a/yarn.lock b/yarn.lock index 3f5d6a2006..5cd08a7c61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2883,7 +2883,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -12293,7 +12293,7 @@ ethers@^5.4.2: "@ethersproject/web" "5.5.0" "@ethersproject/wordlists" "5.5.0" -ethers@^5.7.2: +ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== From 32cefa6118bad2b50754bcaa176422b678f90e74 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 16 Feb 2023 13:18:15 +0100 Subject: [PATCH 02/60] rm index --- apps/solidity-compiler/src/index.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 apps/solidity-compiler/src/index.ts diff --git a/apps/solidity-compiler/src/index.ts b/apps/solidity-compiler/src/index.ts deleted file mode 100644 index f92deb7aa4..0000000000 --- a/apps/solidity-compiler/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './app/compiler-api' From 782db11c89af03544d0bb629e9fe3065da492c71 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:05:31 +0100 Subject: [PATCH 03/60] hot module replacement --- apps/remix-ide/.babelrc | 2 +- apps/remix-ide/project.json | 9 ++++++--- apps/remix-ide/src/app.js | 1 - apps/remix-ide/tsconfig.app.json | 1 - babel.config.js | 2 +- libs/remix-core-plugin/package.json | 1 - libs/remix-core-plugin/tsconfig.lib.json | 5 ----- .../home-tab/src/lib/components/homeTabTitle.tsx | 1 - libs/remix-ws-templates/package.json | 1 - libs/remixd/tsconfig.lib.json | 2 +- package.json | 3 +++ 11 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/.babelrc b/apps/remix-ide/.babelrc index 9123728aa1..34aaeb3268 100644 --- a/apps/remix-ide/.babelrc +++ b/apps/remix-ide/.babelrc @@ -1,5 +1,5 @@ { - "presets": ["@babel/preset-env", ["@babel/preset-react", + "presets": ["@babel/preset-env", ["@nrwl/react/babel", {"runtime": "automatic"} ]], "plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", "@babel/plugin-proposal-nullish-coalescing-operator"], diff --git a/apps/remix-ide/project.json b/apps/remix-ide/project.json index 7775e520c2..e118e366a7 100644 --- a/apps/remix-ide/project.json +++ b/apps/remix-ide/project.json @@ -48,15 +48,18 @@ "defaultConfiguration": "development", "options": { "buildTarget": "remix-ide:build", - "watch": true, - "liveReload": true, - "hmr": false + }, "configurations": { "development": { "buildTarget": "remix-ide:build:development", "port": 8080 }, + "hot":{ + "buildTarget": "remix-ide:build:development", + "port": 8080, + "hmr": true + }, "production": { "buildTarget": "remix-ide:build:production", "port": 8080 diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index d53d7ed75c..57a5140159 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -247,7 +247,6 @@ class AppComponent { const codeParser = new CodeParser(new AstWalker()) - this.notification = new NotificationPlugin() const configPlugin = new ConfigPlugin() diff --git a/apps/remix-ide/tsconfig.app.json b/apps/remix-ide/tsconfig.app.json index 499c767595..b45165141e 100644 --- a/apps/remix-ide/tsconfig.app.json +++ b/apps/remix-ide/tsconfig.app.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "types": ["node"], - "module": "es2020" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "./src/assets/**/*"], "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] diff --git a/babel.config.js b/babel.config.js index ad32f7a9d0..16d8ca5cea 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,5 @@ module.exports = { - "presets": ["@babel/preset-typescript", "@babel/preset-env", "@babel/preset-react"], + "presets": ["@babel/preset-typescript", "@babel/preset-env", "@nrwl/react/babel"], "plugins": [ "babel-plugin-replace-ts-export-assignment", "@babel/plugin-transform-modules-commonjs", diff --git a/libs/remix-core-plugin/package.json b/libs/remix-core-plugin/package.json index 727b1981a8..3ea38618cc 100644 --- a/libs/remix-core-plugin/package.json +++ b/libs/remix-core-plugin/package.json @@ -3,7 +3,6 @@ "version": "0.0.1", "description": "This library was generated with [Nx](https://nx.dev).", "main": "src/index.js", - "type": "module", "author": "Remix Team", "license": "ISC" } diff --git a/libs/remix-core-plugin/tsconfig.lib.json b/libs/remix-core-plugin/tsconfig.lib.json index d1f4736244..87520f83f8 100644 --- a/libs/remix-core-plugin/tsconfig.lib.json +++ b/libs/remix-core-plugin/tsconfig.lib.json @@ -1,11 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "declaration": true, "types": ["node"] }, "exclude": [ diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 93808e3e00..e689c9c95d 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -52,7 +52,6 @@ function HomeTabTitle() { return (
-
Remix diff --git a/libs/remix-ws-templates/package.json b/libs/remix-ws-templates/package.json index 8f4058b563..f9a71a64dd 100644 --- a/libs/remix-ws-templates/package.json +++ b/libs/remix-ws-templates/package.json @@ -4,7 +4,6 @@ "description": "Create a Remix IDE workspace using different templates", "main": "src/index.js", "types": "src/index.d.ts", - "type": "module", "publishConfig": { "access": "public" }, diff --git a/libs/remixd/tsconfig.lib.json b/libs/remixd/tsconfig.lib.json index f367bc8051..c251b41e7e 100644 --- a/libs/remixd/tsconfig.lib.json +++ b/libs/remixd/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "target": "es6", + "target": "ES6", "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, diff --git a/package.json b/package.json index 1bb34a3c05..b3c176c823 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "nx": "nx", "start": "nx start", "serve": "nx serve remix-ide --configuration=development", + "hot": "nx serve remix-ide --configuration=hot", "build": "nx build", "test": "nx test", "lint": "nx lint", @@ -234,6 +235,7 @@ "@nrwl/web": "15.7.1", "@nrwl/webpack": "15.7.1", "@nrwl/workspace": "^15.7.1", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@svgr/webpack": "^6.5.1", "@testing-library/react": "13.4.0", "@types/axios": "^0.14.0", @@ -332,6 +334,7 @@ "onchange": "^3.2.1", "os-browserify": "^0.3.0", "process": "^0.11.10", + "react-refresh": "^0.14.0", "react-test-renderer": "^17.0.2", "request": "^2.83.0", "rimraf": "^2.6.1", From 6ea2a50769c8db293d6830ab138ee5e721e505dd Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:06:57 +0100 Subject: [PATCH 04/60] rm space --- apps/remix-ide/src/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 57a5140159..d53d7ed75c 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -247,6 +247,7 @@ class AppComponent { const codeParser = new CodeParser(new AstWalker()) + this.notification = new NotificationPlugin() const configPlugin = new ConfigPlugin() From e70e0f9582aee652ffb1938087b98add6716a5f8 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:07:25 +0100 Subject: [PATCH 05/60] config --- libs/remixd/tsconfig.lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remixd/tsconfig.lib.json b/libs/remixd/tsconfig.lib.json index c251b41e7e..f367bc8051 100644 --- a/libs/remixd/tsconfig.lib.json +++ b/libs/remixd/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "target": "ES6", + "target": "es6", "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, From e907e50beacdcf8561d842868f3776ee5c70456f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:08:31 +0100 Subject: [PATCH 06/60] tab --- libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index e689c9c95d..93808e3e00 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -52,6 +52,7 @@ function HomeTabTitle() { return (
+
Remix From 32e744ba3f0b9a5bccfb01b96d1dd36498f4aaa5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 16:31:22 +0100 Subject: [PATCH 07/60] lock file --- yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index afada6be4f..89f000750b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5125,6 +5125,21 @@ dependencies: esquery "^1.0.1" +"@pmmmwh/react-refresh-webpack-plugin@^0.5.10": + version "0.5.10" + resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz#2eba163b8e7dbabb4ce3609ab5e32ab63dda3ef8" + integrity sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA== + dependencies: + ansi-html-community "^0.0.8" + common-path-prefix "^3.0.0" + core-js-pure "^3.23.3" + error-stack-parser "^2.0.6" + find-up "^5.0.0" + html-entities "^2.1.0" + loader-utils "^2.0.4" + schema-utils "^3.0.0" + source-map "^0.7.3" + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -9854,6 +9869,11 @@ commander@^9.2.0, commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -10251,6 +10271,11 @@ core-js-pure@^3.19.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.20.0.tgz#7253feccf8bb05b72c153ddccdbe391ddbffbe03" integrity sha512-qsrbIwWSEEYOM7z616jAVgwhuDDtPLwZSpUsU3vyUkHYqKTf/uwOJBZg2V7lMurYWkpVlaVOxBrfX0Q3ppvjfg== +core-js-pure@^3.23.3: + version "3.28.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.28.0.tgz#4ef2888475b6c856ef6f5aeef8b4f618b76ad048" + integrity sha512-DSOVleA9/v3LNj/vFxAPfUHttKTzrB2RXhAPvR5TPXn4vrra3Z2ssytvRyt8eruJwAfwAiFADEbrjcRdcvPLQQ== + core-js@^2.4.0, core-js@^2.6.5: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" @@ -11757,6 +11782,13 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +error-stack-parser@^2.0.6: + version "2.1.4" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" + integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== + dependencies: + stackframe "^1.3.4" + es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -14634,7 +14666,7 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.3.2: +html-entities@^2.1.0, html-entities@^2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== @@ -17829,7 +17861,7 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" -loader-utils@^2.0.3: +loader-utils@^2.0.3, loader-utils@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== @@ -22436,6 +22468,11 @@ react-redux@^7.2.0: prop-types "^15.7.2" react-is "^17.0.2" +react-refresh@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" + integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== + react-router-dom@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.3.0.tgz#a0216da813454e521905b5fa55e0e5176123f43d" @@ -24446,6 +24483,11 @@ stackblur-canvas@^2.0.0: resolved "https://registry.yarnpkg.com/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz#aa87bbed1560fdcd3138fff344fc6a1c413ebac4" integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== +stackframe@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" + integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== + stacktrace-parser@^0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" From e2bfcb1bd27f77e181dffd9add02bdb4d545e0f6 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 21 Feb 2023 12:05:21 +0100 Subject: [PATCH 08/60] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3c176c823..750b022009 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "nx": "nx", "start": "nx start", "serve": "nx serve remix-ide --configuration=development", - "hot": "nx serve remix-ide --configuration=hot", + "serve:hot": "nx serve remix-ide --configuration=hot", "build": "nx build", "test": "nx test", "lint": "nx lint", From d69bcaf379eb62a920c4fe1d0c8ae91b9c14d8d3 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 17 Feb 2023 13:36:06 +0100 Subject: [PATCH 09/60] Fixed upgrade bug --- libs/remix-core-plugin/src/types/contract.ts | 3 ++- .../remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-core-plugin/src/types/contract.ts b/libs/remix-core-plugin/src/types/contract.ts index cccce84203..bf6d343038 100644 --- a/libs/remix-core-plugin/src/types/contract.ts +++ b/libs/remix-core-plugin/src/types/contract.ts @@ -20,7 +20,8 @@ export interface ContractData { getConstructorInterface: () => any, getConstructorInputs: () => any, isOverSizeLimit: () => boolean, - metadata: any + metadata: any, + contractName?: string } export interface ContractAST { diff --git a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx index 83fa37faea..6828170172 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -235,7 +235,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { } const isValidProxyUpgrade = (proxyAddress: string) => { - return props.isValidProxyUpgrade(proxyAddress, loadedContractData.name, loadedContractData.compiler.source, loadedContractData.compiler.data) + return props.isValidProxyUpgrade(proxyAddress, loadedContractData.contractName || loadedContractData.name, loadedContractData.compiler.source, loadedContractData.compiler.data) } const checkSumWarning = () => { From f992052cb6006330cade3682e1bc1428734ba74d Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 22 Feb 2023 09:43:25 +0100 Subject: [PATCH 10/60] Update proxy warning message and fixed console error --- libs/remix-ui/helper/src/lib/helper-components.tsx | 2 +- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 1 + .../remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/helper/src/lib/helper-components.tsx b/libs/remix-ui/helper/src/lib/helper-components.tsx index 707538e707..789999e558 100644 --- a/libs/remix-ui/helper/src/lib/helper-components.tsx +++ b/libs/remix-ui/helper/src/lib/helper-components.tsx @@ -119,7 +119,7 @@ export const upgradeWithProxyMsg = () => ( export const unavailableProxyLayoutMsg = () => (
-

Previous contract implementation is NOT available for upgrade comparison.
A new storage layout will be saved for future upgrades.

+

The previous contract implementation is NOT available for an upgrade comparison
A new storage layout will be saved for future upgrades.

) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 0f0ea63b19..bf1c45e77c 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -537,6 +537,7 @@ export function ContractGUI (props: ContractGUIProps) { tooltipClasses="text-nowrap" tooltipId={`proxyAddressTooltip${index}`} tooltipText={'Deployed ' + shortenDate(deployment.date)} + key={index} > 0 ?
{ props.instances.instanceList.map((instance, index) => { return Date: Wed, 22 Feb 2023 14:07:11 +0100 Subject: [PATCH 11/60] remove plugin from the app manager list --- apps/remix-ide/src/remixAppManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 2ca45b728f..db5e5370df 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -10,7 +10,7 @@ const requiredModules = [ // services + layout views + system views 'fileManager', 'contentImport', 'blockchain', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider', 'solidity', 'solidity-logic', 'gistHandler', 'layout', 'notification', 'permissionhandler', 'walkthrough', 'storage', 'restorebackupzip', 'link-libraries', 'deploy-libraries', 'openzeppelin-proxy', - 'hardhat-provider', 'ganache-provider', 'foundry-provider', 'basic-http-provider', 'injected', 'injected-optimism-provider', 'injected-arbitrum-one-provider', + 'hardhat-provider', 'ganache-provider', 'foundry-provider', 'basic-http-provider', 'injected', 'injected-optimism-provider', 'injected-arbitrum-one-provider', 'vm-custom-fork', 'vm-goerli-fork', 'vm-mainnet-fork', 'vm-sepolia-fork', 'vm-merge', 'vm-london', 'vm-berlin', 'compileAndRun', 'search', 'recorder', 'fileDecorator', 'codeParser', 'codeFormatter', 'solidityumlgen', 'contractflattener'] // dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd) From 8d30708c28c4c7267cbc0346e5160fdeff7ad215 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 14:07:25 +0100 Subject: [PATCH 12/60] update label --- apps/remix-ide/src/app/tabs/locales/en/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/settings.json b/apps/remix-ide/src/app/tabs/locales/en/settings.json index b952518159..18e8a12d12 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/settings.json +++ b/apps/remix-ide/src/app/tabs/locales/en/settings.json @@ -3,7 +3,7 @@ "settings.reset": "Reset to Default settings", "settings.general": "General settings", "settings.generateContractMetadataText": "Generate contract metadata. Generate a JSON file in the contract folder. Allows to specify library addresses the contract depends on. If nothing is specified, Remix deploys libraries automatically.", - "settings.ethereunVMText": "Always use Javascript VM at load", + "settings.ethereunVMText": "Always use the Remix VM at load", "settings.wordWrapText": "Word wrap in editor", "settings.useAutoCompleteText": "Enable code completion in editor.", "settings.useShowGasInEditorText": "Display gas estimates in editor.", From ad8e191d21104103352ccc464f3d175d9ada0801 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 14:07:41 +0100 Subject: [PATCH 13/60] reorder provider list and update naming --- apps/remix-ide/src/app/udapp/run-tab.js | 27 ++++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/remix-ide/src/app/udapp/run-tab.js b/apps/remix-ide/src/app/udapp/run-tab.js index 539089ff24..f833cc29e5 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.js +++ b/apps/remix-ide/src/app/udapp/run-tab.js @@ -131,6 +131,12 @@ export class RunTab extends ViewPlugin { }) } + // basic injected + const displayNameInjected = `Injected Provider${(window && window.ethereum && !(window.ethereum.providers && !window.ethereum.selectedProvider)) ? + window.ethereum.isCoinbaseWallet || window.ethereum.selectedProvider?.isCoinbaseWallet ? ' - Coinbase' : + window.ethereum.isBraveWallet || window.ethereum.selectedProvider?.isBraveWallet ? ' - Brave' : + window.ethereum.isMetaMask || window.ethereum.selectedProvider?.isMetaMask ? ' - MetaMask' : '' : ''}` + await addProvider('injected', displayNameInjected, true, false) // VM const titleVM = 'Execution environment is local to Remix. Data is only saved to browser memory and will vanish upon reload.' await addProvider('vm-merge', 'Remix VM (Merge)', false, true, 'merge', 'settingsVMMergeMode', titleVM) @@ -142,20 +148,17 @@ export class RunTab extends ViewPlugin { await addProvider('vm-custom-fork', 'Remix VM - Custom fork', false, true, '', 'settingsVMCustomMode', titleVM) // external provider - await addProvider('hardhat-provider', 'Hardhat Provider', false, false) - await addProvider('ganache-provider', 'Ganache Provider', false, false) - await addProvider('foundry-provider', 'Foundry Provider', false, false) + await addProvider('basic-http-provider', 'Custom - External Http Provider', false, false) + await addProvider('hardhat-provider', 'Dev - Hardhat Provider', false, false) + await addProvider('ganache-provider', 'Dev - Ganache Provider', false, false) + await addProvider('foundry-provider', 'Dev - Foundry Provider', false, false) + + // injected provider + await addProvider('injected-optimism-provider', 'L2 - Optimism Provider', true, false) + await addProvider('injected-arbitrum-one-provider', 'L2 - Arbitrum One Provider', true, false) + await addProvider('walletconnect', 'Wallet Connect', false, false) - await addProvider('basic-http-provider', 'External Http Provider', false, false) - // injected provider - const displayNameInjected = `Injected Provider${(window && window.ethereum && !(window.ethereum.providers && !window.ethereum.selectedProvider)) ? - window.ethereum.isCoinbaseWallet || window.ethereum.selectedProvider?.isCoinbaseWallet ? ' - Coinbase' : - window.ethereum.isBraveWallet || window.ethereum.selectedProvider?.isBraveWallet ? ' - Brave' : - window.ethereum.isMetaMask || window.ethereum.selectedProvider?.isMetaMask ? ' - MetaMask' : '' : ''}` - await addProvider('injected', displayNameInjected, true, false) - await addProvider('injected-optimism-provider', 'Optimism Provider', true, false) - await addProvider('injected-arbitrum-one-provider', 'Arbitrum One Provider', true, false) } writeFile (fileName, content) { From 5bc59a9dd4b6ce38b899488f361e9151cdbe6c2e Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 20 Feb 2023 17:48:37 +0100 Subject: [PATCH 14/60] fix comparinf bytecode --- libs/remix-lib/src/util.ts | 6 ++++++ libs/remix-lib/test/util.ts | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/libs/remix-lib/src/util.ts b/libs/remix-lib/src/util.ts index a89075721f..b38df71993 100644 --- a/libs/remix-lib/src/util.ts +++ b/libs/remix-lib/src/util.ts @@ -258,6 +258,12 @@ export function compareByteCode (code1, code2) { code2 = extractcborMetadata(code2) if (code1 && code2) { + if (code1.length !== code2.length) { + // if the length isn't the same, we have an issue with extracting the metadata hash. + const minLength = code1.length > code2.length ? code2.length: code1.length + code1 = code1.substr(0, minLength - 10) + code2 = code2.substr(0, minLength - 10) + } const compare = stringSimilarity.compareTwoStrings(code1, code2) return compare == 1 } diff --git a/libs/remix-lib/test/util.ts b/libs/remix-lib/test/util.ts index e19674a645..006485cb5c 100644 --- a/libs/remix-lib/test/util.ts +++ b/libs/remix-lib/test/util.ts @@ -102,9 +102,17 @@ tape('util.getInputParameters', function (t) { t.equal(util.getinputParameters(sampleERC721), '000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016500000000000000000000000000000000000000000000000000000000000000') t.equal(util.getinputParameters(ERC721), '') +}) +tape('util.compareByteCode uniswap onchain vs solidity local compilation result', function (t) { + t.plan(1) + t.ok(util.compareByteCode(uniswapQuote2, uniswapQuote1), 'uniswap bytecode should be the same') }) +const uniswapQuote2 = `0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c45a01551161005b578063c45a0155146100d3578063cdca1753146100db578063f7729d43146100ee578063fa461e33146101015761007d565b80632f80bb1d1461008257806330d07f21146100ab5780634aa4a4fc146100be575b600080fd5b610095610090366004610e9e565b610116565b6040516100a29190611148565b60405180910390f35b6100956100b9366004610e30565b61017b565b6100c6610340565b6040516100a29190611084565b6100c6610364565b6100956100e9366004610e9e565b610388565b6100956100fc366004610e30565b6103d6565b61011461010f366004610f04565b610555565b005b60005b600061012484610660565b9050600080600061013487610668565b92509250925061014882848389600061017b565b955083156101605761015987610699565b965061016c565b85945050505050610175565b50505050610119565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff808616878216109083166101a65760008490555b6101b18787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836101d78861070c565b60000373ffffffffffffffffffffffffffffffffffffffff8816156101fc5787610222565b8561021b5773fffd8963efd1fc6a506488495d951d5263988d25610222565b6401000276a45b8b8b8e6040516020016102379392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016102669594939291906110a5565b6040805180830381600087803b15801561027f57600080fd5b505af19250505080156102cd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102ca91810190610ee1565b60015b610333573d8080156102fb576040519150601f19603f3d011682016040523d82523d6000602084013e610300565b606091505b5073ffffffffffffffffffffffffffffffffffffffff841661032157600080555b61032a8161073e565b92505050610337565b5050505b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b600061039684610660565b905060008060006103a687610668565b9250925092506103ba8383838960006103d6565b95508315610160576103cb87610699565b96505050505061038b565b600073ffffffffffffffffffffffffffffffffffffffff808616908716106103ff8787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836104258861070c565b73ffffffffffffffffffffffffffffffffffffffff881615610447578761046d565b856104665773fffd8963efd1fc6a506488495d951d5263988d2561046d565b6401000276a45b8c8b8d6040516020016104829392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016104b19594939291906110a5565b6040805180830381600087803b1580156104ca57600080fd5b505af1925050508015610518575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261051591810190610ee1565b60015b610333573d808015610546576040519150601f19603f3d011682016040523d82523d6000602084013e61054b565b606091505b5061032a8161073e565b60008313806105645750600082135b61056d57600080fd5b600080600061057b84610668565b9250925092506105ad7f00000000000000000000000000000000000000000000000000000000000000008484846107ef565b5060008060008089136105f3578573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610888a600003610628565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161089896000035b925092509250821561063f57604051818152602081fd5b6000541561065557600054811461065557600080fd5b604051828152602081fd5b516042111590565b600080806106768482610805565b9250610683846014610905565b9050610690846017610805565b91509193909250565b80516060906101759083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9016109f5565b60006107047f00000000000000000000000000000000000000000000000000000000000000006106ff868686610bdc565b610c59565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061073a57600080fd5b5090565b600081516020146107db5760448251101561078e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078590611111565b60405180910390fd5b600482019150818060200190518101906107a89190610f52565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078591906110f7565b818060200190518101906101759190610fbc565b600061033785610800868686610bdc565b610d8f565b60008182601401101561087957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b81601401835110156108ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b60008182600301101561097957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b81600301835110156109ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b60608182601f011015610a6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b828284011015610ada57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b81830184511015610b4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b606082158015610b6b5760405191506000825260208201604052610bd3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015610ba4578051835260209283019201610b8c565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b610be4610dbf565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161115610c1c579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1610610c9b57600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b6000610d9b8383610c59565b90503373ffffffffffffffffffffffffffffffffffffffff82161461017557600080fd5b604080516060810182526000808252602082018190529181019190915290565b600082601f830112610def578081fd5b8135610e02610dfd82611175565b611151565b818152846020838601011115610e16578283fd5b816020850160208301379081016020019190915292915050565b600080600080600060a08688031215610e47578081fd5b8535610e52816111e5565b94506020860135610e62816111e5565b9350604086013562ffffff81168114610e79578182fd5b9250606086013591506080860135610e90816111e5565b809150509295509295909350565b60008060408385031215610eb0578182fd5b823567ffffffffffffffff811115610ec6578283fd5b610ed285828601610ddf565b95602094909401359450505050565b60008060408385031215610ef3578182fd5b505080516020909101519092909150565b600080600060608486031215610f18578283fd5b8335925060208401359150604084013567ffffffffffffffff811115610f3c578182fd5b610f4886828701610ddf565b9150509250925092565b600060208284031215610f63578081fd5b815167ffffffffffffffff811115610f79578182fd5b8201601f81018413610f89578182fd5b8051610f97610dfd82611175565b818152856020838501011115610fab578384fd5b6103378260208301602086016111b5565b600060208284031215610fcd578081fd5b5051919050565b60008151808452610fec8160208601602086016111b5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116825260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166014820152921b166017820152602b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a060808301526110ec60a0830184610fd4565b979650505050505050565b60006020825261110a6020830184610fd4565b9392505050565b60208082526010908201527f556e6578706563746564206572726f7200000000000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561116d57fe5b604052919050565b600067ffffffffffffffff82111561118957fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b838110156111d05781810151838201526020016111b8565b838111156111df576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461120757600080fd5b5056fea26469706673582212204ba294eca0a366d4d8601eaa80323cb403aa01c4f4d2454757678b73f2acd97c64736f6c63430007060033` + +const uniswapQuote1 = `0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c45a01551161005b578063c45a0155146100d3578063cdca1753146100db578063f7729d43146100ee578063fa461e33146101015761007d565b80632f80bb1d1461008257806330d07f21146100ab5780634aa4a4fc146100be575b600080fd5b610095610090366004610e9e565b610116565b6040516100a29190611148565b60405180910390f35b6100956100b9366004610e30565b61017b565b6100c6610340565b6040516100a29190611084565b6100c6610364565b6100956100e9366004610e9e565b610388565b6100956100fc366004610e30565b6103d6565b61011461010f366004610f04565b610555565b005b60005b600061012484610660565b9050600080600061013487610668565b92509250925061014882848389600061017b565b955083156101605761015987610699565b965061016c565b85945050505050610175565b50505050610119565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff808616878216109083166101a65760008490555b6101b18787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836101d78861070c565b60000373ffffffffffffffffffffffffffffffffffffffff8816156101fc5787610222565b8561021b5773fffd8963efd1fc6a506488495d951d5263988d25610222565b6401000276a45b8b8b8e6040516020016102379392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016102669594939291906110a5565b6040805180830381600087803b15801561027f57600080fd5b505af19250505080156102cd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102ca91810190610ee1565b60015b610333573d8080156102fb576040519150601f19603f3d011682016040523d82523d6000602084013e610300565b606091505b5073ffffffffffffffffffffffffffffffffffffffff841661032157600080555b61032a8161073e565b92505050610337565b5050505b95945050505050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b60005b600061039684610660565b905060008060006103a687610668565b9250925092506103ba8383838960006103d6565b95508315610160576103cb87610699565b96505050505061038b565b600073ffffffffffffffffffffffffffffffffffffffff808616908716106103ff8787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836104258861070c565b73ffffffffffffffffffffffffffffffffffffffff881615610447578761046d565b856104665773fffd8963efd1fc6a506488495d951d5263988d2561046d565b6401000276a45b8c8b8d6040516020016104829392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016104b19594939291906110a5565b6040805180830381600087803b1580156104ca57600080fd5b505af1925050508015610518575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261051591810190610ee1565b60015b610333573d808015610546576040519150601f19603f3d011682016040523d82523d6000602084013e61054b565b606091505b5061032a8161073e565b60008313806105645750600082135b61056d57600080fd5b600080600061057b84610668565b9250925092506105ad7f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9848484846107ef565b5060008060008089136105f3578573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610888a600003610628565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161089896000035b925092509250821561063f57604051818152602081fd5b6000541561065557600054811461065557600080fd5b604051828152602081fd5b516042111590565b600080806106768482610805565b9250610683846014610905565b9050610690846017610805565b91509193909250565b80516060906101759083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9016109f5565b60006107047f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9846106ff868686610bdc565b610c59565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061073a57600080fd5b5090565b600081516020146107db5760448251101561078e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078590611111565b60405180910390fd5b600482019150818060200190518101906107a89190610f52565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078591906110f7565b818060200190518101906101759190610fbc565b600061033785610800868686610bdc565b610d8f565b60008182601401101561087957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b81601401835110156108ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b60008182600301101561097957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b81600301835110156109ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b60608182601f011015610a6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b828284011015610ada57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b81830184511015610b4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b606082158015610b6b5760405191506000825260208201604052610bd3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015610ba4578051835260209283019201610b8c565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b610be4610dbf565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161115610c1c579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1610610c9b57600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b6000610d9b8383610c59565b90503373ffffffffffffffffffffffffffffffffffffffff82161461017557600080fd5b604080516060810182526000808252602082018190529181019190915290565b600082601f830112610def578081fd5b8135610e02610dfd82611175565b611151565b818152846020838601011115610e16578283fd5b816020850160208301379081016020019190915292915050565b600080600080600060a08688031215610e47578081fd5b8535610e52816111e5565b94506020860135610e62816111e5565b9350604086013562ffffff81168114610e79578182fd5b9250606086013591506080860135610e90816111e5565b809150509295509295909350565b60008060408385031215610eb0578182fd5b823567ffffffffffffffff811115610ec6578283fd5b610ed285828601610ddf565b95602094909401359450505050565b60008060408385031215610ef3578182fd5b505080516020909101519092909150565b600080600060608486031215610f18578283fd5b8335925060208401359150604084013567ffffffffffffffff811115610f3c578182fd5b610f4886828701610ddf565b9150509250925092565b600060208284031215610f63578081fd5b815167ffffffffffffffff811115610f79578182fd5b8201601f81018413610f89578182fd5b8051610f97610dfd82611175565b818152856020838501011115610fab578384fd5b6103378260208301602086016111b5565b600060208284031215610fcd578081fd5b5051919050565b60008151808452610fec8160208601602086016111b5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116825260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166014820152921b166017820152602b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a060808301526110ec60a0830184610fd4565b979650505050505050565b60006020825261110a6020830184610fd4565b9392505050565b60208082526010908201527f556e6578706563746564206572726f7200000000000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561116d57fe5b604052919050565b600067ffffffffffffffff82111561118957fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b838110156111d05781810151838201526020016111b8565b838111156111df576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461120757600080fd5b5056fea164736f6c6343000706000a` + From 3612222f675cf2c0fcb6d77232c223174f6a6e7e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 21 Feb 2023 15:32:25 +0100 Subject: [PATCH 15/60] add getContractDataFromByteCode --- libs/remix-core-plugin/src/lib/compiler-artefacts.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index 6c3752b33d..4e9c55c87d 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -5,7 +5,7 @@ import { CompilerAbstract } from '@remix-project/remix-solidity' const profile = { name: 'compilerArtefacts', - methods: ['get', 'addResolvedContract', 'getCompilerAbstract', 'getAllContractDatas', 'getLastCompilationResult', 'getArtefactsByContractName', 'getContractDataFromAddress'], + methods: ['get', 'addResolvedContract', 'getCompilerAbstract', 'getAllContractDatas', 'getLastCompilationResult', 'getArtefactsByContractName', 'getContractDataFromAddress', 'getContractDataFromByteCode'], events: [], version: '0.0.1' } @@ -212,12 +212,16 @@ export class CompilerArtefacts extends Plugin { async getContractDataFromAddress (address) { const code = await this.call('blockchain', 'getCode', address) + return this.getContractDataFromByteCode(code) + } + + async getContractDataFromByteCode (code) { let found this.filterAllContractDatas((file, contractsData) => { for (const name of Object.keys(contractsData)) { const contract = contractsData[name] if (util.compareByteCode(code, '0x' + contract.evm.deployedBytecode.object)) { - found = { name, contract } + found = { name, contract, file } return true } } From 21195e46619a1277d8b084c7d92fb29091e2a971 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 21 Feb 2023 15:33:11 +0100 Subject: [PATCH 16/60] ensure url are converted to path --- libs/remix-core-plugin/src/lib/compiler-artefacts.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index 4e9c55c87d..b0b5820c6a 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -194,8 +194,9 @@ export class CompilerArtefacts extends Plugin { } } - getCompilerAbstract (file) { - return this.compilersArtefactsPerFile[file] + async getCompilerAbstract (file) { + const path = await this.call('fileManager', 'getPathFromUrl', file) + return this.compilersArtefactsPerFile[path.file] } addResolvedContract (address: string, compilerData: CompilerAbstract) { From f2d2d3d309926296794e82936f6b1db3f59f3a7f Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 21 Feb 2023 15:34:14 +0100 Subject: [PATCH 17/60] fix replacing immutable ref --- libs/remix-lib/src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-lib/src/util.ts b/libs/remix-lib/src/util.ts index b38df71993..205488c941 100644 --- a/libs/remix-lib/src/util.ts +++ b/libs/remix-lib/src/util.ts @@ -300,12 +300,12 @@ function removeByIndex (code, index, length, emptyRef) { function removeImmutableReference (code1, code2) { try { - const refOccurence = code2.match(/7f000000000000000000000000000000000000000000000000000000000000000073/g) + const refOccurence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g) if (!refOccurence) return code1 let offset = 0 refOccurence.map((value) => { offset = code2.indexOf(value, offset) - code1 = removeByIndex(code1, offset, value.length, '7f000000000000000000000000000000000000000000000000000000000000000073') + code1 = removeByIndex(code1, offset, value.length, '7f0000000000000000000000000000000000000000000000000000000000000000') offset = offset + 1 }) } catch (e) { From 7e2ca3de195ab93cdafacb99944576ae8291a190 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 21 Feb 2023 15:34:41 +0100 Subject: [PATCH 18/60] fix debugging with source code --- .../src/lib/compiler-fetch-and-compile.ts | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts index 2b63efc433..ed53f4fea0 100644 --- a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts +++ b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts @@ -43,7 +43,14 @@ export class FetchAndCompile extends Plugin { async resolve (contractAddress, codeAtAddress, targetPath) { contractAddress = toChecksumAddress(contractAddress) - const localCompilation = async () => await this.call('compilerArtefacts', 'get', contractAddress) ? await this.call('compilerArtefacts', 'get', contractAddress) : await this.call('compilerArtefacts', 'get', '__last') ? await this.call('compilerArtefacts', 'get', '__last') : null + const localCompilation = async () => { + const contractData = await this.call('compilerArtefacts', 'getContractDataFromByteCode', codeAtAddress) + if (contractData) { + return await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file) + } + else + return await this.call('compilerArtefacts', 'get', '__last') + } const resolved = await this.call('compilerArtefacts', 'get', contractAddress) if (resolved) return resolved @@ -87,20 +94,20 @@ export class FetchAndCompile extends Plugin { return localCompilation() } if (!network) return localCompilation() - if (!this.sourceVerifierNetWork.includes(network.name)) return localCompilation() - - // check if the contract if part of the local compilation result - const compilation = await localCompilation() - if (compilation) { - let found = false - compilation.visitContracts((contract) => { - found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress) - return found - }) - if (found) { - await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation) - setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0) - return compilation + if (!this.sourceVerifierNetWork.includes(network.name)) { + // check if the contract if part of the local compilation result + const compilation = await localCompilation() + if (compilation) { + let found = false + compilation.visitContracts((contract) => { + found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress) + return found + }) + if (found) { + await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation) + setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0) + return compilation + } } } From b45b454319c4d611c3de030bb0426ec7ca2328b4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 10:19:54 +0100 Subject: [PATCH 19/60] fix test --- libs/remix-lib/test/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-lib/test/util.ts b/libs/remix-lib/test/util.ts index 006485cb5c..2f4b63926a 100644 --- a/libs/remix-lib/test/util.ts +++ b/libs/remix-lib/test/util.ts @@ -106,7 +106,7 @@ tape('util.getInputParameters', function (t) { tape('util.compareByteCode uniswap onchain vs solidity local compilation result', function (t) { t.plan(1) - t.ok(util.compareByteCode(uniswapQuote2, uniswapQuote1), 'uniswap bytecode should be the same') + t.ok(util.compareByteCode(uniswapQuote1, uniswapQuote2), 'uniswap bytecode should be the same') }) const uniswapQuote2 = `0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c45a01551161005b578063c45a0155146100d3578063cdca1753146100db578063f7729d43146100ee578063fa461e33146101015761007d565b80632f80bb1d1461008257806330d07f21146100ab5780634aa4a4fc146100be575b600080fd5b610095610090366004610e9e565b610116565b6040516100a29190611148565b60405180910390f35b6100956100b9366004610e30565b61017b565b6100c6610340565b6040516100a29190611084565b6100c6610364565b6100956100e9366004610e9e565b610388565b6100956100fc366004610e30565b6103d6565b61011461010f366004610f04565b610555565b005b60005b600061012484610660565b9050600080600061013487610668565b92509250925061014882848389600061017b565b955083156101605761015987610699565b965061016c565b85945050505050610175565b50505050610119565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff808616878216109083166101a65760008490555b6101b18787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836101d78861070c565b60000373ffffffffffffffffffffffffffffffffffffffff8816156101fc5787610222565b8561021b5773fffd8963efd1fc6a506488495d951d5263988d25610222565b6401000276a45b8b8b8e6040516020016102379392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016102669594939291906110a5565b6040805180830381600087803b15801561027f57600080fd5b505af19250505080156102cd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102ca91810190610ee1565b60015b610333573d8080156102fb576040519150601f19603f3d011682016040523d82523d6000602084013e610300565b606091505b5073ffffffffffffffffffffffffffffffffffffffff841661032157600080555b61032a8161073e565b92505050610337565b5050505b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b600061039684610660565b905060008060006103a687610668565b9250925092506103ba8383838960006103d6565b95508315610160576103cb87610699565b96505050505061038b565b600073ffffffffffffffffffffffffffffffffffffffff808616908716106103ff8787876106ce565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830836104258861070c565b73ffffffffffffffffffffffffffffffffffffffff881615610447578761046d565b856104665773fffd8963efd1fc6a506488495d951d5263988d2561046d565b6401000276a45b8c8b8d6040516020016104829392919061101e565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016104b19594939291906110a5565b6040805180830381600087803b1580156104ca57600080fd5b505af1925050508015610518575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261051591810190610ee1565b60015b610333573d808015610546576040519150601f19603f3d011682016040523d82523d6000602084013e61054b565b606091505b5061032a8161073e565b60008313806105645750600082135b61056d57600080fd5b600080600061057b84610668565b9250925092506105ad7f00000000000000000000000000000000000000000000000000000000000000008484846107ef565b5060008060008089136105f3578573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610888a600003610628565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161089896000035b925092509250821561063f57604051818152602081fd5b6000541561065557600054811461065557600080fd5b604051828152602081fd5b516042111590565b600080806106768482610805565b9250610683846014610905565b9050610690846017610805565b91509193909250565b80516060906101759083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9016109f5565b60006107047f00000000000000000000000000000000000000000000000000000000000000006106ff868686610bdc565b610c59565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061073a57600080fd5b5090565b600081516020146107db5760448251101561078e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078590611111565b60405180910390fd5b600482019150818060200190518101906107a89190610f52565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078591906110f7565b818060200190518101906101759190610fbc565b600061033785610800868686610bdc565b610d8f565b60008182601401101561087957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b81601401835110156108ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b60008182600301101561097957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b81600301835110156109ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b60608182601f011015610a6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b828284011015610ada57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b81830184511015610b4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b606082158015610b6b5760405191506000825260208201604052610bd3565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015610ba4578051835260209283019201610b8c565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b610be4610dbf565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161115610c1c579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1610610c9b57600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b6000610d9b8383610c59565b90503373ffffffffffffffffffffffffffffffffffffffff82161461017557600080fd5b604080516060810182526000808252602082018190529181019190915290565b600082601f830112610def578081fd5b8135610e02610dfd82611175565b611151565b818152846020838601011115610e16578283fd5b816020850160208301379081016020019190915292915050565b600080600080600060a08688031215610e47578081fd5b8535610e52816111e5565b94506020860135610e62816111e5565b9350604086013562ffffff81168114610e79578182fd5b9250606086013591506080860135610e90816111e5565b809150509295509295909350565b60008060408385031215610eb0578182fd5b823567ffffffffffffffff811115610ec6578283fd5b610ed285828601610ddf565b95602094909401359450505050565b60008060408385031215610ef3578182fd5b505080516020909101519092909150565b600080600060608486031215610f18578283fd5b8335925060208401359150604084013567ffffffffffffffff811115610f3c578182fd5b610f4886828701610ddf565b9150509250925092565b600060208284031215610f63578081fd5b815167ffffffffffffffff811115610f79578182fd5b8201601f81018413610f89578182fd5b8051610f97610dfd82611175565b818152856020838501011115610fab578384fd5b6103378260208301602086016111b5565b600060208284031215610fcd578081fd5b5051919050565b60008151808452610fec8160208601602086016111b5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116825260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166014820152921b166017820152602b0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a060808301526110ec60a0830184610fd4565b979650505050505050565b60006020825261110a6020830184610fd4565b9392505050565b60208082526010908201527f556e6578706563746564206572726f7200000000000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561116d57fe5b604052919050565b600067ffffffffffffffff82111561118957fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b838110156111d05781810151838201526020016111b8565b838111156111df576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461120757600080fd5b5056fea26469706673582212204ba294eca0a366d4d8601eaa80323cb403aa01c4f4d2454757678b73f2acd97c64736f6c63430007060033` From 4acc88a976bbda0db264d3773ea40456cc7112e1 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 12:00:30 +0100 Subject: [PATCH 20/60] fix type --- libs/remix-simulator/src/provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 1c87e28105..264a9f7b4c 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -23,7 +23,7 @@ export class Provider { constructor (options: Record = {}) { this.options = options this.connected = true - this.vmContext = new VMContext(options['fork'] as string, options['nodeUrl'] as string, options['blockNumber'] as number) + this.vmContext = new VMContext(options['fork'] as string, options['nodeUrl'] as string, options['blockNumber'] as (number | 'latest')) this.Accounts = new Web3Accounts(this.vmContext) this.Transactions = new Transactions(this.vmContext) From cad986505db6642eedd8423466f0b2ea5be1e696 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 12:34:44 +0100 Subject: [PATCH 21/60] fix getting compiler abstract --- .../src/lib/compiler-artefacts.ts | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index b0b5820c6a..29552fa0f8 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -98,16 +98,17 @@ export class CompilerArtefacts extends Plugin { filterAllContractDatas (filter) { const contractsData = {} Object.keys(this.compilersArtefactsPerFile).map((targetFile) => { - const contracts = this.compilersArtefactsPerFile[targetFile].getContracts() + const artefact = this.compilersArtefactsPerFile[targetFile] + const contracts = artefact.getContracts() Object.keys(contracts).map((file) => { - if (filter(file, contracts[file])) contractsData[file] = contracts[file] + if (filter(file, contracts[file], artefact)) contractsData[file] = contracts[file] }) }) // making sure we save last compilation result in there if (this.compilersArtefacts.__last) { const contracts = this.compilersArtefacts.__last.getContracts() Object.keys(contracts).map((file) => { - if (filter(file, contracts[file])) contractsData[file] = contracts[file] + if (filter(file, contracts[file], this.compilersArtefacts.__last)) contractsData[file] = contracts[file] }) } return contractsData @@ -195,8 +196,19 @@ export class CompilerArtefacts extends Plugin { } async getCompilerAbstract (file) { + if (!file) return null + if (this.compilersArtefactsPerFile[file]) return this.compilersArtefactsPerFile[file] const path = await this.call('fileManager', 'getPathFromUrl', file) - return this.compilersArtefactsPerFile[path.file] + + if (path && path.file && this.compilersArtefactsPerFile[path.file])return this.compilersArtefactsPerFile[path.file] + + let artefact = null + this.filterAllContractDatas((localFile, data, parentArtefact) => { + if (localFile === file || (path && path.file && localFile === path.file)) { + artefact = parentArtefact + } + }) + return artefact } addResolvedContract (address: string, compilerData: CompilerAbstract) { From b945fae6bb1d21868358bd3efe8866c54016aeb6 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 16:04:47 +0100 Subject: [PATCH 22/60] fix linting --- libs/remix-core-plugin/src/lib/compiler-artefacts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index 29552fa0f8..b1f9ac9634 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -200,7 +200,7 @@ export class CompilerArtefacts extends Plugin { if (this.compilersArtefactsPerFile[file]) return this.compilersArtefactsPerFile[file] const path = await this.call('fileManager', 'getPathFromUrl', file) - if (path && path.file && this.compilersArtefactsPerFile[path.file])return this.compilersArtefactsPerFile[path.file] + if (path && path.file && this.compilersArtefactsPerFile[path.file]) return this.compilersArtefactsPerFile[path.file] let artefact = null this.filterAllContractDatas((localFile, data, parentArtefact) => { From 47cb8eaffe8a47c91cf5119371700e3d1c441d9e Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 15:48:44 +0100 Subject: [PATCH 23/60] fix asking permission if metamask is locked --- apps/remix-ide/src/app/providers/injected-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 55f50850d1..6ac6742e5f 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -38,7 +38,7 @@ export class InjectedProvider extends Plugin implements IProvider { throw new Error(noInjectedProviderMsg) } else { if (injectedProvider && injectedProvider._metamask && injectedProvider._metamask.isUnlocked) { - if (!await injectedProvider._metamask.isUnlocked()) throw new Error('Please make sure the injected provider is unlocked (e.g Metamask).') + if (!await injectedProvider._metamask.isUnlocked()) this.call('notification', 'toast', 'Please make sure the injected provider is unlocked (e.g Metamask).') } this.askPermission(true) } From c10940e0d53550b58ee14f78eedb86c3eb470eca Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 16:03:01 +0100 Subject: [PATCH 24/60] show msg if metamask not present --- apps/remix-ide/src/app/providers/injected-provider.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 6ac6742e5f..e745c44c4d 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -35,6 +35,7 @@ export class InjectedProvider extends Plugin implements IProvider { async init () { const injectedProvider = (window as any).ethereum if (injectedProvider === undefined) { + this.call('notification', 'toast', noInjectedProviderMsg) throw new Error(noInjectedProviderMsg) } else { if (injectedProvider && injectedProvider._metamask && injectedProvider._metamask.isUnlocked) { From 781083ca4b4a1fcc91336c5ce43635a0e35d2e14 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 22 Feb 2023 16:03:25 +0100 Subject: [PATCH 25/60] fix linting --- apps/remix-ide/src/app/providers/injected-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index e745c44c4d..f35d36cb72 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -35,7 +35,7 @@ export class InjectedProvider extends Plugin implements IProvider { async init () { const injectedProvider = (window as any).ethereum if (injectedProvider === undefined) { - this.call('notification', 'toast', noInjectedProviderMsg) + this.call('notification', 'toast', noInjectedProviderMsg) throw new Error(noInjectedProviderMsg) } else { if (injectedProvider && injectedProvider._metamask && injectedProvider._metamask.isUnlocked) { From fdfd8ff72128e6a58605e4a4cfed809eb75fec65 Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 22 Feb 2023 17:21:12 +0100 Subject: [PATCH 26/60] button in permission modal --- .../app/plugins/permission-handler-plugin.tsx | 221 +++++++++--------- .../src/lib/permission-dialog.tsx | 2 +- 2 files changed, 111 insertions(+), 112 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx b/apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx index 955baed702..62748a53af 100644 --- a/apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx @@ -6,131 +6,130 @@ import { PermissionHandlerDialog, PermissionHandlerValue } from '@remix-ui/permi import { Profile } from '@remixproject/plugin-utils' const profile = { - name: 'permissionhandler', - displayName: 'permissionhandler', - description: 'Plugin to handle permissions', - methods: ['askPermission'] + name: 'permissionhandler', + displayName: 'permissionhandler', + description: 'Plugin to handle permissions', + methods: ['askPermission'] } - export class PermissionHandlerPlugin extends Plugin { - permissions: any - currentVersion: number - fallbackMemory: boolean - constructor() { - super(profile) - this.fallbackMemory = false - this.permissions = this._getFromLocal() - this.currentVersion = 1 - // here we remove the old permissions saved before adding 'permissionVersion' - // since with v1 the structure has been changed because of new engine ^0.2.0-alpha.6 changes - if (!localStorage.getItem('permissionVersion')) { - localStorage.setItem('plugins/permissions', '') - localStorage.setItem('permissionVersion', this.currentVersion.toString()) - } + permissions: any + currentVersion: number + fallbackMemory: boolean + constructor() { + super(profile) + this.fallbackMemory = false + this.permissions = this._getFromLocal() + this.currentVersion = 1 + // here we remove the old permissions saved before adding 'permissionVersion' + // since with v1 the structure has been changed because of new engine ^0.2.0-alpha.6 changes + if (!localStorage.getItem('permissionVersion')) { + localStorage.setItem('plugins/permissions', '') + localStorage.setItem('permissionVersion', this.currentVersion.toString()) } + } - _getFromLocal() { - if (this.fallbackMemory) return this.permissions - const permission = localStorage.getItem('plugins/permissions') - return permission ? JSON.parse(permission) : {} - } + _getFromLocal() { + if (this.fallbackMemory) return this.permissions + const permission = localStorage.getItem('plugins/permissions') + return permission ? JSON.parse(permission) : {} + } - persistPermissions() { - const permissions = JSON.stringify(this.permissions) - try { - localStorage.setItem('plugins/permissions', permissions) - } catch (e) { - this.fallbackMemory = true - console.log(e) - } + persistPermissions() { + const permissions = JSON.stringify(this.permissions) + try { + localStorage.setItem('plugins/permissions', permissions) + } catch (e) { + this.fallbackMemory = true + console.log(e) } + } - switchMode (from: Profile, to: Profile, method: string, set: boolean) { - set - ? this.permissions[to.name][method][from.name] = {} - : delete this.permissions[to.name][method][from.name] - } + switchMode (from: Profile, to: Profile, method: string, set: boolean) { + set + ? this.permissions[to.name][method][from.name] = {} + : delete this.permissions[to.name][method][from.name] + } - clear() { - localStorage.removeItem('plugins/permissions') - } + clear() { + localStorage.removeItem('plugins/permissions') + } - notAllowWarning(from: Profile, to: Profile, method: string) { - return `${from.displayName || from.name} is not allowed to call ${method} method of ${to.displayName || to.name}.` - } + notAllowWarning(from: Profile, to: Profile, method: string) { + return `${from.displayName || from.name} is not allowed to call ${method} method of ${to.displayName || to.name}.` + } - async getTheme() { - return (await this.call('theme', 'currentTheme')).quality - } + async getTheme() { + return (await this.call('theme', 'currentTheme')).quality + } - /** - * Check if a plugin has the permission to call another plugin and askPermission if needed - * @param {PluginProfile} from the profile of the plugin that make the call - * @param {ModuleProfile} to The profile of the module that receive the call - * @param {string} method The name of the function to be called - * @param {string} message from the caller plugin to add more details if needed - * @returns {Promise} - */ - async askPermission(from: Profile, to: Profile, method: string, message: string, sensitiveCall: boolean) { - try { - this.permissions = this._getFromLocal() - if (!this.permissions[to.name]) this.permissions[to.name] = {} - if (!this.permissions[to.name][method]) this.permissions[to.name][method] = {} - if (!this.permissions[to.name][method][from.name]) return this.openPermission(from, to, method, message, sensitiveCall) + /** + * Check if a plugin has the permission to call another plugin and askPermission if needed + * @param {PluginProfile} from the profile of the plugin that make the call + * @param {ModuleProfile} to The profile of the module that receive the call + * @param {string} method The name of the function to be called + * @param {string} message from the caller plugin to add more details if needed + * @returns {Promise} + */ + async askPermission(from: Profile, to: Profile, method: string, message: string, sensitiveCall: boolean) { + try { + this.permissions = this._getFromLocal() + if (!this.permissions[to.name]) this.permissions[to.name] = {} + if (!this.permissions[to.name][method]) this.permissions[to.name][method] = {} + if (!this.permissions[to.name][method][from.name]) return this.openPermission(from, to, method, message, sensitiveCall) - const { allow, hash } = this.permissions[to.name][method][from.name] - if (!allow) { - const warning = this.notAllowWarning(from, to, method) - this.call('notification', 'toast', warning) - return false - } - return hash === from.hash - ? true // Allow - : await this.openPermission(from, to, method, message, sensitiveCall) - } catch (err) { - throw new Error(err) - } + const { allow, hash } = this.permissions[to.name][method][from.name] + if (!allow) { + const warning = this.notAllowWarning(from, to, method) + this.call('notification', 'toast', warning) + return false + } + return hash === from.hash + ? true // Allow + : await this.openPermission(from, to, method, message, sensitiveCall) + } catch (err) { + throw new Error(err) } + } - async openPermission(from: Profile, to: Profile, method: string, message: string, sensitiveCall: boolean) { - const remember = this.permissions[to.name][method][from.name] - const value: PermissionHandlerValue = { - from, - to, - method, - message, - remember, - sensitiveCall + async openPermission(from: Profile, to: Profile, method: string, message: string, sensitiveCall: boolean) { + const remember = this.permissions[to.name][method][from.name] + const value: PermissionHandlerValue = { + from, + to, + method, + message, + remember, + sensitiveCall + } + const modal: AppModal = { + id: 'PermissionHandler', + title: , + message: , + okLabel: , + cancelLabel: + } + + const result = await this.call('notification', 'modal', modal) + return new Promise((resolve, reject) => { + if (result) { + if (this.permissions[to.name][method][from.name]) { + this.permissions[to.name][method][from.name] = { + allow: true, + hash: from.hash + } + this.persistPermissions() } - const modal: AppModal = { - id: 'PermissionHandler', - title: , - message: , - okLabel: , - cancelLabel: + resolve(true) + } else { + if (this.permissions[to.name][method][from.name]) { + this.permissions[to.name][method][from.name] = { + allow: false, + hash: from.hash + } + this.persistPermissions() } - - const result = await this.call('notification', 'modal', modal) - return new Promise((resolve, reject) => { - if (result) { - if (this.permissions[to.name][method][from.name]) { - this.permissions[to.name][method][from.name] = { - allow: true, - hash: from.hash - } - this.persistPermissions() - } - resolve(true) - } else { - if (this.permissions[to.name][method][from.name]) { - this.permissions[to.name][method][from.name] = { - allow: false, - hash: from.hash - } - this.persistPermissions() - } - reject(this.notAllowWarning(from, to, method)) - } - }) - } + reject(this.notAllowWarning(from, to, method)) + } + }) + } } diff --git a/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx b/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx index cd8fd03291..802050244b 100644 --- a/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx +++ b/libs/remix-ui/permission-handler/src/lib/permission-dialog.tsx @@ -62,7 +62,7 @@ const PermissionHandlerDialog = (props: PermissionHandlerProps) => {
} - +
{feedback}
) From 13fddc45c52c5008ac71c36f44282b84ad9c87e4 Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 22 Feb 2023 17:46:25 +0100 Subject: [PATCH 27/60] proper focus for modal --- libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4d74918338..f60309c24e 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 @@ -98,7 +98,7 @@ export const ModalDialog = (props: ModalDialogProps) => { {/* todo add autofocus ^^ */} { props.okLabel &&
- {Object.keys(Hardfork).map((value, index) => { return })} From 5878ba8a6294863bcd53a4bea5c7e4dab892949d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 23 Feb 2023 08:00:54 +0100 Subject: [PATCH 29/60] flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c7acdc58c..341e8f1f18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.4.1 jobs: diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 2b75395e2a..665e50e3ed 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -24,7 +24,7 @@ module.exports = { .pause(1000) }, - 'Test Failed Import #group1': function (browser: NightwatchBrowser) { + 'Test Failed Import #group1 #flaky': function (browser: NightwatchBrowser) { browser.addFile('Untitled3.sol', sources[2]['Untitled3.sol']) .clickLaunchIcon('solidity') .click('[data-id="compilerContainerCompileBtn"]') @@ -32,7 +32,7 @@ module.exports = { selector: "//span[contains(.,'not found Untitled11')]", locateStrategy: 'xpath', timeout: 120000, - suppressNotFoundErrors: true + suppressNotFoundErrors: false }) }, From 2e1d934d66adc8bab7f89fa6af5f06fc365ea77f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 23 Feb 2023 08:01:17 +0100 Subject: [PATCH 30/60] config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 341e8f1f18..dcd0bce437 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: key: v1-deps-{{ checksum "yarn.lock" }} paths: - node_modules - - run: NX_BIN_URL=http://127.0.0.1:8080/assets/js NX_WASM_URL=http://127.0.0.1:8080/assets/js NPM_URL=http://localhost:9090/ yarn build:production + - run: NX_BIN_URL=http://127.0.0.1:8080/assets/js NX_WASM_URL=http://127.0.0.1:8080/assets/js NPM_URL=http://localhost:9090/ yarn build - run: yarn nx build remix-ide-e2e-src-local-plugin & yarn run build:libs - run: yarn nx run debugger:build:production - run: yarn nx run solidity-compiler:build:production From f190f538afb21bba19bd53b88ef725f922d9127a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 23 Feb 2023 08:09:02 +0100 Subject: [PATCH 31/60] fix test --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 665e50e3ed..3ec252a2ff 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -29,10 +29,9 @@ module.exports = { .clickLaunchIcon('solidity') .click('[data-id="compilerContainerCompileBtn"]') .isVisible({ - selector: "//span[contains(.,'not found Untitled11')]", + selector: "//span[contains(.,'not found /Untitled11')]", locateStrategy: 'xpath', timeout: 120000, - suppressNotFoundErrors: false }) }, From 038ea45188b97a77f1f1c0c6e1257d87c9398871 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 23 Feb 2023 08:15:40 +0100 Subject: [PATCH 32/60] undo config --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dcd0bce437..9c7acdc58c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.4.1 jobs: @@ -24,7 +24,7 @@ jobs: key: v1-deps-{{ checksum "yarn.lock" }} paths: - node_modules - - run: NX_BIN_URL=http://127.0.0.1:8080/assets/js NX_WASM_URL=http://127.0.0.1:8080/assets/js NPM_URL=http://localhost:9090/ yarn build + - run: NX_BIN_URL=http://127.0.0.1:8080/assets/js NX_WASM_URL=http://127.0.0.1:8080/assets/js NPM_URL=http://localhost:9090/ yarn build:production - run: yarn nx build remix-ide-e2e-src-local-plugin & yarn run build:libs - run: yarn nx run debugger:build:production - run: yarn nx run solidity-compiler:build:production From d11aed08cf7bebfe8c50531595027e92f2b4980a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 23 Feb 2023 08:16:28 +0100 Subject: [PATCH 33/60] rm flaky --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 3ec252a2ff..55d4ba96bd 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -24,7 +24,7 @@ module.exports = { .pause(1000) }, - 'Test Failed Import #group1 #flaky': function (browser: NightwatchBrowser) { + 'Test Failed Import #group1': function (browser: NightwatchBrowser) { browser.addFile('Untitled3.sol', sources[2]['Untitled3.sol']) .clickLaunchIcon('solidity') .click('[data-id="compilerContainerCompileBtn"]') From d0851b1b4d9fd5b53f274e7545b70f6ae0cbf17e Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 23 Feb 2023 18:51:22 +0530 Subject: [PATCH 34/60] fix copy bytecode --- libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index afc67f7370..43f18580dd 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -188,7 +188,8 @@ export const ContractSelection = (props: ContractSelectionProps) => { } const copyBytecode = () => { - return copyContractProperty('bytecode') + const bytecodeObj = JSON.parse(copyContractProperty('bytecode')) + return bytecodeObj.object } return ( From 1c799c19f76dfc6d5c3fe19cf67838a2f873f233 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 23 Feb 2023 19:09:09 +0530 Subject: [PATCH 35/60] fix tip and remove title --- .../solidity-compiler/src/lib/contract-selection.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index 43f18580dd..d9809d061c 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -245,14 +245,14 @@ export const ContractSelection = (props: ContractSelectionProps) => {
- - - - From 7f137518e6cceb75a3707988700942d6fc208bde Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 23 Feb 2023 15:17:05 +0100 Subject: [PATCH 36/60] remove the notification in sendAsync --- apps/remix-ide/src/app/providers/injected-provider.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index f35d36cb72..13d7793d7a 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -61,7 +61,6 @@ export class InjectedProvider extends Plugin implements IProvider { } try { if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" }); - if (!await (window as any).ethereum._metamask.isUnlocked()) this.call('notification', 'toast', 'Please make sure the injected provider is unlocked (e.g Metamask).') const resultData = await this.provider.currentProvider.send(data.method, data.params) resolve({ jsonrpc: '2.0', result: resultData.result, id: data.id }) } catch (error) { From 46441192f5cb067f3f4f06148ca346cbd77e7ff6 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 23 Feb 2023 11:38:35 +0100 Subject: [PATCH 37/60] corrected alert ngs --- .../src/assets/css/themes/bootstrap-cyborg.min.css | 12 ++++++------ .../src/assets/css/themes/remix-dark_tvx1s2.css | 2 +- .../src/assets/css/themes/remix-hacker_owl.css | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css b/apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css index ced466267d..918bbb71b7 100644 --- a/apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css +++ b/apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css @@ -8611,28 +8611,28 @@ legend { text-decoration:underline } .alert-primary { - background-color:#2a9fd6 + background-color:#2a9fd685 } .alert-secondary { background-color:#555 } .alert-success { - background-color:#77b300 + background-color:#77b3007a } .alert-info { - background-color:#93c + background-color:#9933cc91 } .alert-warning { - background-color:#f80 + background-color:#ff8800a1 } .alert-danger { - background-color:#c00 + background-color:#cc00009c } .alert-light { background-color:#222 } .alert-dark { - background-color:#adafae + background-color:#adafae99 } .badge-warning { color:#fff diff --git a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css index 5d59273a6b..a38163a92c 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css +++ b/apps/remix-ide/src/assets/css/themes/remix-dark_tvx1s2.css @@ -4481,7 +4481,7 @@ a.badge-dark:focus { } .alert-primary { color: #fff; - background-color: #5CBDEE; + background-color: #5cbdee94; border-color: #5CBDEE; } .alert-primary hr { diff --git a/apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css b/apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css index b5af4935ea..3db8d66dec 100644 --- a/apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css +++ b/apps/remix-ide/src/assets/css/themes/remix-hacker_owl.css @@ -13,7 +13,7 @@ --cyan: #355f7d; --white: #fff; --gray: #8B99A6; - --gray-dark: #343a40; + --gray-dark: #8694a1; --primary: #007aa6; --secondary: #0E2A3E; --success: #C4E07F; @@ -4491,7 +4491,7 @@ a.badge-dark:focus { } .alert-primary { color: #fff; - background-color: #5CBDEE; + background-color: #5cbdee94; border-color: #5CBDEE; } .alert-primary hr { From aad2dfbce8ea7fb0a2d6406da290c019d3168579 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 23 Feb 2023 13:07:47 +0100 Subject: [PATCH 38/60] improved Delete all modal --- .../src/app/tabs/locales/en/filePanel.json | 6 ++-- .../src/app/tabs/locales/zh/filePanel.json | 7 ++-- .../workspace/src/lib/remix-ui-workspace.tsx | 33 +++++++++++-------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index fa9e3500c1..b398cb5e0e 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -10,7 +10,8 @@ "filePanel.workspace.delete": "Delete Workspace", "filePanel.workspace.deleteConfirm": "Are you sure to delete the current workspace?", "filePanel.workspace.deleteAll": "Delete All Workspaces", - "filePanel.workspace.deleteAllConfirm": "Are you absolutely sure you want to delete all your workspaces? Deleted workspaces can not be restored in any manner.", + "filePanel.workspace.deleteAllConfirm1": "Are you absolutely sure you want to delete all your workspaces?", + "filePanel.workspace.deleteAllConfirm2": "Deleted workspaces can not be restored in any manner.", "filePanel.workspace.name": "Workspace name", "filePanel.workspace.chooseTemplate": "Choose a template", "filePanel.workspace.download": "Backup Workspaces", @@ -54,5 +55,6 @@ "filePanel.customizeTemplate": "Customize template", "filePanel.features": "Features", "filePanel.upgradeability": "Upgradeability", - "filePanel.ok": "OK" + "filePanel.ok": "OK", + "filePanel.cancel": "Cancel" } diff --git a/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json b/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json index 94129f0d31..5a9b02983c 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/zh/filePanel.json @@ -10,8 +10,8 @@ "filePanel.workspace.delete": "删除工作空间", "filePanel.workspace.deleteConfirm": "确定要删除当前工作空间?", "filePanel.workspace.deleteAll": "Delete All Workspaces", - "filePanel.workspace.deleteAllConfirm": "Are you absolutely sure you want to delete all your workspaces? Deleted workspaces can not be restored in any manner.", - "filePanel.workspace.name": "工作空间名称", + "filePanel.workspace.deleteAllConfirm1": "Are you absolutely sure you want to delete all your workspaces?", + "filePanel.workspace.deleteAllConfirm2": "Deleted workspaces can not be restored in any manner.", "filePanel.workspace.name": "工作空间名称", "filePanel.workspace.chooseTemplate": "选择一个工作空间模板", "filePanel.workspace.download": "下载工作空间", "filePanel.workspace.restore": "恢复工作空间", @@ -54,5 +54,6 @@ "filePanel.customizeTemplate": "自定义模板", "filePanel.features": "特点", "filePanel.upgradeability": "可升级性", - "filePanel.ok": "确认" + "filePanel.ok": "确认", + "filePanel.cancel": "Cancel" } 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 4a1f8fdd83..0bcf4d3ec9 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -73,11 +73,11 @@ export function Workspace () { }, [currentWorkspace]) const renameCurrentWorkspace = () => { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), renameModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishRenameWorkspace, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), renameModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishRenameWorkspace, intl.formatMessage({ id: 'filePanel.cancel' })) } const createWorkspace = () => { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), createModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishCreateWorkspace, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), createModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), onFinishCreateWorkspace, intl.formatMessage({ id: 'filePanel.cancel' })) } const deleteCurrentWorkspace = () => { @@ -86,17 +86,22 @@ export function Workspace () { intl.formatMessage({ id: 'filePanel.workspace.deleteConfirm' }), intl.formatMessage({ id: 'filePanel.ok' }), onFinishDeleteWorkspace, - '' + intl.formatMessage({ id: 'filePanel.cancel' }) ) } const deleteAllWorkspaces = () => { global.modal( intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }), - intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm' }), + <> +
+ {intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm1' })} + {intl.formatMessage({ id: 'filePanel.workspace.deleteAllConfirm2' })} +
+ , intl.formatMessage({ id: 'filePanel.ok' }), onFinishDeleteAllWorkspaces, - '' + intl.formatMessage({ id: 'filePanel.cancel' }) ) } @@ -106,7 +111,7 @@ export function Workspace () { cloneModalMessage(), intl.formatMessage({ id: 'filePanel.ok' }), handleTypingUrl, - '' + intl.formatMessage({ id: 'filePanel.cancel' }) ) } @@ -146,7 +151,7 @@ export function Workspace () { try { await global.dispatchRenameWorkspace(currentWorkspace, workspaceName) } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.rename' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) console.error(e) } } @@ -172,7 +177,7 @@ export function Workspace () { try { await global.dispatchCreateWorkspace(workspaceName, workspaceTemplateName, opts, initGitRepo) } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.create' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) console.error(e) } } @@ -181,7 +186,7 @@ export function Workspace () { try { await global.dispatchDeleteWorkspace(global.fs.browser.currentWorkspace) } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.delete' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.delete' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) console.error(e) } } @@ -190,7 +195,7 @@ export function Workspace () { try { await global.dispatchDeleteAllWorkspaces() } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.deleteAll' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) console.error(e) } } @@ -204,7 +209,7 @@ export function Workspace () { await global.dispatchSwitchToWorkspace(name) global.dispatchHandleExpandPath([]) } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.workspace.switch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, '') + global.modal(intl.formatMessage({ id: 'filePanel.workspace.switch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) console.error(e) } } @@ -240,7 +245,7 @@ export function Workspace () { intl.formatMessage({ id: 'filePanel.workspace.cloneMessage' }), intl.formatMessage({ id: 'filePanel.ok' }), () => {}, - '' + intl.formatMessage({ id: 'filePanel.cancel' }) ) } } @@ -279,7 +284,7 @@ export function Workspace () { } } catch (e) { console.error(e) - global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}) + global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) } } @@ -288,7 +293,7 @@ export function Workspace () { await global.dispatchCreateNewBranch(branchFilter) _paq.push(['trackEvent', 'Workspace', 'GIT', 'switch_to_new_branch']) } catch (e) { - global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}) + global.modal(intl.formatMessage({ id: 'filePanel.checkoutGitBranch' }), e.message, intl.formatMessage({ id: 'filePanel.ok' }), () => {}, intl.formatMessage({ id: 'filePanel.cancel' })) } } From d3a66ab340fd9c4ae057c8bfd5e137aa0abce19f Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 23 Feb 2023 14:18:08 +0100 Subject: [PATCH 39/60] Line distance increased for compilation details --- libs/remix-ui/solidity-compiler/src/lib/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/css/style.css b/libs/remix-ui/solidity-compiler/src/lib/css/style.css index 892dc26e0b..dbf0fc47d0 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/css/style.css +++ b/libs/remix-ui/solidity-compiler/src/lib/css/style.css @@ -137,7 +137,7 @@ .remixui_log { display: flex; flex-direction: column; - margin-bottom: 5%; + margin-bottom: 0.5rem; overflow: visible; } .remixui_key { From 0b5f29131c8051fb8ce0cb4ec142466840c2c101 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 27 Feb 2023 10:55:36 +0100 Subject: [PATCH 40/60] disable "deploy" if no account is selected --- .../remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx | 1 + libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 3 ++- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 1 + libs/remix-ui/run-tab/src/lib/types/index.ts | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx index 6828170172..ef9d7fb720 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx @@ -319,6 +319,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) { isValidProxyAddress={props.isValidProxyAddress} isValidProxyUpgrade={isValidProxyUpgrade} modal={props.modal} + disabled={props.selectedAccount === ''} />
{buttonOptions.content} diff --git a/libs/remix-ui/run-tab/src/lib/run-tab.tsx b/libs/remix-ui/run-tab/src/lib/run-tab.tsx index d01c86d6c4..ae5474e492 100644 --- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx +++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx @@ -223,6 +223,7 @@ export function RunTabUI (props: RunTabProps) { passphrase={runTab.passphrase} /> JSX.Element export interface ContractDropdownProps { + selectedAccount: string, exEnvironment: string, contracts: { contractList: ContractList, From e5c6921d93291fa20199f4d2637cf1474e40b80b Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 27 Feb 2023 11:54:10 +0100 Subject: [PATCH 41/60] fix using compareByteCode --- apps/remix-ide/src/app/tabs/debugger-tab.js | 4 ---- libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/debugger-tab.js b/apps/remix-ide/src/app/tabs/debugger-tab.js index 8d357acc65..2d49dcc6c7 100644 --- a/apps/remix-ide/src/app/tabs/debugger-tab.js +++ b/apps/remix-ide/src/app/tabs/debugger-tab.js @@ -45,10 +45,6 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) { this.call('notification', 'toast', notFoundToastMsg(contractAddress)) }) - this.on('fetchAndCompile', 'usingLocalCompilation', (contractAddress) => { - this.call('notification', 'toast', localCompilationToastMsg()) - }) - this.on('fetchAndCompile', 'sourceVerificationNotAvailable', () => { this.call('notification', 'toast', sourceVerificationNotAvailableToastMsg()) }) diff --git a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts index ed53f4fea0..810faadd2c 100644 --- a/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts +++ b/libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts @@ -100,12 +100,11 @@ export class FetchAndCompile extends Plugin { if (compilation) { let found = false compilation.visitContracts((contract) => { - found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress) + found = util.compareByteCode(codeAtAddress, '0x' + contract.object.evm.deployedBytecode.object) return found }) if (found) { await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation) - setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0) return compilation } } From 40f907d95febe0c8a7c480f4c4ad9f355030c22d Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 23 Feb 2023 17:18:39 +0100 Subject: [PATCH 42/60] set the provider only when it is initiated --- .../src/tests/transactionExecution.test.ts | 49 ++++++++++++++++++- apps/remix-ide/src/blockchain/providers/vm.js | 33 +++++++------ .../src/blockchain/providers/worker-vm.ts | 13 ++++- 3 files changed, 78 insertions(+), 17 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts index f22f843e9e..d91ec90bee 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts @@ -213,7 +213,28 @@ module.exports = { 'uint256 num': '24' } }) - .end() + }, + + 'Should switch to the mainnet VM fork and execute a tx to query ENS #group5': function (browser: NightwatchBrowser) { + let addressRef + browser + .addFile('mainnet_ens.sol', sources[7]['mainnet_ens.sol']) + .clickLaunchIcon('solidity') + .setSolidityCompilerVersion('soljson-v0.8.17+commit.8df45f5f.js') + .clickLaunchIcon('udapp') + .switchEnvironment('vm-mainnet-fork') + .waitForElementPresent('select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') // wait for the udapp to load the list of accounts + .selectContract('MyResolver') + .createContract('') + .clickInstance(0) + .getAddressAtPosition(0, (address) => { + addressRef = address + }) + .clickFunction('resolve - call') + .perform((done) => { + browser.verifyCallReturnValue(addressRef, ['0:address: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045']) + .perform(() => done()) + }) } } @@ -431,5 +452,31 @@ contract C { } }` } + }, { + 'mainnet_ens.sol': { + content: + ` + import "https://github.com/ensdomains/ens-contracts/blob/master/contracts/utils/NameEncoder.sol"; + + abstract contract ENS { + function resolver(bytes32 node) public virtual view returns (Resolver); + } + + abstract contract Resolver { + function addr(bytes32 node) public virtual view returns (address); + } + + contract MyResolver { + // Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks; + ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e); + + function resolve() public view returns(address) { + (,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth"); + Resolver resolver = ens.resolver(node); + return resolver.addr(node); + } + } + ` + } } ] diff --git a/apps/remix-ide/src/blockchain/providers/vm.js b/apps/remix-ide/src/blockchain/providers/vm.js index 96466065ca..a4a600bbf8 100644 --- a/apps/remix-ide/src/blockchain/providers/vm.js +++ b/apps/remix-ide/src/blockchain/providers/vm.js @@ -24,27 +24,30 @@ class VMProvider { this.worker = new Worker(new URL('./worker-vm', import.meta.url)) const provider = this.executionContext.getProviderObject() - this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']}) - let incr = 0 const stamps = {} this.worker.addEventListener('message', (msg) => { - if (stamps[msg.data.stamp]) { + if (msg.data.cmd === 'sendAsyncResult' && stamps[msg.data.stamp]) { stamps[msg.data.stamp](msg.data.error, msg.data.result) + } else if (msg.data.cmd === 'initiateResult') { + if (!msg.data.error) { + this.provider = { + sendAsync: (query, callback) => { + const stamp = Date.now() + incr + incr++ + stamps[stamp] = callback + this.worker.postMessage({ cmd: 'sendAsync', query, stamp }) + } + } + this.web3 = new Web3(this.provider) + extend(this.web3) + this.accounts = {} + this.executionContext.setWeb3(this.executionContext.getProvider(), this.web3) + } } }) - this.provider = { - sendAsync: (query, callback) => { - const stamp = Date.now() + incr - incr++ - stamps[stamp] = callback - this.worker.postMessage({ cmd: 'sendAsync', query, stamp }) - } - } - this.web3 = new Web3(this.provider) - extend(this.web3) - this.accounts = {} - this.executionContext.setWeb3(this.executionContext.getProvider(), this.web3) + + this.worker.postMessage({ cmd: 'init', fork: this.executionContext.getCurrentFork(), nodeUrl: provider?.options['nodeUrl'], blockNumber: provider?.options['blockNumber']}) } // TODO: is still here because of the plugin API diff --git a/apps/remix-ide/src/blockchain/providers/worker-vm.ts b/apps/remix-ide/src/blockchain/providers/worker-vm.ts index 55ebb013a1..7473e6ce37 100644 --- a/apps/remix-ide/src/blockchain/providers/worker-vm.ts +++ b/apps/remix-ide/src/blockchain/providers/worker-vm.ts @@ -7,7 +7,18 @@ self.onmessage = (e: MessageEvent) => { case 'init': { provider = new Provider({ fork: data.fork, nodeUrl: data.nodeUrl, blockNumber: data.blockNumber }) - if (provider) provider.init() + provider.init().then(() => { + self.postMessage({ + cmd: 'initiateResult', + stamp: data.stamp + }) + }).catch((error) => { + self.postMessage({ + cmd: 'initiateResult', + error, + stamp: data.stamp + }) + }) break } case 'sendAsync': From a03758a7407bf8c412ad2dbdd6e394c8db96115a Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 27 Feb 2023 15:44:02 +0100 Subject: [PATCH 43/60] fix social icons breaking rank --- .../home-tab/src/lib/components/homeTabTitle.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 93808e3e00..7861d95bf6 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -68,7 +68,7 @@ function HomeTabTitle() { >
- + + className="border-0 h-100 btn fab fa-youtube p-1 pl-2"> @@ -97,7 +97,7 @@ function HomeTabTitle() { openLink("https://twitter.com/EthereumRemix") _paq.push(['trackEvent', 'hometab', 'socialMedia', 'twitter']) }} - className="border-0 p-2 h-100 pl-2 btn fab fa-twitter"> + className="border-0 p-1 h-100 pl-2 btn fab fa-twitter"> @@ -113,7 +113,7 @@ function HomeTabTitle() { openLink("https://www.linkedin.com/company/ethereum-remix/") _paq.push(['trackEvent', 'hometab', 'socialmedia', 'linkedin']) }} - className="border-0 p-2 h-100 pl-2 btn fa fa-linkedin"> + className="border-0 p-1 h-100 pl-2 btn fa fa-linkedin"> @@ -129,7 +129,7 @@ function HomeTabTitle() { openLink("https://medium.com/remix-ide") _paq.push(['trackEvent', 'hometab', 'socialmedia', 'medium']) }} - className="border-0 p-2 h-100 pl-2 btn fab fa-medium"> + className="border-0 p-1 h-100 pl-2 btn fab fa-medium"> @@ -145,7 +145,7 @@ function HomeTabTitle() { openLink("https://discord.gg/mh9hFCKkEq") _paq.push(['trackEvent', 'hometab', 'socialmedia', 'discord']) }} - className="border-0 h-100 p-2 btn fab fa-discord"> + className="border-0 h-100 p-1 pr-2 btn fab fa-discord"> From 87a0fe573378a9b38de58f37b5985b4ef6caac1e Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 27 Feb 2023 21:31:30 +0530 Subject: [PATCH 44/60] bump remixd --- libs/remixd/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remixd/package.json b/libs/remixd/package.json index c3754c91f5..dbf2926dd7 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remixd", - "version": "0.6.11", + "version": "0.6.12", "description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)", "main": "index.js", "types": "./index.d.ts", From 6d694c4fe0e78b2d14d158a9c1f164cd2f985822 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 27 Feb 2023 21:34:39 +0530 Subject: [PATCH 45/60] remove console log --- libs/remix-simulator/src/vm-context.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-simulator/src/vm-context.ts b/libs/remix-simulator/src/vm-context.ts index dc420c931a..5ee49e6cc2 100644 --- a/libs/remix-simulator/src/vm-context.ts +++ b/libs/remix-simulator/src/vm-context.ts @@ -168,7 +168,6 @@ export class VMContext { async createVm (hardfork) { let stateManager: StateManager - console.log('creating a new VM', hardfork, this.nodeUrl, this.blockNumber) if (this.nodeUrl) { let block = this.blockNumber if (this.blockNumber === 'latest') { From 41e98e190b70a92b6f7dceadc8d917a8da16149a Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 27 Feb 2023 21:41:34 +0530 Subject: [PATCH 46/60] publish remix libs --- libs/ghaction-helper/package.json | 12 +++++++----- libs/remix-analyzer/package.json | 8 ++++---- libs/remix-astwalker/package.json | 6 +++--- libs/remix-debug/package.json | 12 ++++++------ libs/remix-lib/package.json | 6 +++--- libs/remix-simulator/package.json | 6 +++--- libs/remix-solidity/package.json | 6 +++--- libs/remix-tests/package.json | 10 +++++----- libs/remix-url-resolver/package.json | 4 ++-- libs/remix-ws-templates/package.json | 4 ++-- 10 files changed, 38 insertions(+), 36 deletions(-) diff --git a/libs/ghaction-helper/package.json b/libs/ghaction-helper/package.json index b9f6995076..b1f397657a 100644 --- a/libs/ghaction-helper/package.json +++ b/libs/ghaction-helper/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/ghaction-helper", - "version": "0.1.5", + "version": "0.1.6", "description": "Solidity Tests GitHub Action Helper", "main": "src/index.js", "scripts": { @@ -19,14 +19,16 @@ }, "homepage": "https://github.com/ethereum/remix-project#readme", "devDependencies": { - "@remix-project/remix-solidity": "^0.5.9", + "@remix-project/remix-solidity": "^0.5.10", "@types/chai": "^4.3.4", "typescript": "^4.9.3" }, "dependencies": { "@ethereum-waffle/chai": "^3.4.4", + "@remix-project/remix-simulator": "^0.2.24", "chai": "^4.3.7", - "ethers": "^5.7.2", - "@remix-project/remix-simulator": "^0.2.21" - } + "ethers": "^5.7.2" + }, + "types": "./src/index.d.ts", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23" } \ No newline at end of file diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index 5f5fd5846e..e9b700f0ad 100644 --- a/libs/remix-analyzer/package.json +++ b/libs/remix-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-analyzer", - "version": "0.5.32", + "version": "0.5.33", "description": "Tool to perform static analysis on Solidity smart contracts", "scripts": { "test": "./../../node_modules/.bin/ts-node --project ../../tsconfig.base.json --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts" @@ -25,8 +25,8 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-astwalker": "^0.0.53", - "@remix-project/remix-lib": "^0.5.23", + "@remix-project/remix-astwalker": "^0.0.54", + "@remix-project/remix-lib": "^0.5.24", "async": "^2.6.2", "ethers": "^5.4.2", "ethjs-util": "^0.1.6", @@ -50,6 +50,6 @@ "typescript": "^3.7.5" }, "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23", "main": "./src/index.js" } \ No newline at end of file diff --git a/libs/remix-astwalker/package.json b/libs/remix-astwalker/package.json index cf10d5915e..50101ee834 100644 --- a/libs/remix-astwalker/package.json +++ b/libs/remix-astwalker/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-astwalker", - "version": "0.0.53", + "version": "0.0.54", "description": "Tool to walk through Solidity AST", "main": "src/index.js", "scripts": { @@ -37,7 +37,7 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-lib": "^0.5.23", + "@remix-project/remix-lib": "^0.5.24", "@types/tape": "^4.2.33", "async": "^2.6.2", "ethers": "^5.4.2", @@ -53,6 +53,6 @@ "tap-spec": "^5.0.0" }, "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-debug/package.json b/libs/remix-debug/package.json index 61d2d08325..868fe3d4b5 100644 --- a/libs/remix-debug/package.json +++ b/libs/remix-debug/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-debug", - "version": "0.5.23", + "version": "0.5.24", "description": "Tool to debug Ethereum transactions", "contributors": [ { @@ -26,10 +26,10 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-astwalker": "^0.0.53", - "@remix-project/remix-lib": "^0.5.23", - "@remix-project/remix-simulator": "^0.2.23", - "@remix-project/remix-solidity": "^0.5.9", + "@remix-project/remix-astwalker": "^0.0.54", + "@remix-project/remix-lib": "^0.5.24", + "@remix-project/remix-simulator": "^0.2.24", + "@remix-project/remix-solidity": "^0.5.10", "ansi-gray": "^0.1.1", "async": "^2.6.2", "color-support": "^1.1.3", @@ -69,6 +69,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme", "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-lib/package.json b/libs/remix-lib/package.json index e6b0f8208f..12e47f9839 100644 --- a/libs/remix-lib/package.json +++ b/libs/remix-lib/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-lib", - "version": "0.5.23", + "version": "0.5.24", "description": "Library to various Remix tools", "contributors": [ { @@ -17,8 +17,8 @@ "test": "./../../node_modules/.bin/ts-node --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts" }, "dependencies": { - "async": "^2.1.2", "@ethereumjs/util": "^8.0.3", + "async": "^2.1.2", "ethers": "^4.0.40", "ethjs-util": "^0.1.6", "events": "^3.0.0", @@ -51,6 +51,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme", "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index 86ed0b5851..6d07ab48b6 100644 --- a/libs/remix-simulator/package.json +++ b/libs/remix-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-simulator", - "version": "0.2.23", + "version": "0.2.24", "description": "Ethereum IDE and tools for the web", "contributors": [ { @@ -22,7 +22,7 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-lib": "^0.5.23", + "@remix-project/remix-lib": "^0.5.24", "ansi-gray": "^0.1.1", "async": "^3.1.0", "body-parser": "^1.18.2", @@ -67,6 +67,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme", "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0", + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23", "types": "./src/index.d.ts" } \ No newline at end of file diff --git a/libs/remix-solidity/package.json b/libs/remix-solidity/package.json index a5a41100b8..83c8882dc5 100644 --- a/libs/remix-solidity/package.json +++ b/libs/remix-solidity/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-solidity", - "version": "0.5.9", + "version": "0.5.10", "description": "Tool to load and run Solidity compiler", "main": "src/index.js", "types": "src/index.d.ts", @@ -19,7 +19,7 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-lib": "^0.5.23", + "@remix-project/remix-lib": "^0.5.24", "async": "^2.6.2", "eslint-scope": "^5.0.0", "ethers": "^5.4.2", @@ -57,5 +57,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme", "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0" + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23" } \ No newline at end of file diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index 17bebaaabe..a395848323 100644 --- a/libs/remix-tests/package.json +++ b/libs/remix-tests/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-tests", - "version": "0.2.23", + "version": "0.2.24", "description": "Tool to test Solidity smart contracts", "main": "src/index.js", "types": "./src/index.d.ts", @@ -41,9 +41,9 @@ "@ethereumjs/tx": "^4.0.2", "@ethereumjs/util": "^8.0.3", "@ethereumjs/vm": "^6.3.0", - "@remix-project/remix-lib": "^0.5.23", - "@remix-project/remix-simulator": "^0.2.23", - "@remix-project/remix-solidity": "^0.5.9", + "@remix-project/remix-lib": "^0.5.24", + "@remix-project/remix-simulator": "^0.2.24", + "@remix-project/remix-solidity": "^0.5.10", "@remix-project/remix-url-resolver": "^0.0.42", "ansi-gray": "^0.1.1", "async": "^2.6.0", @@ -78,5 +78,5 @@ "typescript": "^3.3.1" }, "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0" + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23" } \ No newline at end of file diff --git a/libs/remix-url-resolver/package.json b/libs/remix-url-resolver/package.json index 2cae054c65..d66a834954 100644 --- a/libs/remix-url-resolver/package.json +++ b/libs/remix-url-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-url-resolver", - "version": "0.0.45", + "version": "0.0.46", "description": "Solidity import url resolver engine", "main": "src/index.js", "types": "src/index.d.ts", @@ -40,5 +40,5 @@ "typescript": "^3.1.6" }, "typings": "src/index.d.ts", - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0" + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23" } \ No newline at end of file diff --git a/libs/remix-ws-templates/package.json b/libs/remix-ws-templates/package.json index 8f4058b563..84a5448aad 100644 --- a/libs/remix-ws-templates/package.json +++ b/libs/remix-ws-templates/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-ws-templates", - "version": "1.0.10", + "version": "1.0.11", "description": "Create a Remix IDE workspace using different templates", "main": "src/index.js", "types": "src/index.d.ts", @@ -25,5 +25,5 @@ "ethers": "^5.4.2", "web3": "^1.5.1" }, - "gitHead": "69af4eddd1ba47f76a71c78077d453deb572b1a0" + "gitHead": "c1415e0c3751af8bf53292d67fedf68e15bf3b23" } \ No newline at end of file From c033bfd22c72fd3b0c059170019e40b021f6b3cd Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Tue, 28 Feb 2023 13:02:38 +0530 Subject: [PATCH 47/60] bump dev version to 0.32.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d9400656d..2e1e8e505a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.31.0-dev", + "version": "0.32.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "keywords": [ From 70a7716b27a3d995afa46eb05d89351c7db2e37a Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 28 Feb 2023 17:59:59 +0100 Subject: [PATCH 48/60] Updated logo for browser tab title to colored one --- .../src/assets/img/remix-logo-blue.png | Bin 0 -> 15967 bytes apps/remix-ide/src/index.html | 2 +- apps/remix-ide/src/webpack.index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 apps/remix-ide/src/assets/img/remix-logo-blue.png diff --git a/apps/remix-ide/src/assets/img/remix-logo-blue.png b/apps/remix-ide/src/assets/img/remix-logo-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..cc79f5ece6ad259ef39bf25bea01b44c3dce0f0a GIT binary patch literal 15967 zcmd6OhgVb2^Y$hL2+~1%mm(h#P^r?DX6P0`2t`5Zq4ye4K~X@0fPfS=3P^9E7ez&S zksc5b1tNsr>+kCKZ+Opna}I|mduE@VnVq|LGrRM|#7LL^6!$3r06prO)(rsQ5QGCH z74&a2aBv?0L4eY_ax3r^d6K$@&$RaIngU+qs`%@(m3<)|dd%-6Oz|{G8`|xhk*DJ9 zEvL*hv}@QA=f%(6xP?b?l*mT*U5RB9d||?J73G~RI+c={bko71w^06MYU9<}*RNz; z9abtvlwF7SQ=kF=pMAtVMpdS~2BmABY1HXlv;1bMt}}4By>lJMzBFHG^FsFf@o_Ak zV`=5PXk*s_xHf3c$Xh-s9Egd`lN5Ds!2cFCEG_vWBI#l~T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qr+Ks~r&piB@k_|^@I9uKNa^*2yx8dxDmjRypROkMi>qPM5DFL^1o?!(#kU)}5LB{_ljA)@&ins?=v?;UDve0EQP%DJU;qX0nf@%NLUcGM4S=?z(*K?hh)Vc1JL!9>A9FvL=FND`qZy#SS}n!LQZXI zLBgCNVd#PkRQ!ne3<>8!!gO&=Opx_C)KD=e=T!|WNEo`Ng#C$xc|pQ18US<%As%Ya zGY&ok;Ds&{39UVU>ooJCnWi~1)lFpJz=Tf-dS683z#s~RhggUHJql=2K%+2177~VT ztbsggp&Tf(G@ul=Mi>&d1u?5YYHXcBY)1D8tU}C#2}~yRnd;LJvlEq24lm>(h`EpV zs>VgAACx)Cv3Q962r)-80qh(zd|!8-5upXZp&+6QvIO}IfL%>wAVk3ggM(>vq9%YK z4Fqk`{~$9QFzFDl{%z%gpb`2X6oR1HvJkdM;PGh~KuV7=L9W+=$UX~I|AX-m6i)pM zMX(SQ-TDWi`ohm=hyFoG_s{=T{e#gElt}&uA;*4}-2Mk+At*ik4??_nA;Lch@#3Ln z5#qfE@!~~&k&sU=U4d#+S z^na~iA;|ydU+WwM)&BfzrG>gRY(izMhmk3Q0PN-egX|D*&^exetq|Nh_rKONP%F>B zfhDy8SXVIltBxh4Z>8qcUnMJ{Rmq8w1HPTKX@Md_(*XWI{anKx3p{?eb6qm`(&Aqg NQQAgY#aHh{{U1ati~Rrq literal 0 HcmV?d00001 diff --git a/apps/remix-ide/src/index.html b/apps/remix-ide/src/index.html index d8fb23c3d8..a7a99db6c2 100644 --- a/apps/remix-ide/src/index.html +++ b/apps/remix-ide/src/index.html @@ -26,7 +26,7 @@ Remix - Ethereum IDE - + diff --git a/apps/remix-ide/src/webpack.index.html b/apps/remix-ide/src/webpack.index.html index 8e1f7b6db1..8730060d64 100644 --- a/apps/remix-ide/src/webpack.index.html +++ b/apps/remix-ide/src/webpack.index.html @@ -26,7 +26,7 @@ Remix - Ethereum IDE - + From 6bbcb1be10d0f0e23137579c7aa9c513eba4aef9 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 28 Feb 2023 19:19:33 +0100 Subject: [PATCH 49/60] rm-ing apps/remix-ide/src/webpack.index.html --- apps/remix-ide/src/webpack.index.html | 45 --------------------------- 1 file changed, 45 deletions(-) delete mode 100644 apps/remix-ide/src/webpack.index.html diff --git a/apps/remix-ide/src/webpack.index.html b/apps/remix-ide/src/webpack.index.html deleted file mode 100644 index 8730060d64..0000000000 --- a/apps/remix-ide/src/webpack.index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - Remix - Ethereum IDE - - - - - - - - - - - -
- - - - - \ No newline at end of file From 86315dde81b9b443f811e2458cf2be6961d7083e Mon Sep 17 00:00:00 2001 From: lianahus Date: Wed, 1 Mar 2023 12:48:36 +0100 Subject: [PATCH 50/60] Focus on Home after refresh --- apps/remix-ide/src/app.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 1386443818..cca71d7632 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -119,8 +119,6 @@ class AppComponent { this.engine = new RemixEngine() this.engine.register(appManager); - - const matomoDomains = { 'remix-alpha.ethereum.org': 27, 'remix-beta.ethereum.org': 25, @@ -450,7 +448,11 @@ class AppComponent { if ( this.appManager.pluginLoader.current === 'queryParams' && this.workspace.length > 0 - ) { this.menuicons.select(this.workspace[this.workspace.length - 1]) } + ) { + this.menuicons.select(this.workspace[this.workspace.length - 1]) + } else { + this.appManager.call('tabs', 'focus', 'home') + } } if (params.call) { @@ -484,19 +486,16 @@ class AppComponent { } } } - - }) .catch(console.error) } const loadedElement = document.createElement('span') loadedElement.setAttribute('data-id', 'apploaded') document.body.appendChild(loadedElement) - }) + // activate solidity plugin this.appManager.activatePlugin(['solidity', 'udapp', 'deploy-libraries', 'link-libraries', 'openzeppelin-proxy']) - // Load and start the service who manager layout and frame } } From 30115b42b7e308bf2596c92fe22d071c914fcccd Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 1 Mar 2023 21:03:05 +0100 Subject: [PATCH 51/60] fix using custom provider --- apps/remix-ide/src/app/providers/injected-provider.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 13d7793d7a..3ba3efd94e 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -61,8 +61,11 @@ export class InjectedProvider extends Plugin implements IProvider { } try { if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" }); - const resultData = await this.provider.currentProvider.send(data.method, data.params) - resolve({ jsonrpc: '2.0', result: resultData.result, id: data.id }) + let resultData = await this.provider.currentProvider.send(data.method, data.params) + if (resultData && resultData.jsonrpc === '2.0') { + resultData = resultData.result + } + resolve({ jsonrpc: '2.0', result: resultData, id: data.id }) } catch (error) { reject(error) } From c851dd1dfd6b516ed2d78fc97961e265eed10aea Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Mar 2023 09:57:11 +0100 Subject: [PATCH 52/60] use infura --- apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx index 582ded0745..ff0f305568 100644 --- a/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx +++ b/apps/remix-ide/src/app/providers/mainnet-vm-fork-provider.tsx @@ -15,7 +15,7 @@ export class MainnetForkVMProvider extends BasicVMProvider { }, blockchain) this.blockchain = blockchain this.fork = 'london' - this.nodeUrl = 'https://rpc.archivenode.io/e50zmkroshle2e2e50zm0044i7ao04ym' + this.nodeUrl = 'https://mainnet.infura.io/v3/08b2a484451e4635a28b3d8234f24332' this.blockNumber = 'latest' } From 3337742512c2675bc85de4870cbd22cee9634e58 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Mar 2023 10:16:39 +0100 Subject: [PATCH 53/60] check property is set --- apps/remix-ide/src/app/providers/injected-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 3ba3efd94e..a89eb7b899 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -62,7 +62,7 @@ export class InjectedProvider extends Plugin implements IProvider { try { if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" }); let resultData = await this.provider.currentProvider.send(data.method, data.params) - if (resultData && resultData.jsonrpc === '2.0') { + if (resultData && resultData.jsonrpc && resultData.jsonrpc === '2.0') { resultData = resultData.result } resolve({ jsonrpc: '2.0', result: resultData, id: data.id }) From 220eac46336a3d42cef4e5c34a63f9a1292e6aa3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Mar 2023 10:26:03 +0100 Subject: [PATCH 54/60] fix resolving from error --- .../src/app/providers/injected-provider.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index a89eb7b899..adbb614fe5 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -57,17 +57,21 @@ export class InjectedProvider extends Plugin implements IProvider { // This will be displayed on UI tooltip as 'cannot get account list: Environment Updated !!' if (!this.provider) { this.call('notification', 'toast', 'No injected provider (e.g Metamask) has been found.') - return reject(new Error('no injected provider found.')) + return resolve({ jsonrpc: '2.0', error: 'no injected provider found', id: data.id }) } try { if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" }); let resultData = await this.provider.currentProvider.send(data.method, data.params) - if (resultData && resultData.jsonrpc && resultData.jsonrpc === '2.0') { - resultData = resultData.result + if (resultData) { + if (resultData.jsonrpc && resultData.jsonrpc === '2.0') { + resultData = resultData.result + } + resolve({ jsonrpc: '2.0', result: resultData, id: data.id }) + } else { + resolve({ jsonrpc: '2.0', error: 'no return data provided', id: data.id }) } - resolve({ jsonrpc: '2.0', result: resultData, id: data.id }) } catch (error) { - reject(error) + resolve({ jsonrpc: '2.0', error: error.message, id: data.id }) } } } From 502a128c5bec98255896b2cfc6c3a929594896b6 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Mar 2023 10:31:21 +0100 Subject: [PATCH 55/60] fix types --- apps/remix-ide/src/app/providers/abstract-provider.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/abstract-provider.tsx b/apps/remix-ide/src/app/providers/abstract-provider.tsx index a83b435e2b..5d9df384c3 100644 --- a/apps/remix-ide/src/app/providers/abstract-provider.tsx +++ b/apps/remix-ide/src/app/providers/abstract-provider.tsx @@ -13,7 +13,8 @@ export type JsonDataRequest = { export type JsonDataResult = { id: number, jsonrpc: string // version - result: any + result?: any, + error?: any, } export type RejectRequest = (error: Error) => void From 5a576642799913f44560427a42d26738ebf7f9cb Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 2 Mar 2023 11:33:18 +0100 Subject: [PATCH 56/60] mefdia icons alignement --- .../src/lib/components/homeTabTitle.tsx | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 7861d95bf6..760e5aa6b0 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -1,7 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ // eslint-disable-next-line @nrwl/nx/enforce-module-boundaries -import BasicLogo from 'libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo' -import { ThemeContext } from '../themeContext' import React, { useEffect, useState, useRef, useContext } from 'react' import { FormattedMessage, useIntl } from 'react-intl' import { CustomTooltip } from '@remix-ui/helper' @@ -21,7 +19,6 @@ function HomeTabTitle() { searchDisable: true }) - const themeFilter = useContext(ThemeContext) const searchInputRef = useRef(null) const remiAudioEl = useRef(null) const intl = useIntl() @@ -52,13 +49,12 @@ function HomeTabTitle() { return (
-
- Remix + Remix
playRemi()} > - +
- + + className="border-0 px-1 h-100 btn fab fa-youtube"> - + className="border-0 px-1 h-100 btn fab fa-twitter"> - + className="border-0 px-1 h-100 btn fa fa-linkedin"> - + className="border-0 h-100 px-1 btn fab fa-medium"> @@ -145,7 +138,7 @@ function HomeTabTitle() { openLink("https://discord.gg/mh9hFCKkEq") _paq.push(['trackEvent', 'hometab', 'socialmedia', 'discord']) }} - className="border-0 h-100 p-1 pr-2 btn fab fa-discord"> + className="border-0 h-100 pl-1 pr-0 btn fab fa-discord"> From 616c1eb7d31b4ad662243d310a830070e7800f59 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 28 Feb 2023 11:06:26 +0100 Subject: [PATCH 57/60] fixed bg for sign msg modal --- libs/remix-ui/run-tab/src/lib/components/account.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index e36efa3432..34c994977e 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -120,6 +120,7 @@ export function AccountUI (props: AccountProps) {