From 1aa86d4ce3a3e2a06ecff248f5fa798e1a1b4307 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 22 May 2024 19:30:32 +0530 Subject: [PATCH 01/54] publish libs for 0.49.0 --- libs/ghaction-helper/package.json | 8 ++++---- libs/remix-analyzer/package.json | 8 ++++---- libs/remix-astwalker/package.json | 6 +++--- libs/remix-debug/package.json | 12 ++++++------ libs/remix-lib/package.json | 4 ++-- 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 ++-- libs/remixd/package.json | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/libs/ghaction-helper/package.json b/libs/ghaction-helper/package.json index 6f14e60078..f72dc335a0 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.28", + "version": "0.1.29", "description": "Solidity Tests GitHub Action Helper", "main": "src/index.js", "scripts": { @@ -19,17 +19,17 @@ }, "homepage": "https://github.com/ethereum/remix-project#readme", "devDependencies": { - "@remix-project/remix-solidity": "^0.5.34", + "@remix-project/remix-solidity": "^0.5.35", "@types/chai": "^4.3.4", "typescript": "^4.9.3" }, "dependencies": { "@ethereum-waffle/chai": "^3.4.4", - "@remix-project/remix-simulator": "^0.2.48", + "@remix-project/remix-simulator": "^0.2.49", "chai": "^4.3.7", "ethers": "^5.7.2", "web3": "^4.1.1" }, "types": "./src/index.d.ts", - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e" + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7" } \ No newline at end of file diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index 7fa6b4ae1d..48054eba4e 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.57", + "version": "0.5.58", "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": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-astwalker": "^0.0.78", - "@remix-project/remix-lib": "^0.5.55", + "@remix-project/remix-astwalker": "^0.0.79", + "@remix-project/remix-lib": "^0.5.56", "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": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e", + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7", "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 a63c6113f6..73b7b3e761 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.78", + "version": "0.0.79", "description": "Tool to walk through Solidity AST", "main": "src/index.js", "scripts": { @@ -37,7 +37,7 @@ "@ethereumjs/tx": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-lib": "^0.5.55", + "@remix-project/remix-lib": "^0.5.56", "@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": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e", + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7", "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 6cfd28d530..27decde0bb 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.48", + "version": "0.5.49", "description": "Tool to debug Ethereum transactions", "contributors": [ { @@ -26,10 +26,10 @@ "@ethereumjs/tx": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-astwalker": "^0.0.78", - "@remix-project/remix-lib": "^0.5.55", - "@remix-project/remix-simulator": "^0.2.48", - "@remix-project/remix-solidity": "^0.5.34", + "@remix-project/remix-astwalker": "^0.0.79", + "@remix-project/remix-lib": "^0.5.56", + "@remix-project/remix-simulator": "^0.2.49", + "@remix-project/remix-solidity": "^0.5.35", "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": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e", + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7", "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 79af78a96b..d3a97f6ea1 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.55", + "version": "0.5.56", "description": "Library to various Remix tools", "contributors": [ { @@ -55,6 +55,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme", "typings": "src/index.d.ts", - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e", + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7", "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 fbc6655efa..03e60ee57a 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.48", + "version": "0.2.49", "description": "Ethereum IDE and tools for the web", "contributors": [ { @@ -22,7 +22,7 @@ "@ethereumjs/tx": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-lib": "^0.5.55", + "@remix-project/remix-lib": "^0.5.56", "ansi-gray": "^0.1.1", "async": "^3.1.0", "body-parser": "^1.18.2", @@ -70,6 +70,6 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme", "typings": "src/index.d.ts", - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e", + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7", "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 0177ed3072..a8e2d61ca2 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.34", + "version": "0.5.35", "description": "Tool to load and run Solidity compiler", "main": "src/index.js", "types": "src/index.d.ts", @@ -19,7 +19,7 @@ "@ethereumjs/tx": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-lib": "^0.5.55", + "@remix-project/remix-lib": "^0.5.56", "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": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e" + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7" } \ No newline at end of file diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index 043353cd26..6005d13cb4 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.48", + "version": "0.2.49", "description": "Tool to test Solidity smart contracts", "main": "src/index.js", "types": "./src/index.d.ts", @@ -41,9 +41,9 @@ "@ethereumjs/tx": "5.3.0", "@ethereumjs/util": "9.0.3", "@ethereumjs/vm": "8.0.0", - "@remix-project/remix-lib": "^0.5.55", - "@remix-project/remix-simulator": "^0.2.48", - "@remix-project/remix-solidity": "^0.5.34", + "@remix-project/remix-lib": "^0.5.56", + "@remix-project/remix-simulator": "^0.2.49", + "@remix-project/remix-solidity": "^0.5.35", "@remix-project/remix-url-resolver": "^0.0.42", "ansi-gray": "^0.1.1", "async": "^2.6.0", @@ -89,5 +89,5 @@ "@ethereumjs/trie": "6.2.0" }, "typings": "src/index.d.ts", - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e" + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7" } \ No newline at end of file diff --git a/libs/remix-url-resolver/package.json b/libs/remix-url-resolver/package.json index 970e8f909e..a0a9c3ad02 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.77", + "version": "0.0.78", "description": "Solidity import url resolver engine", "main": "src/index.js", "types": "src/index.d.ts", @@ -41,5 +41,5 @@ "typescript": "^3.1.6" }, "typings": "src/index.d.ts", - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e" + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7" } \ No newline at end of file diff --git a/libs/remix-ws-templates/package.json b/libs/remix-ws-templates/package.json index fc5e3f0696..a17eb760ef 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.42", + "version": "1.0.43", "description": "Create a Remix IDE workspace using different templates", "main": "src/index.js", "types": "src/index.d.ts", @@ -24,5 +24,5 @@ "ethers": "^5.4.2", "web3": "^4.1.1" }, - "gitHead": "4f5c2cb88bc38099f71c5407265a23ab3bb7508e" + "gitHead": "9a971b0c22009d7405ca158b0847faf0d91ce9a7" } \ No newline at end of file diff --git a/libs/remixd/package.json b/libs/remixd/package.json index 62bc99caae..f70d89ab88 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remixd", - "version": "0.6.31", + "version": "0.6.32", "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 bfa4dacfba62bedb93d3f322d480368f9ab67cad Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 23 May 2024 14:37:15 +0530 Subject: [PATCH 02/54] bump dev version to 0.50.0 --- .github/workflows/pr-reminder.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-reminder.yml b/.github/workflows/pr-reminder.yml index 00e75b8384..233c3dce79 100644 --- a/.github/workflows/pr-reminder.yml +++ b/.github/workflows/pr-reminder.yml @@ -14,4 +14,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - freeze-date: '2024-05-20T18:00:00Z' + freeze-date: '2024-06-03T18:00:00Z' diff --git a/package.json b/package.json index 741cbb780e..7cf16effed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.49.0-dev", + "version": "0.50.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "main": "index.js", From 1db68bb1eedf5aeb69113b647ffbed1825c5a581 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 23 May 2024 17:40:06 +0100 Subject: [PATCH 03/54] fix subtle bug in recursion in getDependencyGraph --- .../src/app/plugins/contractFlattener.tsx | 6 ++- .../src/lib/logic/flattenerUtilities.ts | 42 ++++++++++++------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/contractFlattener.tsx b/apps/remix-ide/src/app/plugins/contractFlattener.tsx index f8205351c6..46176cc07c 100644 --- a/apps/remix-ide/src/app/plugins/contractFlattener.tsx +++ b/apps/remix-ide/src/app/plugins/contractFlattener.tsx @@ -1,3 +1,4 @@ +/* eslint-disable prefer-const */ import React from 'react' import { Plugin } from '@remixproject/engine' import { customAction } from '@remixproject/plugin-api' @@ -57,11 +58,12 @@ export class ContractFlattener extends Plugin { let sorted let result let sources + let order: string[] = [] try { - dependencyGraph = getDependencyGraph(ast, filePath, input.settings.remappings) + dependencyGraph = getDependencyGraph(ast, filePath, input.settings.remappings, order) sorted = dependencyGraph.isEmpty() ? [filePath] : dependencyGraph.sort().reverse() sources = source.sources - result = concatSourceFiles(sorted, sources) + result = concatSourceFiles(sorted, sources, order) } catch (err) { console.warn(err) } diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts index 2ff814125a..b30ab3be2a 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -4,39 +4,49 @@ const IMPORT_SOLIDITY_REGEX = /^\s*import(\s+).*$/gm; const SPDX_SOLIDITY_REGEX = /^\s*\/\/ SPDX-License-Identifier:.*$/gm; type Visited = { [key: string]: number } -export function getDependencyGraph(ast: { [name: string]: CompilationSource }, target: string, remappings: string[]) { +export function getDependencyGraph(ast: { [name: string]: CompilationSource }, target: string, remappings: string[], order: string[]) { const graph = tsort(); const visited = {}; visited[target] = 1; - _traverse(graph, visited, ast, target, remappings); + _traverse(graph, visited, ast, target, remappings, order); return graph; } -export function concatSourceFiles(files: any[], sources: any) { - let concat = ''; - for (const file of files) { - const source = sources[file].content; - const sourceWithoutImport = source.replace(IMPORT_SOLIDITY_REGEX, ''); - const sourceWithoutSPDX = sourceWithoutImport.replace(SPDX_SOLIDITY_REGEX, ''); - concat += `\n// File: ${file}\n\n`; - concat += sourceWithoutSPDX; - } - return concat; +export function concatSourceFiles(files: any[], sources: any, order: string[]) { + let concat = '' + order.reverse().forEach((importName) => { + for (const file of files) { + if (file === importName) { + const source = sources[file].content + const sourceWithoutImport = source.replace(IMPORT_SOLIDITY_REGEX, '') + const sourceWithoutSPDX = sourceWithoutImport.replace(SPDX_SOLIDITY_REGEX, '') + concat += `\n// File: ${file}\n\n` + concat += sourceWithoutSPDX + } + const source = sources[importName].content + const sourceWithoutImport = source.replace(IMPORT_SOLIDITY_REGEX, '') + const sourceWithoutSPDX = sourceWithoutImport.replace(SPDX_SOLIDITY_REGEX, '') + concat += `\n// File: ${importName}\n\n` + concat += sourceWithoutSPDX + } + }) + return concat } -function _traverse(graph: Graph, visited: Visited, ast: { [name: string]: CompilationSource }, name: string, remappings: string[]) { +function _traverse(graph: Graph, visited: Visited, ast: { [name: string]: CompilationSource }, name: string, remappings: string[], order: string[]) { let currentAst = null currentAst = ast[name].ast const dependencies = _getDependencies(currentAst); for (const dependency of dependencies) { const path = resolve(name, dependency, remappings); if (path in visited) { - // continue; // fixes wrong ordering of source in flattened file + continue; // fixes wrong ordering of source in flattened file } visited[path] = 1; graph.add(name, path); - _traverse(graph, visited, ast, path, remappings); + _traverse(graph, visited, ast, path, remappings, order); } + order.push(name) } function _getDependencies(ast: AstNode) { @@ -191,4 +201,4 @@ export function normalizeContractPath(contractPath: string): string[] { } const resultingPath = `${folders}${filename}` return [folders,resultingPath, filename] -} \ No newline at end of file +} From 1ee0820e1219f3f9bff327c8b0b2c4b976fd5d46 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 24 May 2024 10:45:39 +0100 Subject: [PATCH 04/54] remove preoptimizations in source file concatenation --- .../solidity-compiler/src/lib/logic/flattenerUtilities.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts index b30ab3be2a..8df959cb4e 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -14,7 +14,7 @@ export function getDependencyGraph(ast: { [name: string]: CompilationSource }, t export function concatSourceFiles(files: any[], sources: any, order: string[]) { let concat = '' - order.reverse().forEach((importName) => { + order.forEach((importName) => { for (const file of files) { if (file === importName) { const source = sources[file].content @@ -23,11 +23,6 @@ export function concatSourceFiles(files: any[], sources: any, order: string[]) { concat += `\n// File: ${file}\n\n` concat += sourceWithoutSPDX } - const source = sources[importName].content - const sourceWithoutImport = source.replace(IMPORT_SOLIDITY_REGEX, '') - const sourceWithoutSPDX = sourceWithoutImport.replace(SPDX_SOLIDITY_REGEX, '') - concat += `\n// File: ${importName}\n\n` - concat += sourceWithoutSPDX } }) return concat From 2813fad8b2ff3b3a71f174e868b5db6959fa9c86 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 24 May 2024 14:59:42 +0100 Subject: [PATCH 05/54] add regex to fix duplicate pragma lines in flattened contract --- .../src/lib/logic/flattenerUtilities.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts index 8df959cb4e..0f8defb4b8 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -1,15 +1,16 @@ import type { CompilationSource, AstNode } from '@remix-project/remix-solidity' -const IMPORT_SOLIDITY_REGEX = /^\s*import(\s+).*$/gm; -const SPDX_SOLIDITY_REGEX = /^\s*\/\/ SPDX-License-Identifier:.*$/gm; +const IMPORT_SOLIDITY_REGEX = /^\s*import(\s+).*$/gm +const SPDX_SOLIDITY_REGEX = /^\s*\/\/ SPDX-License-Identifier:.*$/gm +const PRAGMA_SOLIDITY_REGEX = /^pragma\s+.*$/gm type Visited = { [key: string]: number } export function getDependencyGraph(ast: { [name: string]: CompilationSource }, target: string, remappings: string[], order: string[]) { - const graph = tsort(); - const visited = {}; - visited[target] = 1; - _traverse(graph, visited, ast, target, remappings, order); - return graph; + const graph = tsort() + const visited = {} + visited[target] = 1 + _traverse(graph, visited, ast, target, remappings, order) + return graph } export function concatSourceFiles(files: any[], sources: any, order: string[]) { @@ -20,8 +21,9 @@ export function concatSourceFiles(files: any[], sources: any, order: string[]) { const source = sources[file].content const sourceWithoutImport = source.replace(IMPORT_SOLIDITY_REGEX, '') const sourceWithoutSPDX = sourceWithoutImport.replace(SPDX_SOLIDITY_REGEX, '') + const sourceWithoutDuplicatePragma = sourceWithoutSPDX.replace(PRAGMA_SOLIDITY_REGEX, '') concat += `\n// File: ${file}\n\n` - concat += sourceWithoutSPDX + concat += sourceWithoutDuplicatePragma } } }) @@ -31,15 +33,15 @@ export function concatSourceFiles(files: any[], sources: any, order: string[]) { function _traverse(graph: Graph, visited: Visited, ast: { [name: string]: CompilationSource }, name: string, remappings: string[], order: string[]) { let currentAst = null currentAst = ast[name].ast - const dependencies = _getDependencies(currentAst); + const dependencies = _getDependencies(currentAst) for (const dependency of dependencies) { - const path = resolve(name, dependency, remappings); + const path = resolve(name, dependency, remappings) if (path in visited) { continue; // fixes wrong ordering of source in flattened file } - visited[path] = 1; - graph.add(name, path); - _traverse(graph, visited, ast, path, remappings, order); + visited[path] = 1 + graph.add(name, path) + _traverse(graph, visited, ast, path, remappings, order) } order.push(name) } From 4ed97720af1d6b8624da79b68f8f043ea5f4a45f Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 27 May 2024 13:38:31 +0100 Subject: [PATCH 06/54] fix regexp for pragma experimental --- .../solidity-compiler/src/lib/logic/flattenerUtilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts index 0f8defb4b8..26cc45d992 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -2,7 +2,7 @@ import type { CompilationSource, AstNode } from '@remix-project/remix-solidity' const IMPORT_SOLIDITY_REGEX = /^\s*import(\s+).*$/gm const SPDX_SOLIDITY_REGEX = /^\s*\/\/ SPDX-License-Identifier:.*$/gm -const PRAGMA_SOLIDITY_REGEX = /^pragma\s+.*$/gm +const PRAGMA_SOLIDITY_REGEX = /^pragma experimental\s+.*$/gm type Visited = { [key: string]: number } export function getDependencyGraph(ast: { [name: string]: CompilationSource }, target: string, remappings: string[], order: string[]) { From a962f09cc5bf84a3553094b4c4c93ba1a7abf8c2 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 26 Jun 2023 11:17:34 +0100 Subject: [PATCH 07/54] Initalize pinned panel plugin --- apps/remix-ide/src/app.js | 2 + apps/remix-ide/src/app/components/panel.ts | 1 + .../src/app/components/pinned-panel.tsx | 74 +++++++++++++++++++ .../src/app/components/side-panel.tsx | 13 ++++ .../app/src/lib/remix-app/remix-app.tsx | 1 + libs/remix-ui/panel/src/lib/types/index.ts | 1 + 6 files changed, 92 insertions(+) create mode 100644 apps/remix-ide/src/app/components/pinned-panel.tsx diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index ccbe5ff471..5b5f73f7d9 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -382,6 +382,7 @@ class AppComponent { this.menuicons = new VerticalIcons() this.sidePanel = new SidePanel() this.hiddenPanel = new HiddenPanel() + this.pinnedPanel = new PinnedPanel() const pluginManagerComponent = new PluginManagerComponent(appManager, this.engine) const filePanel = new FilePanel(appManager) @@ -470,6 +471,7 @@ class AppComponent { ]) await this.appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) await this.appManager.activatePlugin(['sidePanel']) // activating host plugin separately + await this.appManager.activatePlugin(['pinnedPanel']) await this.appManager.activatePlugin(['home']) await this.appManager.activatePlugin(['settings', 'config']) await this.appManager.activatePlugin([ diff --git a/apps/remix-ide/src/app/components/panel.ts b/apps/remix-ide/src/app/components/panel.ts index a90b8c3ee3..2fa3c9b0e9 100644 --- a/apps/remix-ide/src/app/components/panel.ts +++ b/apps/remix-ide/src/app/components/panel.ts @@ -26,6 +26,7 @@ export class AbstractPanel extends HostPlugin { profile: profile, view: view, active: false, + pinned: false, class: 'plugItIn active' } } diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx new file mode 100644 index 0000000000..b91cbbb682 --- /dev/null +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -0,0 +1,74 @@ +// eslint-disable-next-line no-use-before-define +import React from 'react' +import { AbstractPanel } from './panel' +import { RemixPluginPanel } from '@remix-ui/panel' +import packageJson from '../../../../../package.json' +import { RemixUIPanelHeader } from '@remix-ui/panel' +import { PluginViewWrapper } from '@remix-ui/helper' + +const pinnedPanel = { + name: 'pinnedPanel', + displayName: 'Pinned Panel', + description: 'Remix IDE pinned panel', + version: packageJson.version, + methods: ['addView', 'removeView', 'currentFocus'] +} + +export class PinnedPanel extends AbstractPanel { + sideelement: any + dispatch: React.Dispatch = () => {} + + constructor() { + super(pinnedPanel) + } + + onActivation() { + this.renderComponent() + } + + focus(name) { + this.emit('focusChanged', name) + super.focus(name) + } + + removeView(profile) { + super.removeView(profile) + this.emit('unpinnedPlugin', profile.name) + this.renderComponent() + } + + addView(profile, view) { + super.addView(profile, view) + this.renderComponent() + } + + /** + * Display content and update the header + * @param {String} name The name of the plugin to display + */ + async showContent(name) { + super.showContent(name) + this.emit('focusChanged', name) + this.renderComponent() + } + + setDispatch (dispatch: React.Dispatch) { + this.dispatch = dispatch + } + + render() { + return ( +
+ ) + } + + updateComponent(state: any) { + return } plugins={state.plugins} /> + } + + renderComponent() { + this.dispatch({ + plugins: this.plugins + }) + } +} diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 8b30bf200b..381bbf7a51 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -16,6 +16,7 @@ const sidePanel = { } export class SidePanel extends AbstractPanel { + // lastPinned sideelement: any dispatch: React.Dispatch = () => {} constructor() { @@ -69,6 +70,18 @@ export class SidePanel extends AbstractPanel { this.renderComponent() } + pinView (profile, view) { + if (this.plugins[profile.name].pinned) return + this.plugins[profile.name].pinned = true + this.call('pinnedPanel', 'addView', profile, view) + } + + unPinView (profile) { + if (!this.plugins[profile.name].pinned) return + this.plugins[profile.name].pinned = false + this.call('pinnedPanel', 'removeView', profile) + } + /** * Display content and update the header * @param {String} name The name of the plugin to display diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 864819c62b..ec0c82706b 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -35,6 +35,7 @@ const RemixApp = (props: IRemixAppUi) => { messages: {} }) const sidePanelRef = useRef(null) + const pinnedPanelRef: React.MutableRefObject = useRef(null) useEffect(() => { async function activateApp() { diff --git a/libs/remix-ui/panel/src/lib/types/index.ts b/libs/remix-ui/panel/src/lib/types/index.ts index 67b79c4214..c3913340cc 100644 --- a/libs/remix-ui/panel/src/lib/types/index.ts +++ b/libs/remix-ui/panel/src/lib/types/index.ts @@ -4,6 +4,7 @@ export type PluginRecord = { profile: Profile view: any active: boolean + pinned: boolean class?: string minimized?: boolean } From 450372e10d95d01e1612e5e681d66555d138a8bc Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 25 Apr 2024 13:57:02 +0100 Subject: [PATCH 08/54] Simple pin implementation --- apps/remix-ide/src/app.js | 3 +- .../src/app/components/pinned-panel.tsx | 22 +++------ .../src/app/components/side-panel.tsx | 3 +- .../src/app/tabs/locales/en/panel.json | 2 + .../src/app/tabs/locales/es/panel.json | 4 +- .../src/app/tabs/locales/fr/panel.json | 4 +- .../src/app/tabs/locales/it/panel.json | 4 +- .../src/app/tabs/locales/zh/panel.json | 4 +- .../remix-app/components/dragbar/dragbar.tsx | 9 +++- .../app/src/lib/remix-app/remix-app.tsx | 49 ++++++++++++++++--- .../app/src/lib/remix-app/style/remix-app.css | 6 +++ .../panel/src/lib/main/main-panel.tsx | 3 +- .../panel/src/lib/plugins/panel-header.tsx | 34 +++++++++++-- 13 files changed, 114 insertions(+), 33 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 5b5f73f7d9..ed8f148b95 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -9,6 +9,7 @@ import {Web3ProviderModule} from './app/tabs/web3-provider' import {CompileAndRun} from './app/tabs/compile-and-run' import {SidePanel} from './app/components/side-panel' import {HiddenPanel} from './app/components/hidden-panel' +import {PinnedPanel} from './app/components/pinned-panel' import {VerticalIcons} from './app/components/vertical-icons' import {LandingPage} from './app/ui/landing-page/landing-page' import {MainPanel} from './app/components/main-panel' @@ -389,7 +390,7 @@ class AppComponent { const landingPage = new LandingPage(appManager, this.menuicons, fileManager, filePanel, contentImport) this.settings = new SettingsTab(Registry.getInstance().get('config').api, editor, appManager) - this.engine.register([this.menuicons, landingPage, this.hiddenPanel, this.sidePanel, filePanel, pluginManagerComponent, this.settings]) + this.engine.register([this.menuicons, landingPage, this.hiddenPanel, this.sidePanel, filePanel, pluginManagerComponent, this.settings, this.pinnedPanel]) // CONTENT VIEWS & DEFAULT PLUGINS const openZeppelinProxy = new OpenZeppelinProxy(blockchain) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index b91cbbb682..9bf681191c 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -26,29 +26,23 @@ export class PinnedPanel extends AbstractPanel { this.renderComponent() } - focus(name) { - this.emit('focusChanged', name) - super.focus(name) + currentFocus (): string { + return Object.values(this.plugins).find(plugin => { + return plugin.pinned + }).profile.name } removeView(profile) { - super.removeView(profile) + this.remove(profile.name) this.emit('unpinnedPlugin', profile.name) this.renderComponent() } addView(profile, view) { super.addView(profile, view) - this.renderComponent() - } - - /** - * Display content and update the header - * @param {String} name The name of the plugin to display - */ - async showContent(name) { - super.showContent(name) - this.emit('focusChanged', name) + this.plugins[profile.name].pinned = true + super.showContent(profile.name) + this.emit('pinnedPlugin', profile.name) this.renderComponent() } diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 381bbf7a51..8735c296b7 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -74,6 +74,7 @@ export class SidePanel extends AbstractPanel { if (this.plugins[profile.name].pinned) return this.plugins[profile.name].pinned = true this.call('pinnedPanel', 'addView', profile, view) + // this.removeView(profile) } unPinView (profile) { @@ -106,7 +107,7 @@ export class SidePanel extends AbstractPanel { } updateComponent(state: any) { - return } plugins={state.plugins} /> + return } plugins={state.plugins} /> } renderComponent() { diff --git a/apps/remix-ide/src/app/tabs/locales/en/panel.json b/apps/remix-ide/src/app/tabs/locales/en/panel.json index 013a68e199..eb8a204f1e 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/panel.json @@ -4,6 +4,8 @@ "panel.documentation": "Documentation", "panel.description": "Description", "panel.maintainedByRemix": "Maintained by Remix", + "panel.pinnedMsg": "Click to dock plugin to the right", + "panel.unPinnedMsg": "Click to return plugin to the side panel", "panel.maintainedExternally": "Not maintained by Remix", "panel.pluginInfo": "Plugin info", "panel.linkToDoc": "Link to documentation", diff --git a/apps/remix-ide/src/app/tabs/locales/es/panel.json b/apps/remix-ide/src/app/tabs/locales/es/panel.json index 44aab809a3..84ea48e377 100644 --- a/apps/remix-ide/src/app/tabs/locales/es/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/es/panel.json @@ -6,5 +6,7 @@ "panel.maintainedByRemix": "Mantenido por Remix", "panel.pluginInfo": "Información del Complemento", "panel.linkToDoc": "Enlace a la documentación", - "panel.makeAnissue": "Crear un asunto" + "panel.makeAnissue": "Crear un asunto", + "panel.pinnedMsg": "Click to dock plugin to the right", + "panel.unPinnedMsg": "Click to return plugin to the side panel" } diff --git a/apps/remix-ide/src/app/tabs/locales/fr/panel.json b/apps/remix-ide/src/app/tabs/locales/fr/panel.json index 8deab3169a..d337d61274 100644 --- a/apps/remix-ide/src/app/tabs/locales/fr/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/fr/panel.json @@ -6,5 +6,7 @@ "panel.maintainedByRemix": "Maintenu par Remix", "panel.pluginInfo": "Informations sur l'extension", "panel.linkToDoc": "Lien vers la documentation", - "panel.makeAnissue": "Faire un ticket" + "panel.makeAnissue": "Faire un ticket", + "panel.pinnedMsg": "Click to dock plugin to the right", + "panel.unPinnedMsg": "Click to return plugin to the side panel" } diff --git a/apps/remix-ide/src/app/tabs/locales/it/panel.json b/apps/remix-ide/src/app/tabs/locales/it/panel.json index 400b39508e..67e7adcb94 100644 --- a/apps/remix-ide/src/app/tabs/locales/it/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/it/panel.json @@ -6,5 +6,7 @@ "panel.maintainedByRemix": "Mantenuto da Remix", "panel.pluginInfo": "Informazioni sul plugin", "panel.linkToDoc": "Link alla documentazione", - "panel.makeAnissue": "Crea una Issue" + "panel.makeAnissue": "Crea una Issue", + "panel.pinnedMsg": "Click to dock plugin to the right", + "panel.unPinnedMsg": "Click to return plugin to the side panel" } diff --git a/apps/remix-ide/src/app/tabs/locales/zh/panel.json b/apps/remix-ide/src/app/tabs/locales/zh/panel.json index e1a63ff928..42e9bdbdfe 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/zh/panel.json @@ -6,5 +6,7 @@ "panel.maintainedByRemix": "由 Remix 维护", "panel.pluginInfo": "插件信息", "panel.linkToDoc": "文档链接", - "panel.makeAnissue": "提交 issue" + "panel.makeAnissue": "提交 issue", + "panel.pinnedMsg": "Click to return plugin to the side panel", + "panel.unPinnedMsg": "Click to dock plugin to the right" } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx index 24c8099606..bb7bd77613 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx @@ -9,6 +9,7 @@ interface IRemixDragBarUi { minWidth: number maximiseTrigger: number resetTrigger: number + layoutPosition: 'left' | 'right' } const DragBar = (props: IRemixDragBarUi) => { @@ -19,7 +20,13 @@ const DragBar = (props: IRemixDragBarUi) => { const nodeRef = React.useRef(null) // fix for strictmode useEffect(() => { - setDragBarPosX(offset + (props.hidden ? 0 : props.refObject.current.offsetWidth)) + if (props.hidden) { + setDragBarPosX(offset) + } else if (props.layoutPosition === 'left') { + setDragBarPosX(offset + props.refObject.current.offsetWidth) + } else if (props.layoutPosition === 'right') { + setDragBarPosX(offset) + } }, [props.hidden, offset]) useEffect(() => { diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index ec0c82706b..3c79abba69 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -27,15 +27,18 @@ const RemixApp = (props: IRemixAppUi) => { const [appReady, setAppReady] = useState(false) const [showEnterDialog, setShowEnterDialog] = useState(false) const [hideSidePanel, setHideSidePanel] = useState(false) - const [maximiseTrigger, setMaximiseTrigger] = useState(0) - const [resetTrigger, setResetTrigger] = useState(0) + const [hidePinnedPanel, setHidePinnedPanel] = useState(false) + const [maximiseLeftTrigger, setMaximiseLeftTrigger] = useState(0) + const [resetLeftTrigger, setResetLeftTrigger] = useState(0) + const [maximiseRightTrigger, setMaximiseRightTrigger] = useState(0) + const [resetRightTrigger, setResetRightTrigger] = useState(0) const [online, setOnline] = useState(true) const [locale, setLocale] = useState<{ code: string; messages: any }>({ code: 'en', messages: {} }) const sidePanelRef = useRef(null) - const pinnedPanelRef: React.MutableRefObject = useRef(null) + const pinnedPanelRef = useRef(null) useEffect(() => { async function activateApp() { @@ -82,16 +85,35 @@ const RemixApp = (props: IRemixAppUi) => { }) props.app.layout.event.on('maximisesidepanel', () => { - setMaximiseTrigger((prev) => { + setMaximiseLeftTrigger((prev) => { return prev + 1 }) }) props.app.layout.event.on('resetsidepanel', () => { - setResetTrigger((prev) => { + setResetLeftTrigger((prev) => { return prev + 1 }) }) + + props.app.layout.event.on('minimizepinnedpanel', () => { + setTimeout(() => { + setHideSidePanel(true) + }, 1000) + }) + + props.app.layout.event.on('maximisepinnedpanel', () => { + setMaximiseRightTrigger((prev) => { + return prev + 1 + }) + }) + + props.app.layout.event.on('resetpinnedpanel', () => { + setResetRightTrigger((prev) => { + return prev + 1 + }) + }) + props.app.localeModule.events.on('localeChanged', (nextLocale) => { setLocale(nextLocale) }) @@ -167,12 +189,13 @@ const RemixApp = (props: IRemixAppUi) => { {props.app.sidePanel.render()}
@@ -180,6 +203,18 @@ const RemixApp = (props: IRemixAppUi) => {
+ +
+ {props.app.pinnedPanel.render()} +
{props.app.hiddenPanel.render()}
diff --git a/libs/remix-ui/app/src/lib/remix-app/style/remix-app.css b/libs/remix-ui/app/src/lib/remix-app/style/remix-app.css index 70686d632f..35b41abf93 100644 --- a/libs/remix-ui/app/src/lib/remix-app/style/remix-app.css +++ b/libs/remix-ui/app/src/lib/remix-app/style/remix-app.css @@ -34,6 +34,12 @@ pre { width : 320px; transition : width 0.25s; } +.pinnedpanel { + display : flex; + flex-direction : row-reverse; + width : 320px; + transition : width 0.25s; +} .highlightcode { position : absolute; z-index : 20; diff --git a/libs/remix-ui/panel/src/lib/main/main-panel.tsx b/libs/remix-ui/panel/src/lib/main/main-panel.tsx index ac7033fe15..0786a644fd 100644 --- a/libs/remix-ui/panel/src/lib/main/main-panel.tsx +++ b/libs/remix-ui/panel/src/lib/main/main-panel.tsx @@ -30,7 +30,8 @@ const RemixUIMainPanel = (props: RemixUIMainPanelProps) => { active: panel.active, view: panel.plugin.profile.name === 'tabs' ? panel.plugin.renderTabsbar() : panel.plugin.render(), class: panel.plugin.profile.name + '-wrap ' + (panel.minimized ? 'minimized ' : ' ') + ((platform === appPlatformTypes.desktop)? 'desktop' : ''), - minimized: panel.minimized + minimized: panel.minimized, + pinned: panel.pinned }) }) setPlugins(pluginPanels) diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 590893b3a5..ff4f327efc 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -1,11 +1,13 @@ -import React, {useEffect, useRef, useState} from 'react' // eslint-disable-line -import { FormattedMessage } from 'react-intl' -import { PluginRecord } from '../types' +import React, {useEffect, useState} from 'react' // eslint-disable-line +import {FormattedMessage} from 'react-intl' +import {PluginRecord} from '../types' import './panel.css' import { CustomTooltip } from '@remix-ui/helper' export interface RemixPanelProps { - plugins: Record + plugins: Record, + pinView?: (profile: PluginRecord['profile'], view: PluginRecord['view']) => void, + unPinView?: (profile: PluginRecord['profile']) => void } const RemixUIPanelHeader = (props: RemixPanelProps) => { const [plugin, setPlugin] = useState() @@ -25,6 +27,15 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { setToggleExpander(!toggleExpander) } + const pinPlugin = () => { + console.log('called pinPlugin') + props.pinView && props.pinView(plugin.profile, plugin.view) + } + + const unPinPlugin = () => { + props.unPinView && props.unPinView(plugin.profile) + } + const tooltipChild = return ( @@ -49,6 +60,21 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { {tooltipChild} + { + !plugin?.pinned ? ( +
+ }> + + +
+ ) : ( +
+ }> + + +
+ ) + }
From 9ad8909ea96bc192644a67258bbf6b88482c8cbc Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Sat, 27 Apr 2024 14:35:47 +0100 Subject: [PATCH 09/54] Default to file-explorer --- apps/remix-ide/src/app/components/panel.ts | 6 ++- .../src/app/components/pinned-panel.tsx | 34 ++++++++-------- .../src/app/components/side-panel.tsx | 21 ++++++++-- .../app/src/lib/remix-app/remix-app.tsx | 18 ++++++--- .../panel/src/lib/plugins/panel-header.tsx | 39 +++++++++++-------- 5 files changed, 75 insertions(+), 43 deletions(-) diff --git a/apps/remix-ide/src/app/components/panel.ts b/apps/remix-ide/src/app/components/panel.ts index 2fa3c9b0e9..bf80f3614d 100644 --- a/apps/remix-ide/src/app/components/panel.ts +++ b/apps/remix-ide/src/app/components/panel.ts @@ -15,9 +15,11 @@ export class AbstractPanel extends HostPlugin { } currentFocus (): string { - return Object.values(this.plugins).find(plugin => { + const activePlugin = Object.values(this.plugins).find(plugin => { return plugin.active - }).profile.name + }) + + return activePlugin ? activePlugin.profile.name : null } addView (profile, view) { diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 9bf681191c..70b39672a0 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -1,7 +1,7 @@ // eslint-disable-next-line no-use-before-define import React from 'react' import { AbstractPanel } from './panel' -import { RemixPluginPanel } from '@remix-ui/panel' +import { PluginRecord, RemixPluginPanel } from '@remix-ui/panel' import packageJson from '../../../../../package.json' import { RemixUIPanelHeader } from '@remix-ui/panel' import { PluginViewWrapper } from '@remix-ui/helper' @@ -11,7 +11,7 @@ const pinnedPanel = { displayName: 'Pinned Panel', description: 'Remix IDE pinned panel', version: packageJson.version, - methods: ['addView', 'removeView', 'currentFocus'] + methods: ['addView', 'removeView', 'currentFocus', 'pinView', 'unPinView'] } export class PinnedPanel extends AbstractPanel { @@ -26,24 +26,26 @@ export class PinnedPanel extends AbstractPanel { this.renderComponent() } - currentFocus (): string { - return Object.values(this.plugins).find(plugin => { - return plugin.pinned - }).profile.name - } + pinView (profile, view) { + const activePlugin = this.currentFocus() - removeView(profile) { - this.remove(profile.name) - this.emit('unpinnedPlugin', profile.name) + if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already pinned`) + if (activePlugin) this.remove(activePlugin) + this.addView(profile, view) + this.plugins[profile.name].pinned = true + this.plugins[profile.name].active = true this.renderComponent() + this.events.emit('pinnedPlugin', profile.name) } - addView(profile, view) { - super.addView(profile, view) - this.plugins[profile.name].pinned = true - super.showContent(profile.name) - this.emit('pinnedPlugin', profile.name) + unPinView (profile) { + const activePlugin = this.currentFocus() + + if (activePlugin !== profile.name) throw new Error(`Plugin ${profile.name} already pinned`) + super.remove(profile.name) + this.call('sidePanel', 'unPinView', profile) this.renderComponent() + this.events.emit('unPinnedPlugin', profile.name) } setDispatch (dispatch: React.Dispatch) { @@ -57,7 +59,7 @@ export class PinnedPanel extends AbstractPanel { } updateComponent(state: any) { - return } plugins={state.plugins} /> + return } plugins={state.plugins} /> } renderComponent() { diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 8735c296b7..3e32827183 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -12,7 +12,7 @@ const sidePanel = { displayName: 'Side Panel', description: 'Remix IDE side panel', version: packageJson.version, - methods: ['addView', 'removeView', 'currentFocus'] + methods: ['addView', 'removeView', 'currentFocus', 'pinView', 'unPinView'] } export class SidePanel extends AbstractPanel { @@ -65,22 +65,35 @@ export class SidePanel extends AbstractPanel { } addView(profile, view) { + console.log(profile.name) super.addView(profile, view) this.call('menuicons', 'linkContent', profile) this.renderComponent() } + hideView(profile) { + this.plugins[profile.name].active = false + this.plugins['filePanel'].active = true + this.call('menuicons', 'unlinkContent', profile) + this.renderComponent() + } + + showView(profile) { + this.call('menuicons', 'linkContent', profile) + this.renderComponent() + } + pinView (profile, view) { if (this.plugins[profile.name].pinned) return this.plugins[profile.name].pinned = true - this.call('pinnedPanel', 'addView', profile, view) - // this.removeView(profile) + this.call('pinnedPanel', 'pinView', profile, view) + this.hideView(profile) } unPinView (profile) { if (!this.plugins[profile.name].pinned) return this.plugins[profile.name].pinned = false - this.call('pinnedPanel', 'removeView', profile) + this.showView(profile) } /** diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 3c79abba69..39684fc1fa 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -27,7 +27,7 @@ const RemixApp = (props: IRemixAppUi) => { const [appReady, setAppReady] = useState(false) const [showEnterDialog, setShowEnterDialog] = useState(false) const [hideSidePanel, setHideSidePanel] = useState(false) - const [hidePinnedPanel, setHidePinnedPanel] = useState(false) + const [hidePinnedPanel, setHidePinnedPanel] = useState(true) const [maximiseLeftTrigger, setMaximiseLeftTrigger] = useState(0) const [resetLeftTrigger, setResetLeftTrigger] = useState(0) const [maximiseRightTrigger, setMaximiseRightTrigger] = useState(0) @@ -118,6 +118,14 @@ const RemixApp = (props: IRemixAppUi) => { setLocale(nextLocale) }) + props.app.pinnedPanel.events.on('pinnedPlugin', () => { + setHidePinnedPanel(false) + }) + + props.app.pinnedPanel.events.on('unPinnedPlugin', () => { + setHidePinnedPanel(true) + }) + setInterval(() => { setOnline(window.navigator.onLine) }, 1000) @@ -199,9 +207,9 @@ const RemixApp = (props: IRemixAppUi) => { >
- }> -
-
+ {/* }> +
+
*/}
{ setHideStatus={setHideSidePanel} layoutPosition='right' > -
+
{props.app.pinnedPanel.render()}
diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index ff4f327efc..cf5c63003f 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -2,7 +2,7 @@ import React, {useEffect, useState} from 'react' // eslint-disable-line import {FormattedMessage} from 'react-intl' import {PluginRecord} from '../types' import './panel.css' -import { CustomTooltip } from '@remix-ui/helper' +import {CustomTooltip, RenderIf, RenderIfNot} from '@remix-ui/helper' export interface RemixPanelProps { plugins: Record, @@ -47,32 +47,39 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
{plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? ( - }> + }> ) - : (}> + : (}> ) }
- } tooltipId="pluginInfoTooltip" tooltipClasses="text-nowrap"> + } tooltipId="pluginInfoTooltip" tooltipClasses="text-nowrap"> {tooltipChild}
{ - !plugin?.pinned ? ( -
- }> - - -
- ) : ( -
- }> - - -
+ plugin && plugin.profile.name !== 'filePanel' && ( + + <> + +
+ }> + + +
+
+ +
+ }> + + +
+
+ +
) }
From ed662197db6fd5c9cdc8ccaaf755f5ba906e0c19 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 3 May 2024 06:48:02 -0500 Subject: [PATCH 10/54] Load initialState for udapp after pinning --- apps/remix-ide/src/app.js | 8 ++++-- .../src/app/components/pinned-panel.tsx | 9 ++++--- .../src/app/components/side-panel.tsx | 19 +++++++++----- apps/remix-ide/src/app/tabs/state-logger.js | 26 +++++++++++++++++++ .../panel/src/lib/plugins/panel-header.tsx | 1 - .../panel/src/lib/plugins/panel-plugin.tsx | 18 +++++++++++-- .../panel/src/lib/plugins/remix-ui-panel.tsx | 7 ++--- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 15 +++++++---- libs/remix-ui/run-tab/src/lib/types/index.ts | 3 ++- 9 files changed, 83 insertions(+), 23 deletions(-) create mode 100644 apps/remix-ide/src/app/tabs/state-logger.js diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index ed8f148b95..98d9269342 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -7,6 +7,7 @@ import {LocaleModule} from './app/tabs/locale-module' import {NetworkModule} from './app/tabs/network-module' import {Web3ProviderModule} from './app/tabs/web3-provider' import {CompileAndRun} from './app/tabs/compile-and-run' +import {PluginStateLogger} from './app/tabs/state-logger' import {SidePanel} from './app/components/side-panel' import {HiddenPanel} from './app/components/hidden-panel' import {PinnedPanel} from './app/components/pinned-panel' @@ -301,7 +302,8 @@ class AppComponent { this.layout = new Layout() const permissionHandler = new PermissionHandlerPlugin() - + // ----------------- run script after each compilation results ----------- + const pluginStateLogger = new PluginStateLogger() this.engine.register([ permissionHandler, @@ -352,6 +354,7 @@ class AppComponent { templates, openaigpt, solcoder, + pluginStateLogger ]) //---- fs plugin @@ -468,7 +471,8 @@ class AppComponent { 'compilerArtefacts', 'network', 'web3Provider', - 'offsetToLineColumnConverter' + 'offsetToLineColumnConverter', + 'pluginStateLogger' ]) await this.appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) await this.appManager.activatePlugin(['sidePanel']) // activating host plugin separately diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 70b39672a0..f435e03f69 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -17,6 +17,7 @@ const pinnedPanel = { export class PinnedPanel extends AbstractPanel { sideelement: any dispatch: React.Dispatch = () => {} + loggedState: any constructor() { super(pinnedPanel) @@ -26,11 +27,12 @@ export class PinnedPanel extends AbstractPanel { this.renderComponent() } - pinView (profile, view) { + async pinView (profile, view) { const activePlugin = this.currentFocus() if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already pinned`) if (activePlugin) this.remove(activePlugin) + this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name) this.addView(profile, view) this.plugins[profile.name].pinned = true this.plugins[profile.name].active = true @@ -59,12 +61,13 @@ export class PinnedPanel extends AbstractPanel { } updateComponent(state: any) { - return } plugins={state.plugins} /> + return } plugins={state.plugins} pluginState={state.pluginState} /> } renderComponent() { this.dispatch({ - plugins: this.plugins + plugins: this.plugins, + pluginState: this.loggedState }) } } diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 3e32827183..9861b8f35c 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -18,7 +18,9 @@ const sidePanel = { export class SidePanel extends AbstractPanel { // lastPinned sideelement: any + loggedState: any dispatch: React.Dispatch = () => {} + constructor() { super(sidePanel) this.sideelement = document.createElement('section') @@ -65,7 +67,6 @@ export class SidePanel extends AbstractPanel { } addView(profile, view) { - console.log(profile.name) super.addView(profile, view) this.call('menuicons', 'linkContent', profile) this.renderComponent() @@ -79,15 +80,20 @@ export class SidePanel extends AbstractPanel { } showView(profile) { + const activePlugin = this.currentFocus() + + this.plugins[activePlugin].active = false + this.plugins[profile.name].active = true this.call('menuicons', 'linkContent', profile) this.renderComponent() } - pinView (profile, view) { + pinView (profile) { if (this.plugins[profile.name].pinned) return this.plugins[profile.name].pinned = true - this.call('pinnedPanel', 'pinView', profile, view) - this.hideView(profile) + this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) + this.removeView(profile) + // this.hideView(profile) } unPinView (profile) { @@ -120,12 +126,13 @@ export class SidePanel extends AbstractPanel { } updateComponent(state: any) { - return } plugins={state.plugins} /> + return } plugins={state.plugins} pluginState={state.loggedState} /> } renderComponent() { this.dispatch({ - plugins: this.plugins + plugins: this.plugins, + pluginState: this.loggedState }) } } diff --git a/apps/remix-ide/src/app/tabs/state-logger.js b/apps/remix-ide/src/app/tabs/state-logger.js new file mode 100644 index 0000000000..fa5d371dfb --- /dev/null +++ b/apps/remix-ide/src/app/tabs/state-logger.js @@ -0,0 +1,26 @@ +import { Plugin } from "@remixproject/engine" +import { EventEmitter } from 'events' +import * as packageJson from '../../../../../package.json' + +const profile = { + name: 'pluginStateLogger', + events: [], + methods: ['logPluginState', 'getPluginState'], + version: packageJson.version, +} + +export class PluginStateLogger extends Plugin { + constructor() { + super(profile) + this.events = new EventEmitter() + this.stateLogs = {} + } + + logPluginState(name, state) { + this.stateLogs[name] = state + } + + getPluginState(name) { + return this.stateLogs[name] + } +} \ No newline at end of file diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index cf5c63003f..687d2cfd50 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -28,7 +28,6 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { } const pinPlugin = () => { - console.log('called pinPlugin') props.pinView && props.pinView(plugin.profile, plugin.view) } diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx index 2c9d3d71ee..fa6760dc08 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx @@ -3,7 +3,9 @@ import React, {forwardRef, useEffect, useRef, useState} from 'react' // eslint-d import { PluginRecord } from '../types' import './panel.css' interface panelPLuginProps { - pluginRecord: PluginRecord + pluginRecord: PluginRecord, + initialState?: any, + children?: any } const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => { @@ -14,7 +16,19 @@ const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => { if (ref.current) { if (props.pluginRecord.view) { if (React.isValidElement(props.pluginRecord.view)) { - setView(props.pluginRecord.view) + let view = props.pluginRecord.view + + if (props.initialState) { + view = React.Children.map((props.pluginRecord.view.props as any).children, child => { + if (React.isValidElement(child) && typeof child.type === 'function') { + // Safe to clone and pass `initialState` + return React.cloneElement(child, { ...props, initialState: props.initialState } as any) + } + return child + }) + } + + setView(view) } else { ref.current.appendChild(props.pluginRecord.view) } diff --git a/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx b/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx index 1b3d668a35..7ff51827bd 100644 --- a/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx @@ -6,8 +6,9 @@ import { PluginRecord } from '../types' /* eslint-disable-next-line */ export interface RemixPanelProps { - plugins: Record - header: JSX.Element + plugins: Record, + header: JSX.Element, + pluginState?: any, } export function RemixPluginPanel(props: RemixPanelProps) { @@ -17,7 +18,7 @@ export function RemixPluginPanel(props: RemixPanelProps) {
{Object.values(props.plugins).map((pluginRecord) => { - return + return })}
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 3e3985a772..15c9be5bb6 100644 --- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx +++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx @@ -74,18 +74,23 @@ export function RunTabUI(props: RunTabProps) { storage: null, contract: null }) - runTabInitialState.selectExEnv = plugin.blockchain.getProvider() - const [runTab, dispatch] = useReducer(runTabReducer, runTabInitialState) - const REACT_API = { runTab } + const initialState = props.initialState || runTabInitialState + + initialState.selectExEnv = plugin.blockchain.getProvider() + const [runTab, dispatch] = useReducer(runTabReducer, initialState) + const REACT_API = {runTab} const currentfile = plugin.config.get('currentFile') useEffect(() => { - initRunTab(plugin)(dispatch) - plugin.onInitDone() + if (!props.initialState) { + initRunTab(plugin)(dispatch) + plugin.onInitDone() + } }, [plugin]) useEffect(() => { plugin.onReady(runTab) + plugin.call('pluginStateLogger', 'logPluginState', 'udapp', runTab) }, [REACT_API]) useEffect(() => { diff --git a/libs/remix-ui/run-tab/src/lib/types/index.ts b/libs/remix-ui/run-tab/src/lib/types/index.ts index 6e19d45b3a..7e4ae84533 100644 --- a/libs/remix-ui/run-tab/src/lib/types/index.ts +++ b/libs/remix-ui/run-tab/src/lib/types/index.ts @@ -5,7 +5,8 @@ import { RunTab } from './run-tab' import { SolcInput, SolcOutput } from '@openzeppelin/upgrades-core' import { LayoutCompatibilityReport } from '@openzeppelin/upgrades-core/dist/storage/report' export interface RunTabProps { - plugin: RunTab + plugin: RunTab, + initialState: RunTabState } export interface Contract { From 28aaf21eb27e3eace45ef66e8a9ed0a3ec28e08d Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 3 May 2024 20:58:47 -0500 Subject: [PATCH 11/54] Load initialState for search plugin and fix run tab --- libs/remix-ui/run-tab/src/lib/actions/index.ts | 8 +++++--- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 4 +++- libs/remix-ui/search/src/lib/components/Search.tsx | 2 +- libs/remix-ui/search/src/lib/context/context.tsx | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index b5c65e89f5..0df06aa448 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -22,11 +22,13 @@ declare global { const _paq = window._paq = window._paq || [] //eslint-disable-line let plugin: RunTab, dispatch: React.Dispatch = () => {} -export const initRunTab = (udapp: RunTab) => async (reducerDispatch: React.Dispatch) => { +export const initRunTab = (udapp: RunTab, resetEventsAndAccounts: boolean) => async (reducerDispatch: React.Dispatch) => { plugin = udapp dispatch = reducerDispatch - setupEvents(plugin, dispatch) - resetAndInit(plugin) + if (resetEventsAndAccounts) { + setupEvents(plugin, dispatch) + resetAndInit(plugin) + } } export const setAccountAddress = (account: string) => setAccount(dispatch, account) 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 15c9be5bb6..ae569274ce 100644 --- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx +++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx @@ -83,8 +83,10 @@ export function RunTabUI(props: RunTabProps) { useEffect(() => { if (!props.initialState) { - initRunTab(plugin)(dispatch) + initRunTab(plugin, true)(dispatch) plugin.onInitDone() + } else { + initRunTab(plugin, false)(dispatch) } }, [plugin]) diff --git a/libs/remix-ui/search/src/lib/components/Search.tsx b/libs/remix-ui/search/src/lib/components/Search.tsx index 11dcc9addd..43b2418015 100644 --- a/libs/remix-ui/search/src/lib/components/Search.tsx +++ b/libs/remix-ui/search/src/lib/components/Search.tsx @@ -15,7 +15,7 @@ export const SearchTab = (props) => { return ( <>
- + diff --git a/libs/remix-ui/search/src/lib/context/context.tsx b/libs/remix-ui/search/src/lib/context/context.tsx index 8e50f0b53e..336955c744 100644 --- a/libs/remix-ui/search/src/lib/context/context.tsx +++ b/libs/remix-ui/search/src/lib/context/context.tsx @@ -443,6 +443,7 @@ export const SearchProvider = ({ children = [], reducer = SearchReducer, initial } })() } + plugin.call('pluginStateLogger', 'logPluginState', 'search', state) }, [state.timeStamp]) return ( From 6f7aefa504289251733cd5ed7b102b127518ed59 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 3 May 2024 21:33:59 -0500 Subject: [PATCH 12/54] Highlight unpinned panel --- .../src/app/components/pinned-panel.tsx | 2 +- .../src/app/components/side-panel.tsx | 29 +++++-------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index f435e03f69..0526ddf04f 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -44,8 +44,8 @@ export class PinnedPanel extends AbstractPanel { const activePlugin = this.currentFocus() if (activePlugin !== profile.name) throw new Error(`Plugin ${profile.name} already pinned`) + this.call('sidePanel', 'unPinView', profile, this.plugins[profile.name].view) super.remove(profile.name) - this.call('sidePanel', 'unPinView', profile) this.renderComponent() this.events.emit('unPinnedPlugin', profile.name) } diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 9861b8f35c..11642fce57 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -72,34 +72,19 @@ export class SidePanel extends AbstractPanel { this.renderComponent() } - hideView(profile) { - this.plugins[profile.name].active = false - this.plugins['filePanel'].active = true - this.call('menuicons', 'unlinkContent', profile) - this.renderComponent() + pinView (profile) { + this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) + this.removeView(profile) } - showView(profile) { + async unPinView (profile, view) { + this.addView(profile, view) const activePlugin = this.currentFocus() this.plugins[activePlugin].active = false this.plugins[profile.name].active = true - this.call('menuicons', 'linkContent', profile) - this.renderComponent() - } - - pinView (profile) { - if (this.plugins[profile.name].pinned) return - this.plugins[profile.name].pinned = true - this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) - this.removeView(profile) - // this.hideView(profile) - } - - unPinView (profile) { - if (!this.plugins[profile.name].pinned) return - this.plugins[profile.name].pinned = false - this.showView(profile) + await this.call('menuicons', 'linkContent', profile) + this.showContent(profile.name) } /** From edc5fa26a07a4861e4a53e949991576a62d82d9c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Sun, 5 May 2024 12:55:34 -0500 Subject: [PATCH 13/54] Load plugin state for side-panel after unpin --- apps/remix-ide/src/app/components/pinned-panel.tsx | 9 ++++++--- apps/remix-ide/src/app/components/side-panel.tsx | 10 ++++++---- libs/remix-ui/panel/src/lib/plugins/panel-header.tsx | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 0526ddf04f..db8bcba590 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -31,7 +31,10 @@ export class PinnedPanel extends AbstractPanel { const activePlugin = this.currentFocus() if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already pinned`) - if (activePlugin) this.remove(activePlugin) + if (activePlugin) { + await this.call('sidePanel', 'unPinView', this.plugins[activePlugin].profile, this.plugins[activePlugin].view) + this.remove(activePlugin) + } this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name) this.addView(profile, view) this.plugins[profile.name].pinned = true @@ -40,11 +43,11 @@ export class PinnedPanel extends AbstractPanel { this.events.emit('pinnedPlugin', profile.name) } - unPinView (profile) { + async unPinView (profile) { const activePlugin = this.currentFocus() if (activePlugin !== profile.name) throw new Error(`Plugin ${profile.name} already pinned`) - this.call('sidePanel', 'unPinView', profile, this.plugins[profile.name].view) + await this.call('sidePanel', 'unPinView', profile, this.plugins[profile.name].view) super.remove(profile.name) this.renderComponent() this.events.emit('unPinnedPlugin', profile.name) diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 11642fce57..81d19791fe 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -72,15 +72,17 @@ export class SidePanel extends AbstractPanel { this.renderComponent() } - pinView (profile) { - this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) + async pinView (profile, view) { + await this.call('pinnedPanel', 'pinView', profile, view) this.removeView(profile) } async unPinView (profile, view) { - this.addView(profile, view) const activePlugin = this.currentFocus() + if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already unpinned`) + this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name) + super.addView(profile, view) this.plugins[activePlugin].active = false this.plugins[profile.name].active = true await this.call('menuicons', 'linkContent', profile) @@ -111,7 +113,7 @@ export class SidePanel extends AbstractPanel { } updateComponent(state: any) { - return } plugins={state.plugins} pluginState={state.loggedState} /> + return } plugins={state.plugins} pluginState={state.pluginState} /> } renderComponent() { diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 687d2cfd50..9d86ff6eec 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -7,7 +7,7 @@ import {CustomTooltip, RenderIf, RenderIfNot} from '@remix-ui/helper' export interface RemixPanelProps { plugins: Record, pinView?: (profile: PluginRecord['profile'], view: PluginRecord['view']) => void, - unPinView?: (profile: PluginRecord['profile']) => void + unPinView?: (profile: PluginRecord['profile'], view: PluginRecord['view']) => void } const RemixUIPanelHeader = (props: RemixPanelProps) => { const [plugin, setPlugin] = useState() @@ -32,7 +32,7 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { } const unPinPlugin = () => { - props.unPinView && props.unPinView(plugin.profile) + props.unPinView && props.unPinView(plugin.profile, plugin.view) } const tooltipChild = From e22ecedd0068aabfd38bfecc0a2e514431447b4c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 7 May 2024 09:44:34 -0500 Subject: [PATCH 14/54] Reload pinned plugin --- apps/remix-ide/src/app.js | 14 ++++++++++++++ apps/remix-ide/src/app/components/pinned-panel.tsx | 4 +++- apps/remix-ide/src/app/components/side-panel.tsx | 4 ++-- .../panel/src/lib/plugins/panel-header.tsx | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 98d9269342..1a826b2255 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -571,6 +571,12 @@ class AppComponent { } } } + }).then(async () => { + const lastPinned = localStorage.getItem('pinnedPlugin') + + if (lastPinned) { + setTimeout(() => this.appManager.call('sidePanel', 'pinView', { name: lastPinned }), 500) + } }) .catch(console.error) } @@ -579,6 +585,14 @@ class AppComponent { document.body.appendChild(loadedElement) }) + this.appManager.on('pinnedPanel', 'pinnedPlugin', (pluginName) => { + localStorage.setItem('pinnedPlugin', pluginName) + }) + + this.appManager.on('pinnedPanel', 'unPinnedPlugin', () => { + localStorage.setItem('pinnedPlugin', '') + }) + // activate solidity plugin this.appManager.activatePlugin(['solidity', 'udapp', 'deploy-libraries', 'link-libraries', 'openzeppelin-proxy']) } diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index db8bcba590..214450ccf6 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -41,16 +41,18 @@ export class PinnedPanel extends AbstractPanel { this.plugins[profile.name].active = true this.renderComponent() this.events.emit('pinnedPlugin', profile.name) + this.emit('pinnedPlugin', profile.name) } async unPinView (profile) { const activePlugin = this.currentFocus() - if (activePlugin !== profile.name) throw new Error(`Plugin ${profile.name} already pinned`) + if (activePlugin !== profile.name) throw new Error(`Plugin ${profile.name} is not pinned`) await this.call('sidePanel', 'unPinView', profile, this.plugins[profile.name].view) super.remove(profile.name) this.renderComponent() this.events.emit('unPinnedPlugin', profile.name) + this.emit('unPinnedPlugin', profile.name) } setDispatch (dispatch: React.Dispatch) { diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 81d19791fe..ea39a23192 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -72,8 +72,8 @@ export class SidePanel extends AbstractPanel { this.renderComponent() } - async pinView (profile, view) { - await this.call('pinnedPanel', 'pinView', profile, view) + async pinView (profile) { + await this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) this.removeView(profile) } diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 9d86ff6eec..687d2cfd50 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -7,7 +7,7 @@ import {CustomTooltip, RenderIf, RenderIfNot} from '@remix-ui/helper' export interface RemixPanelProps { plugins: Record, pinView?: (profile: PluginRecord['profile'], view: PluginRecord['view']) => void, - unPinView?: (profile: PluginRecord['profile'], view: PluginRecord['view']) => void + unPinView?: (profile: PluginRecord['profile']) => void } const RemixUIPanelHeader = (props: RemixPanelProps) => { const [plugin, setPlugin] = useState() @@ -32,7 +32,7 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { } const unPinPlugin = () => { - props.unPinView && props.unPinView(plugin.profile, plugin.view) + props.unPinView && props.unPinView(plugin.profile) } const tooltipChild = From ad720ed7f53629e40f9c8107d8028bc7fd51adf1 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 8 May 2024 09:07:39 -0500 Subject: [PATCH 15/54] Fix reload error --- apps/remix-ide/src/app.js | 6 +++--- apps/remix-ide/src/app/components/pinned-panel.tsx | 8 ++++---- libs/remix-ui/app/src/lib/remix-app/remix-app.tsx | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 1a826b2255..1fa9e2f8f7 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -575,7 +575,7 @@ class AppComponent { const lastPinned = localStorage.getItem('pinnedPlugin') if (lastPinned) { - setTimeout(() => this.appManager.call('sidePanel', 'pinView', { name: lastPinned }), 500) + this.appManager.call('sidePanel', 'pinView', JSON.parse(lastPinned)) } }) .catch(console.error) @@ -585,8 +585,8 @@ class AppComponent { document.body.appendChild(loadedElement) }) - this.appManager.on('pinnedPanel', 'pinnedPlugin', (pluginName) => { - localStorage.setItem('pinnedPlugin', pluginName) + this.appManager.on('pinnedPanel', 'pinnedPlugin', (pluginProfile) => { + localStorage.setItem('pinnedPlugin', JSON.stringify(pluginProfile)) }) this.appManager.on('pinnedPanel', 'unPinnedPlugin', () => { diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 214450ccf6..b9d9d5b416 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -40,8 +40,8 @@ export class PinnedPanel extends AbstractPanel { this.plugins[profile.name].pinned = true this.plugins[profile.name].active = true this.renderComponent() - this.events.emit('pinnedPlugin', profile.name) - this.emit('pinnedPlugin', profile.name) + this.events.emit('pinnedPlugin', profile) + this.emit('pinnedPlugin', profile) } async unPinView (profile) { @@ -51,8 +51,8 @@ export class PinnedPanel extends AbstractPanel { await this.call('sidePanel', 'unPinView', profile, this.plugins[profile.name].view) super.remove(profile.name) this.renderComponent() - this.events.emit('unPinnedPlugin', profile.name) - this.emit('unPinnedPlugin', profile.name) + this.events.emit('unPinnedPlugin', profile) + this.emit('unPinnedPlugin', profile) } setDispatch (dispatch: React.Dispatch) { diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 39684fc1fa..f184505d33 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -211,6 +211,9 @@ const RemixApp = (props: IRemixAppUi) => {
*/}
+
+ {props.app.pinnedPanel.render()} +
{ setHideStatus={setHideSidePanel} layoutPosition='right' > -
- {props.app.pinnedPanel.render()} -
{props.app.hiddenPanel.render()}
From 79a436262d32d68f456a45f634d67793b86c9cf1 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 13 May 2024 23:48:26 +0100 Subject: [PATCH 16/54] Fixed dispatch bug for udapp --- libs/remix-ui/run-tab/src/lib/actions/events.ts | 5 +++++ libs/remix-ui/run-tab/src/lib/actions/index.ts | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index eb2c4a8525..ee274fc55b 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -12,6 +12,11 @@ import { getNetworkProxyAddresses } from "./deploy" import { shortenAddress } from "@remix-ui/helper" const _paq = window._paq = window._paq || [] +let dispatch: React.Dispatch = () => {} + +export const setEventsDispatch = (reducerDispatch: React.Dispatch) => { + dispatch = reducerDispatch +} export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { // This maintains current network state and update the pinned contracts list, diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index 0df06aa448..ff39737ced 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line no-unused-vars import React from 'react' import { RunTab } from '../types/run-tab' -import { resetAndInit, setupEvents } from './events' +import { resetAndInit, setupEvents, setEventsDispatch } from './events' import { createNewBlockchainAccount, setExecutionContext, signMessageWithAddress } from './account' import { clearInstances, clearPopUp, removeInstance, setAccount, setGasFee, setMatchPassphrasePrompt, setNetworkNameFromProvider, setPassphrasePrompt, setSelectedContract, setSendTransactionValue, setUnit, @@ -25,8 +25,9 @@ let plugin: RunTab, dispatch: React.Dispatch = () => {} export const initRunTab = (udapp: RunTab, resetEventsAndAccounts: boolean) => async (reducerDispatch: React.Dispatch) => { plugin = udapp dispatch = reducerDispatch + setEventsDispatch(reducerDispatch) if (resetEventsAndAccounts) { - setupEvents(plugin, dispatch) + setupEvents(plugin) resetAndInit(plugin) } } From fea9c81dfc09ac2907da222a16af5ad332b46aad Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 13:04:02 +0100 Subject: [PATCH 17/54] Fix right dragbar --- .../remix-app/components/dragbar/dragbar.tsx | 32 +++++++++++++------ .../app/src/lib/remix-app/remix-app.tsx | 4 +-- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx index bb7bd77613..609cd6edb3 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx @@ -54,7 +54,8 @@ const DragBar = (props: IRemixDragBarUi) => { const handleResize = () => { if (!props.refObject.current) return setOffSet(props.refObject.current.offsetLeft) - setDragBarPosX(props.refObject.current.offsetLeft + props.refObject.current.offsetWidth) + if (props.layoutPosition === 'left') setDragBarPosX(props.refObject.current.offsetLeft + props.refObject.current.offsetWidth) + else if (props.layoutPosition === 'right') setDragBarPosX(props.refObject.current.offsetLeft) } useEffect(() => { @@ -66,15 +67,28 @@ const DragBar = (props: IRemixDragBarUi) => { function stopDrag(data: any) { setDragState(false) - if (data.x < props.minWidth + offset) { - setDragBarPosX(offset) - props.setHideStatus(true) - } else { - props.refObject.current.style.width = data.x - offset + 'px' - setTimeout(() => { + if (props.layoutPosition === 'left') { + if (data.x < props.minWidth + offset) { + setDragBarPosX(offset) + props.setHideStatus(true) + } else { + props.refObject.current.style.width = data.x - offset + 'px' + setTimeout(() => { + props.setHideStatus(false) + setDragBarPosX(offset + props.refObject.current.offsetWidth) + }, 300) + } + } else if (props.layoutPosition === 'right') { + if (window.innerWidth - data.x < props.minWidth) { + setDragBarPosX(props.refObject.current.offsetLeft) props.setHideStatus(false) - setDragBarPosX(offset + props.refObject.current.offsetWidth) - }, 300) + } else { + props.refObject.current.style.width = (window.innerWidth - data.x) + 'px' + setTimeout(() => { + props.setHideStatus(false) + setDragBarPosX(props.refObject.current.offsetLeft) + }, 300) + } } } diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index f184505d33..d458271243 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -98,7 +98,7 @@ const RemixApp = (props: IRemixAppUi) => { props.app.layout.event.on('minimizepinnedpanel', () => { setTimeout(() => { - setHideSidePanel(true) + setHidePinnedPanel(true) }, 1000) }) @@ -220,7 +220,7 @@ const RemixApp = (props: IRemixAppUi) => { minWidth={285} refObject={pinnedPanelRef} hidden={hidePinnedPanel} - setHideStatus={setHideSidePanel} + setHideStatus={setHidePinnedPanel} layoutPosition='right' > From 78ab826b17dd9d647074308ec7d5d3bf38328274 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 13:15:12 +0100 Subject: [PATCH 18/54] Remove unused comment --- apps/remix-ide/src/app/components/side-panel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index ea39a23192..5a3f79851e 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -16,7 +16,6 @@ const sidePanel = { } export class SidePanel extends AbstractPanel { - // lastPinned sideelement: any loggedState: any dispatch: React.Dispatch = () => {} From c3a74fba5b3cf01043113ed3b9854ce4021be2e9 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 13:34:42 +0100 Subject: [PATCH 19/54] Fix linting issues --- apps/remix-ide/src/assets/list.json | 92 ------------------- .../panel/src/lib/plugins/panel-header.tsx | 6 +- .../run-tab/src/lib/actions/events.ts | 2 +- .../remix-ui/run-tab/src/lib/actions/index.ts | 2 +- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 2 +- 5 files changed, 6 insertions(+), 98 deletions(-) diff --git a/apps/remix-ide/src/assets/list.json b/apps/remix-ide/src/assets/list.json index 04a4929e01..e1eb4bd94d 100644 --- a/apps/remix-ide/src/assets/list.json +++ b/apps/remix-ide/src/assets/list.json @@ -8,7 +8,6 @@ "keccak256": "0x4a1c2a6a4896edefd3a4178a6c3ed8f1de625bd7c00dd7cc5781a9f36236e7db", "sha256": "0xee7ba01680ed3a1c1cda236189a51c1e6ff99f6dca602a580e5b16441772b50b", "urls": [ - "bzzr://83e99aa35ae67e71bf77040e5b4686aeb3558919f172b6c28213a4dcd8d79e91", "dweb:/ipfs/Qme9brfZS3XhbiRbbNDKhBpgFknyD92omMmYa7XSf56bJP" ] }, @@ -20,7 +19,6 @@ "keccak256": "0x07994ad8c59c498bf44ca8e84914e27b79be964d98a9556226db377819d67387", "sha256": "0xb83d2025e0bbc7f7f0dc9e47f5aa22eacb548b42c55add8f5f6822c105163500", "urls": [ - "bzzr://414fc715062f91971c8e0d9fbdf470dd24a8a35f4f96df0ba79980cdb0ae7eaa", "dweb:/ipfs/QmcBZ6Q2iHmrf9omvD7Jyy8kgrqyPmZFwvKWqvVDaxo1Ta" ] }, @@ -32,7 +30,6 @@ "keccak256": "0x4c358c2e90447ad9e7c1816b5be8edde1172f67dedf16755a6c7373ede46b245", "sha256": "0x9825565e1f199dbed6de01d27e10f83a9180300acab80f8469bf427e3cf92e96", "urls": [ - "bzzr://6ecbe30c4c8530b82d55ed6bec12e63efbab1cb16868b020d65399a8793599a6", "dweb:/ipfs/QmcEK5gvWNeHUtjsF3B6j5AXb9uNoG3aHbPrCMJDx7C8TM" ] }, @@ -44,7 +41,6 @@ "keccak256": "0xb67df5c37e8255e0de7918b6d3261f0f29e277d121bf5f414b66157a5b1070cd", "sha256": "0x67f8a94b60278cfb80d505c47a1a5e67ec2caf20167ef85f2bdf2a80a692bd1b", "urls": [ - "bzzr://7ba69a10a4585d0a36e5843603476061e8b02878331fa580d5c2509ef01ddaa6", "dweb:/ipfs/QmVumPvgQVFLZvDvQddcDGcdxjbVWTTzxoQvJAECBBZ6Ju" ] }, @@ -56,7 +52,6 @@ "keccak256": "0x62a65d0a951617f022524fc844ca11d90266f64e693343a2f41107183bf364c1", "sha256": "0x66da311056ec26c9c3fb501350ee22187c30e79c41bf2713eeff7d84479948c5", "urls": [ - "bzzr://ccf4f1e05d942946bcca929e9263c541b2749bf1faf6dc6c211b4bf700344d71", "dweb:/ipfs/QmXf2cKYJ26tXAU6A6tmUk2dn4tuX3CWNaXJVnGLuoe15y" ] }, @@ -68,7 +63,6 @@ "keccak256": "0x06afcb6dc23efb1482545b63c5e3983dded0c383ecc46c3ae319f7b868201e47", "sha256": "0x9e386edb2ee759ad65792f7d62c10ae7edf65c5b874a5451f1e695e586b69eea", "urls": [ - "bzzr://e93e97b9989cd59673bb1fd64a0f940e8729c3c40b819593b8590480cba24bea", "dweb:/ipfs/QmSJFaZhpXQ2EPF2koyiTNAiiuJRykv1Q8yubhkmBhvYyu" ] }, @@ -80,7 +74,6 @@ "keccak256": "0xcdf7c4d4c6b9331b755170fa927692019c94088f87f100d2c3c920bcc3740d0b", "sha256": "0x7184dae0b761485a5dce66b50075e17857c5b55fe3fa71fe22d4d5acc0839741", "urls": [ - "bzzr://e21d2bd58112fb165fa2c253504bf49ceca661ac1009d270a31cb996560cfa34", "dweb:/ipfs/QmYJuZgMbeMiotHAFNWEXdxjTa5yi7GaV4UkgBYABomFpj" ] }, @@ -92,7 +85,6 @@ "keccak256": "0x52ca702b8ed4b1e6d43d8a006b3d27f6dba611bac118c523711bfd209fb1cc9d", "sha256": "0x8db9466df3b91c52e3412cebd13176ea9fe16d3239d000828a081c34ce899337", "urls": [ - "bzzr://24dc5536a4771b2336fa304f3cd38d5203b6ab49c78a3057ec578991f3fcf265", "dweb:/ipfs/QmZZ9hNntBxJw3G7LGW3e8nXtnGxLnaSMM44K4BbLrkELs" ] }, @@ -104,7 +96,6 @@ "keccak256": "0xcd8a6a8b2626de75ef6ff73fb724f3ad5693a8902f86e88290f048b56182e7cc", "sha256": "0xd28a58fbc3ce56ff650d4daf3a1d8092e25cadf2a5b2769fd333b321dfc6a22d", "urls": [ - "bzzr://6a5d22e366c35f184d5203f3e062131018d8a4d09cf770a0720cfaf4d7b49705", "dweb:/ipfs/QmfHjv4nYKuv3yFpWZqBYyiYEYmkQGydQmFT5b6mJkFpWp" ] }, @@ -116,7 +107,6 @@ "keccak256": "0x43c96fc79cf288cecda12b23a17f30b1cf0427a19dc7c1c094bb461eabefe0df", "sha256": "0x9af176f42b63eaec838999a07e80484f92f41a0fc497adefa65baf88d8fbecaf", "urls": [ - "bzzr://fc0e644a61e43592754b66f8d911c91312538debb89da29ffda3d3fd81ff70d9", "dweb:/ipfs/Qmf7WYJJ8y6oHr4RQ7HC4tXgFPGvsnp3Qf6TrMBdK52Y5Z" ] }, @@ -128,7 +118,6 @@ "keccak256": "0xbe94ff397be2a951cbeb6c9c1a60ddf531d0ce76f45d51755386b6fa42cc2e2c", "sha256": "0x6ff1683eb76dc58c31043fea474be6da8535ec625d1cd8331a3daead84fd5564", "urls": [ - "bzzr://6e134aa89a00a18d930924fc2fad2aa434f80b6a71085ff2ab379e3672c812e7", "dweb:/ipfs/QmeBWFbK1aAxnB6muXWStZJWndrFvMJt4xfAzEJD7AqaY3" ] }, @@ -140,7 +129,6 @@ "keccak256": "0x178e51ad0c6a350ec4ed6fd07675dfd4d2581ee07b14b4954dd0b0f6d8633ca5", "sha256": "0xd70ca2f656a88a9be7a3f7d602f03b30149b3bda0d1057cfa3a3c5e3d6e07453", "urls": [ - "bzzr://6e43013ff973198d7fcc4a43910041f2f07d0099f4252737a2a2545443b11105", "dweb:/ipfs/QmarthW41sfbrdkMmCK6jicXFZDGgvALzdgzygtUqEauae" ] }, @@ -152,7 +140,6 @@ "keccak256": "0xb8c3f5654b323cea016c0cc1a4584069714cdf796489efe2496a13f8f83a0e63", "sha256": "0xdeb3c274f8b840d657e2f9b1dba602e89f58b1bf3fd7178c48c9033310a1f006", "urls": [ - "bzzr://084452a20ae520bba965ba0b863f3d6de0516d1f92ddb512a138fb787d841c55", "dweb:/ipfs/QmNUf8dTW9xANAvJmV1ho279AyWSCCvDp6bXet1QTcS2z5" ] }, @@ -164,7 +151,6 @@ "keccak256": "0x598af6fec02a6783d6a438a6bb0f7d3012716d003f7bf6c9ac5a4d2bc911941b", "sha256": "0xd522b307a014a32ed5815b05045c4396abc047e70c8a53c1e3ef92e14daa61c6", "urls": [ - "bzzr://cef259b97217a7526819155f6dd513768be5f8718324ec3a63c315071e2f7c70", "dweb:/ipfs/QmWGK9FbQiNWNeqysvCNCBw3q7cR1dzpnD1EKtNija2zyK" ] }, @@ -176,7 +162,6 @@ "keccak256": "0x93f7046d6e0ea2492ec5229936821b3b020dbe9eb2e1193953389293d64a190b", "sha256": "0x68ace74ca809ff47b09449d4054c77907d9412f14f6003d5475b60f4fec13709", "urls": [ - "bzzr://8943b9e6d4ec52bda1b8fbd65509168ba3388651a30cb495d5280cfbf35614d7", "dweb:/ipfs/Qmco9fGHM6mdaPVYqeDQ11GB3BrCbwRcEzM5XzHpAdAVWc" ] }, @@ -188,7 +173,6 @@ "keccak256": "0x7def3c264883cbe6ffbfc54894e48f9a0d2984ddbd1145eb898758d2a41d1559", "sha256": "0x54f3dc64f2ff5a5350410f6157a537d96fb4aeec90476e90a951ddfbd1fe4bca", "urls": [ - "bzzr://3428015c422bb223c3fe8c3a85615081981c47ead375564c16701b261948f0f1", "dweb:/ipfs/QmXyyuEWhexuez2rzAeFjunpiAhncD1AfcXitGNHxpRWha" ] }, @@ -200,7 +184,6 @@ "keccak256": "0x9ffa9ee890ec483580c0b4ed72270b16e92eb0b7a8a97fb00c257f8809aa4023", "sha256": "0x3e64525797e0b2d9abaeb022688cc02d63fc5820327e382fc6574a7de650dc97", "urls": [ - "bzzr://395f2d903c162ddc9b6ebd76db450ca6cb9cf8bb276c3d705aa462ae560d23ab", "dweb:/ipfs/QmW2rPbEtiVAbWJxtizzDqTjwpRpXCxkpSR696g9GxAYKT" ] }, @@ -212,7 +195,6 @@ "keccak256": "0xf0a6c32af3eaa2f8c6d9e6c8b90f3bac5e775c7f1c90a61c1e72b593fbb1528d", "sha256": "0x0e6d842e941cd8b76280c59f28f6d020af1afdea8e4be9d9da677ac5dbe860c6", "urls": [ - "bzzr://f44b067fda20d169321fd3616f68633fd7a4277b6340f42f74203f33dad4a472", "dweb:/ipfs/QmSwumWbYwYe4xLcqpi38VNtw7xCgbNaUkRhiZro9EnqLt" ] }, @@ -224,7 +206,6 @@ "keccak256": "0xeb8c3c474b5fa792f9b1b2ac6be945c32f835ccdc059deb562da4e99a031eab9", "sha256": "0x7fe677e8214d0486fa7164f797862fae0a0fefb7b72cf6ad8e728faa54f12b60", "urls": [ - "bzzr://37026d0ee2865c52fff8f6311b67b94f96dbb52ce8af3f84c3a9aeb47b12bf47", "dweb:/ipfs/QmbgEAtdmSoxH4cfRJXj7mVpKv9rT5Cq2YmXmAnjgsyqBC" ] }, @@ -236,7 +217,6 @@ "keccak256": "0xf824e695e8e66079b4b6063622c7dd80ed056d29969c8c3babac4fb572f3dfec", "sha256": "0x5bb50839ba5116bf31669f3de8dad72eaec298ba32a643be7d0dc2d1392c54d6", "urls": [ - "bzzr://d847bc8f5d43cd348346c5bb253269de36f00810c2e189ca64a4becdb9e9312f", "dweb:/ipfs/Qmf5RrLbWeMykvWJbCyyThCLQ9YVmU8uWagMdSp9nNzZMc" ] }, @@ -248,7 +228,6 @@ "keccak256": "0xa60eadfddbfda0daebb8a1b883b89d33b800cff7ce7e12458170ea17cd5ede58", "sha256": "0x8c2a69fbab9bdf503538028c697e09e51a7e699323ae7100c375cb35c415a819", "urls": [ - "bzzr://87e29a7298d49b8b52ed01d6146b05aa41c11a85d1b805dd48181ac2ed5e9b22", "dweb:/ipfs/QmSZEQEGuVJ7hudg8FzfDMXKVtn5AVGKaxbhSSDXwpX73K" ] }, @@ -260,7 +239,6 @@ "keccak256": "0x6c6dfa967526b7060634474ef730761711e5be662abf5ee02dc05985abfadec9", "sha256": "0x9852ad94048600cc5a1458b4a7ab625996844c809b314422693bdc81d953fcc0", "urls": [ - "bzzr://3edc1542fb719d3e08138b492a5db06333fb36055a434c3b071b2dcb69e54fbc", "dweb:/ipfs/QmcsCpg6kfp7Vea4y9qPtfDXcaQJbDidb65n3t9f2MFDpR" ] }, @@ -272,7 +250,6 @@ "keccak256": "0xd0f9a689670184ad874ca6a2cb40dfe57e9cf539d9330ca3f2501951478eace8", "sha256": "0x4197bb1cb0ea7e637ed8a0e7810f1bfe32c90d0151d6f423bb3dfeef9f6777c4", "urls": [ - "bzzr://1abbc4967f3c6c5124f8876abe521d508c71b0d0d64dc066c1e7a1bfe6ba596d", "dweb:/ipfs/QmY7UN95hdfFSD1jwFANegze5eLX8PgP5BfWFH1usTB8Sw" ] }, @@ -284,7 +261,6 @@ "keccak256": "0x50972c5b966188341d133aa58fbf895c54655d7bd733fb5ad58852e85f9f9444", "sha256": "0x73458d16a3e34fc7b489d2399b3680cccfc968d01abc9f1b61e438b6fb0c24a1", "urls": [ - "bzzr://9eab5a9c94bde3d90eb76a1189febd5ae4d6c7bbc63cc1d76e8871e14e6e9b89", "dweb:/ipfs/QmPUJNa1LYaThwLQsw6fF5DMYyDfEg57gmD5wCsazkLS8c" ] }, @@ -296,7 +272,6 @@ "keccak256": "0x74f927b4f520d8d31863996a100ebc7827f919c77f777f6d4d416c6e613a03c7", "sha256": "0x98c350cc41f873af84a78d1e24cbc8449045ee54923af0a39440e4d84600dc50", "urls": [ - "bzzr://a052dbfe589a766af66d85d4d797829241e867e0ead93fbf3d5e492c71b6434f", "dweb:/ipfs/QmZbo5YkSbcenWrUDjiCvUZdQe4UrNBw9vtx9nbgcMdRAs" ] }, @@ -308,7 +283,6 @@ "keccak256": "0x4cc2bb4c8894ad4349a88f330ba74d7ea643030d3f68037d1c94c370b6a25dd7", "sha256": "0xf83e8f7014ad6b8bc801dc3684c644e372673ed678425c35aea5d4b4fe37e922", "urls": [ - "bzzr://2aae73578e361285488b6319e8e7b27e23b2736eeee3953cd65f1207cd849395", "dweb:/ipfs/QmauztXLDUdwJitA4Uc9MQYCTttUcivR5foTZYgwt4aAeC" ] }, @@ -320,7 +294,6 @@ "keccak256": "0x92b9c5de10bd908527e9cfba3f04bbe637163b4a5313c5a69179ccddd5fa6685", "sha256": "0x782a999d3e1227c86854e7e29954ee856c6ae684124b9facf09f4f1724dc4e85", "urls": [ - "bzzr://fb1e9b951ce8abe575f8514bff6baa01417a988a399fab1dd27a252e7812d1bc", "dweb:/ipfs/QmUtwmzqqCftcubfyGwAefLBQ8ffp8EFhW7HCEQfhaviFs" ] }, @@ -332,7 +305,6 @@ "keccak256": "0xc9c60203789ef778b9104ae7a39e9090b3d1256b24983d49e40e7d1e3c3ed65d", "sha256": "0x264d0d25e31cb32f4369f82ba3ad0b6a84a8a1975b10bd738123ddf947618840", "urls": [ - "bzzr://335a6b94d26623dcaa4590ccd6d7529db1e153b65af3bf7def45fffaf9ee256a", "dweb:/ipfs/QmRd1uRbHRvpybQk5TQ11zyqmG4wQqHnefgvYdJ14V5D8x" ] }, @@ -344,7 +316,6 @@ "keccak256": "0x2921f518cf5a0627d96e07e8c3d2b5482dbbf14d7dc6bbb055481c46d98903f3", "sha256": "0xaf811843add541705ff65f0c20fd864bd0387116544524fa1830cf67a14af6c4", "urls": [ - "bzzr://31231abb33dc43d0478f03a4c8b15b161b172097c884307cf6cf64aeb83a6dc9", "dweb:/ipfs/QmYLhaeGbq3tFdCUC2pvtA8QdGnCbA8kn24z3C741k5TUE" ] }, @@ -356,7 +327,6 @@ "keccak256": "0x1980cf8a81c6bd2b371bf7d9145c819a7fb2d72e9aa462aaff0c10b4eccd595c", "sha256": "0x69cb1300b5f72eb128604507991d9ada97180d31afde7c59aa3fa3ae9ad5200d", "urls": [ - "bzzr://7f35988e2c32ed2f3f1885fb81ace357b1555964d23085940980cacd29023da6", "dweb:/ipfs/QmPfxPYsYysRR8HFkWr47FMQ8ardmfmtrmdYc2ogT9Gfp9" ] }, @@ -368,7 +338,6 @@ "keccak256": "0x3efd0585a3c00a1a2c62e590e22a69aa981d1b5148af2ebdbe1610dff93cea78", "sha256": "0xaff4ca62ac0b03cb4b9c50f8250e2e7307b5c75fefc9847f269bd05c20367148", "urls": [ - "bzzr://e30e085b875fc291e5ee46ed7c88c28ec8e8c540ad8c799b106c365a52df9e97", "dweb:/ipfs/QmaZrQSg8njYzFXH2PzwxHDLKxkBhKmYmLm43DJWnurPeJ" ] }, @@ -380,7 +349,6 @@ "keccak256": "0x9b7a39606c3c27a8619b3eb493efca512cbd26c5ab7fc95489564239aab32a50", "sha256": "0x24b4cbc28d68bde8455c14a46b55e4f292c3c295271e09991b2176a487cb4487", "urls": [ - "bzzr://3bccb9b8cee48b99b39f2f1296f7353bcd39c1ae61b1e19e5add7cedd0256cb2", "dweb:/ipfs/QmQmkd5FGiKKg8eRmo3L7Cn62nuV1M6GRDUGiq5bAx4AWx" ] }, @@ -392,7 +360,6 @@ "keccak256": "0x4a6244b03de1968f0a48800e75640921d62b7602d0301093e1c5c318d1effb36", "sha256": "0x91ed0cf4390f33174a4aaf49d1ce7cd9c72e28b95d2f9422314a29b2144b2042", "urls": [ - "bzzr://a5ab50564d82e6d55b462f4f85284d3fac294c78f2699b680544bc7efde2fb16", "dweb:/ipfs/QmRPchg1b5ofkLnLTPuunfSMKnxbXcZyzSR4NkyJAYUTrR" ] }, @@ -404,7 +371,6 @@ "keccak256": "0xf46cb35b3aefb9b3d59a1fb4c151eb23a0f0a05387b379b3e7fbed1c01c861df", "sha256": "0xaf812445476c101ae5ef92941c79eaebf57b39d455bdfb54a6a86b4ab6ca498c", "urls": [ - "bzzr://2e72b599d5a700cbd03d9f7ca082464b4823dbaabfc5e1031075b9631c005d35", "dweb:/ipfs/QmPYEmgLWDjk7kPGovojurz7fzdGv8Ti3H66nEzRzdiGwh" ] }, @@ -416,7 +382,6 @@ "keccak256": "0x66669372d2d958bfeb5129a387dbc3882a96e260fc12e2910a7eb148b8ea5dd6", "sha256": "0x9ffc04d0aee2c817ae6a897b1ba5aaca2bcd860416aaddfaa4de553fc1ad6e8e", "urls": [ - "bzzr://5f5dbf4ebe3be5dbe3e917a2de3908b3a9ed24207a6406a6e434e6f041e993c4", "dweb:/ipfs/QmYWL8Z3yXfCuhrprimdLhYFkjR74TjFHULxcABbUipetv" ] }, @@ -428,7 +393,6 @@ "keccak256": "0x27e324f75dd52eb180569e7a8865048253e5fcdaacc52e7c998ecaeb78dcdabd", "sha256": "0xfd7c4e652d5891c84d93b28c90b8ac58c9253d2a3677935883a337ee96087b8f", "urls": [ - "bzzr://764a91ca290bfa564d890f3c1a5a88067b04e96398f223576cbdd17bbc1faee2", "dweb:/ipfs/QmdEr1zJrD2UYawZzeE6zPuYiYaSHdpLtKeHYixHgRp9ko" ] }, @@ -440,7 +404,6 @@ "keccak256": "0x05c00863784c63220704197d8446ac1e277fe53c42b5264093960b7bb70b9792", "sha256": "0x25cfdd733e9c780ab85373268fde7bfa2e4b22093af57422ca3b586c7af7cd60", "urls": [ - "bzzr://18fc5b15154aef1640559c31bbd91ae267def62a2b86e434564184b6d3d283ce", "dweb:/ipfs/QmSUakgiWEffZ82RrN7hgLaemdqtLSCD7pfGAKxGhDUJxB" ] }, @@ -452,7 +415,6 @@ "keccak256": "0x7c967d9dc0fdca0db88a7cee22cf5886f65e8fa8b4a145eccd910fc81a1c949d", "sha256": "0x7d40c6325c0aa4635babdb8913626b7c4bac6a4f41e1c383de5f398e1fc98e1b", "urls": [ - "bzzr://c1f03890d82592751d779ea2da8a690e15b0ccc5667314bf634c1f16ff4ed322", "dweb:/ipfs/QmZcHLPfa2Dz8M3justKYyDmDnaNo4pseTgAeQbtJNYywe" ] }, @@ -464,7 +426,6 @@ "keccak256": "0x012ae146ebdd510b31c1e44a8d60071a66cdebc77f0e743a6ebc2fe68e67d297", "sha256": "0x566601442deff058d393359df59ed72b41e1f6a65b0aa371fab7f903c189b59d", "urls": [ - "bzzr://47c24a09321abb781b5dbc05fffae84ece6844e41a295847dd68ad69633f60a4", "dweb:/ipfs/Qmej9jEnSsD2LqGnL4jgbUvHTxTwiFiHqeMpqyuPLaX1uw" ] }, @@ -476,7 +437,6 @@ "keccak256": "0x4ba5500559a9ad03e4c1d3866ba9d915cdb5d7f2e326b4cb1fa0fe7bdf90dc27", "sha256": "0x89978dcef86244b8e7af95298abe26aaf4825df819d6c556e4323dc152c988ad", "urls": [ - "bzzr://c609e5725e607a4d853f33c8d46064e0ab11b489f7a585134cfca570e29f447a", "dweb:/ipfs/QmdgDj3bPSKU1xKMY8FRHj8E6z9BQefeuaVuF27RpvZMXJ" ] }, @@ -488,7 +448,6 @@ "keccak256": "0xcda83fe69ce2a319d0caa20c98b53ff36ea1886054ab3dab23fa80ede3dcdea0", "sha256": "0x1784f89fcfffccddaa94273a58e452682f61dea05d142406775f099c6ef5d61f", "urls": [ - "bzzr://5eacd00f2f132ea8fbb308baed9753579ade721a44e94067debb602e193b7ae2", "dweb:/ipfs/QmPA1Uf4iwkr2ouguzxxFepVxaRg36XFXxiwqYUuwafQzQ" ] }, @@ -500,7 +459,6 @@ "keccak256": "0x432dd5d662d88c2316b4df503f693ae9e6e8ed4216726db2fdb3e7f628523fe5", "sha256": "0x6e095eefc48dfc21fec18d0b63f229e929f881b5d6e8a999e1622c6b707a7f54", "urls": [ - "bzzr://1b3ef14eabfe47ff614c088337dfdf163c695612c193aeab9ac5a2af69d30334", "dweb:/ipfs/QmSgJ8Ru6vraz9CyCDPMifVxpckkoooVSBj9vYcQqG4wG4" ] }, @@ -512,7 +470,6 @@ "keccak256": "0x98e1027fbf3acb279f740c3b38df69d79ad3f2e6171414508d50604dc2dfc13e", "sha256": "0x43b85bc9941814b018065da5c6c8d40e2af49264d0d1f06bdefbfbe628e65ff8", "urls": [ - "bzzr://b6283a40a65b321a0e88f61594fc8bed00fb21a53c7ac1bf5ae421706a372d01", "dweb:/ipfs/QmeXatGB9MdWA2NBLSNQbcKvuZpa4Sxem51vCrqyQGfXnU" ] }, @@ -524,7 +481,6 @@ "keccak256": "0x6f9251f86fd798a3ae25688307ffc7a9984dcf0d809a1aef54f5c68b6cf9fb6a", "sha256": "0x0d34e4ed048bbf67daacdf36cd5ce0f553a32962967b52edab6afccaa071878b", "urls": [ - "bzzr://e866e6bdb31fea0646b44a8e57acc9505932ffe813028ce1330ca49fe3edc4d0", "dweb:/ipfs/Qmdx3AHUB8bN6ZZs1XsTV3Gz9FV3gAB7x7JbYeUsn43Azu" ] }, @@ -536,7 +492,6 @@ "keccak256": "0x6abf17bdb1b934d072739e0e083ecfd579c523d200d45184b8d3987924ca0454", "sha256": "0xa09c9cc2672678d461dc71100600bb58802db87be4de9424769241712ccbec03", "urls": [ - "bzzr://9b51780766b138ee36e2796cee7bdd4cb494da5d925c36cc6101202818d37e42", "dweb:/ipfs/QmQjodGav6KhMDjuoyJ1ag8osgKLBsFC1E9LmaGP7qCRZ2" ] }, @@ -548,7 +503,6 @@ "keccak256": "0x936e6bfbf4ea9ac32997adb893b0aeecd050cfef8b475f297dca1add0a1ff934", "sha256": "0x7fd1d3f1fddc615e117f7fb7586acabd60c649c390cf110c8fdc5ce159fa5734", "urls": [ - "bzzr://949bfec63a83091f5d08d6d8df36fa34e674d75206e8a6476cc0ae18f3c57bb4", "dweb:/ipfs/QmNrRJwVHaJSZ3aAQZWZKjV9o8BqWKFP3RPYL6hKU65PAE" ] }, @@ -560,7 +514,6 @@ "keccak256": "0xea559c55bf7046cb48378fe9b43eaab6e345700aa22d701fcf946a42ec6b1008", "sha256": "0xf22c63511a85230f7640ff5a77433db643d8d32be8b7c7f1dc24c1301a5158e9", "urls": [ - "bzzr://471b0435c47963835dd0f70d67ec069fab5daadbe6c8bf760d2e50adfb839461", "dweb:/ipfs/QmTQPQb6br2VEzKTiXBEE6z69xRXEk24xi2R2gn8EsvGD9" ] }, @@ -572,7 +525,6 @@ "keccak256": "0xb2657b5ce7a9b405a65e4a88845a51216cd7371e8f84861eef9cb0cb20d78081", "sha256": "0x3628fdefd6971ea9cc16acbf91e5f6d6cfb2079181784b47e4d24f4c5d92e4e4", "urls": [ - "bzzr://7bc2dc95d81092991a4122b45aad03f9cc62bc98fa455f03fc9286445ef9de8e", "dweb:/ipfs/QmYWAkYAJo59kc5dHWaLuQqEm7xusESdu5meDzjpxnyXKt" ] }, @@ -584,7 +536,6 @@ "keccak256": "0x7dc96455c864b49abc7dd5f38ba6a47904709ad132ea36babbfce98d42e962e6", "sha256": "0x25f564cbecc5bfe95d6d358e0e7543c31ece0ab1332c555ff323ca163711bd2b", "urls": [ - "bzzr://f61230aa01565c8c24aa2ed50eec7dfd26195be35f5bbe4445c6a3efceaa4b7d", "dweb:/ipfs/QmaLUM18c7ecA911ig5u2HY6fAu4AiUbhJpnZwwCMc9cWi" ] }, @@ -596,7 +547,6 @@ "keccak256": "0x39ae8b2f3ba05ed7d4a7c16f0a9f4f5118180a209379cfc9bdd2d4fb5d015dff", "sha256": "0xf89514dedd8cfb3c4d351580ff80b8444acde702f8be0e5fad710fe6e906c687", "urls": [ - "bzzr://1d6deff5623d883b8d0b3a3a5539e4604925ce4c1677defb86e0e37838ea70c5", "dweb:/ipfs/Qmd9JfFpUXsUQrJad1u2QDuMxBMeVrcG8mrpfJVV9jiBXB" ] }, @@ -608,7 +558,6 @@ "keccak256": "0x435820544c2598d4ffbfb6f11003364c883a0766c8ac2a03215dd73022b34679", "sha256": "0xa4fd5bb021259cdde001b03dac0e66353a3b066b47eb2476acb58b2610a224ca", "urls": [ - "bzzr://62ef2a9bf7dbb8fd596b7c6ca6848d9b1a6c8562d10239659f0a56ee27c110ce", "dweb:/ipfs/QmTxzbPN4HwcK5YX7n3PNkb1BzKFiRwStsmBfgC9VwrtFt" ] }, @@ -620,7 +569,6 @@ "keccak256": "0x6262768243c1ceaf91418e52dc6f52d2ce94d19c6e1065d54499b7bc4d6e14dc", "sha256": "0xf8f83757e73f33f44389d1fa72d013fb266454a8dd9bb6897c7776f8fc3b0231", "urls": [ - "bzzr://ed91c1114615572c10a34f0ab28a3a159d2d433fabbcec9eae7253c25ecac8b4", "dweb:/ipfs/QmRUoBQeA5zpun1NK7BvBhQk6pTT4uZw7Jn2wZnWQETH9W" ] }, @@ -632,7 +580,6 @@ "keccak256": "0x3c9cfccc78bf352f4c7901d7af76757bd228f93af2634af4cd16b4916c13e44e", "sha256": "0x09f6098026622c5c334c7798c3ad2b8f7c0ebc62f87846c7d5e7e725c3d1cbc2", "urls": [ - "bzzr://ab23bd0e01952ee485f0426c9c4e47fcf6a508bc4919e83be31c0f9ea6e396ca", "dweb:/ipfs/QmRj2pxXxvmJ96i57maVjLMfs4DUtCuptM8vSVvvDweJ74" ] }, @@ -644,7 +591,6 @@ "keccak256": "0xb463b6a61fc027247655a32cbfd50bf543eafa3a6b42ceacdda7293e3ada8866", "sha256": "0xb795f1b20f065a0aee492c24071fc1efa1633c3caab77cff20278a9ae822f04e", "urls": [ - "bzzr://c82fea785ae31fb4847f5640e6305edc05d1a5b0b47552f60325c25cce280f75", "dweb:/ipfs/QmShUrNZf1dZFjziorJYE8fMGNUSMFsbaR3ipSvsCMvExM" ] }, @@ -656,7 +602,6 @@ "keccak256": "0x537cefc0579dd9631ec952cae951b3df0a50a3e557b5638107a67275f7aacc07", "sha256": "0x3e8b01cbd194e40971b41017ada7c8b2fa941b0458cb701bdfb6a82257ca971b", "urls": [ - "bzzr://130bff47eed9546c6a4d019c6281896186cf2368b766b16bc49b3d489b6cdb92", "dweb:/ipfs/Qmdq9AfwdmKfEGP8u7H9E4VYrKLVinRZPZD1EWRnXSn1oe" ] }, @@ -668,7 +613,6 @@ "keccak256": "0xa2d4d3ebe5d52bfa7ddf1a1fcd9bfed81eaa8678e6a1dd5a1c84954dd064422c", "sha256": "0xf1724fd46b7a353561b3f8d473b0dc8c855b6d84b5af559d7e3326ac79b9d758", "urls": [ - "bzzr://2c5fff6b816edb78adb2220f175591c9f4f6d38cfd27a83afb1849191cf9a524", "dweb:/ipfs/Qmad6iesaR5FQ45RRtMrt2Fa1EYDuq1oGoMJJB6beMHESn" ] }, @@ -680,7 +624,6 @@ "keccak256": "0x620163da7ee7b2622c9ee48b06110a52739f633189555148a3b5ecf767e60cfb", "sha256": "0xfa27ce9d23bddaa76a4aefbafa48e48affde9a1ee7c8a5e8784cf8d4c390f655", "urls": [ - "bzzr://823b4efe3ca2964d660348214fd1a44579e13e1e8ce69a81f447372a11d60316", "dweb:/ipfs/QmUinsRZvs2zFNG6FMWy7ngTYUnZccXq7MRtgpj1dPfxu4" ] }, @@ -692,7 +635,6 @@ "keccak256": "0xf0abd02c495a0b4c5c9a7ff20de8b932e11fc3066d0b754422035ecd96fcdbbc", "sha256": "0x9778e4a7667d5fd7632caf3ef3791d390a7cc217f94f96e919a31e3be332386a", "urls": [ - "bzzr://9f9244a3605543a67f5ff35f21e3d6d3331a6e1361f09b271c37f396b5b89bd5", "dweb:/ipfs/QmXyjgFNMyFD4fdf8wt9uvUU92MGdDVGmcPdMZhNEo1g8N" ] }, @@ -704,7 +646,6 @@ "keccak256": "0xe1412d909a0dae79b13c0066b9bf08831c522daec00b273bbc19a799af213d6a", "sha256": "0x3e1956c550ca48e289044c7c0bd892403081b4b5e17e77ce707c815ce6c4228f", "urls": [ - "bzzr://b69ab6704a1e42fddb326e91f331e35fdf071b158e8754e2c887c0e607aee7b0", "dweb:/ipfs/QmTs8PnAGr1ijXtWvMjoWraefAtVv2Y5ZnwkArz6NqJ93w" ] }, @@ -716,7 +657,6 @@ "keccak256": "0x0c7a4386781683c327fde95363535f377941e14feffad5bb1134c7aa7eba726f", "sha256": "0xe7e1be3d0a67469f6a37cd676a22314c4faa8a22ff9d5ebde11302db754453eb", "urls": [ - "bzzr://65dc33e3d9ef94defff1b24e66f093d9d15a92c59778c8eb26e76fd8b64bd3da", "dweb:/ipfs/QmQFhTptWdDzhemjGpa7Q65HKWGphs4nKKS13nzkcVE8pM" ] }, @@ -728,7 +668,6 @@ "keccak256": "0x3502cf7933fbce9f1fe1d87a83d5b9df12eee36c03997c3b9821493ce03fcf3e", "sha256": "0x7fcc983c5149840a47b946fc51fc14f1c21cda07c01d650e4a1f814319cb1423", "urls": [ - "bzzr://617dff84fd7dc06b476f93a95c015a561662d9ff1d3356ac6a3e5f5b09a636f0", "dweb:/ipfs/Qmdw9c3usmqgdV2w4JoNWJqscHzscKNVWsWtos1engJa1o" ] }, @@ -740,7 +679,6 @@ "keccak256": "0x0c80a0bf9e17700249a04a80d7729ccb012a55a82cb0f9e412fa32cc14b09c2b", "sha256": "0xdfa3f2bb4589bdc9c054292173c82ee70e65af8d1971598f6e13b9b79ba94185", "urls": [ - "bzzr://a45264806fb74fd38c19704070c83053972270b63bf7b09ddff3c3e15cd1baa0", "dweb:/ipfs/QmTNWY4vkVLgtNdfGXyH6CY8URmzr33VzMJNN37z5dsAgu" ] }, @@ -752,7 +690,6 @@ "keccak256": "0xcf099e7057d6c3d5acac1f4e349798ad5a581b6cb7ffcebdf5b37b86eac4872d", "sha256": "0xcaf4b1f3e01fcf946aad2d22bbe046b9dc4fd50049a05c3458ff239e2c93a785", "urls": [ - "bzzr://2f8ec45d2d7298ab1fa49f3568ada6c6e030c7dd7f490a1505ed9d4713d86dc8", "dweb:/ipfs/QmQMH2o7Nz3DaQ31hNYyHVAgejqTyZouvA35Zzzwe2UBPt" ] }, @@ -764,7 +701,6 @@ "keccak256": "0x300330ecd127756b824aa13e843cb1f43c473cb22eaf3750d5fb9c99279af8c3", "sha256": "0x2b55ed5fec4d9625b6c7b3ab1abd2b7fb7dd2a9c68543bf0323db2c7e2d55af2", "urls": [ - "bzzr://16c5f09109c793db99fe35f037c6092b061bd39260ee7a677c8a97f18c955ab1", "dweb:/ipfs/QmTLs5MuLEWXQkths41HiACoXDiH8zxyqBHGFDRSzVE5CS" ] }, @@ -776,7 +712,6 @@ "keccak256": "0xfe223dd264421f9b96c3dd3c835a3d0d4d9cfa4c61f75ca0761860c9ae8906ca", "sha256": "0x2ee1c6434a32a40b137ac28be12ceeba64701bfad5e80239690803d9c139908e", "urls": [ - "bzzr://d67cf500345ceca523e9bbe55dab9399e27321fd9005704a5b16bab82185260c", "dweb:/ipfs/Qmf5fpJmeHdwgmSjQPqdu25XtA9akTotakkNmrh4axgo8N" ] }, @@ -788,7 +723,6 @@ "keccak256": "0xc68517effed7163db0c7f4559931a4c5530fe6f2a8a20596361640d9d7eff655", "sha256": "0xb94e69dfb056b3e26080f805ab43b668afbc0ac70bf124bfb7391ecfc0172ad2", "urls": [ - "bzzr://523852f3e01b02ce947771e0279ffb6154d12700f809ba3606d908ba6271431c", "dweb:/ipfs/QmWjG6PLzF5M6kxkHujhEMg5znQCgf2m1cM1UptKA719Hy" ] }, @@ -800,7 +734,6 @@ "keccak256": "0x08dd57a5cf5fd59accbd5b601909ffa22d28da756b5367c29b523ff17bbc2f99", "sha256": "0xc596765f9b3dce486cf596ea35676f37124d54f3ada0fcbc02f094c392066a59", "urls": [ - "bzzr://7047ade6879aab4c825594dab0914b8ec673bb907eecc6dfbd68f63086e5a36e", "dweb:/ipfs/QmYh5C2rgDAx452f7HyHA8soLhnoL1GeeNNEWEuw9jKY8w" ] }, @@ -812,7 +745,6 @@ "keccak256": "0x84a0e9282047512eeec499d55c83dbb6981430b08692d81d6c09730bb18e6cd8", "sha256": "0xf77f141e5fed9594b28342e2c630ac6d48f2a724e4383a457881acd7fa62b1cf", "urls": [ - "bzzr://da8c5ea3f2ecd33d3f83ac2c276871f4ee41370fb55ae62c6c29835c9376bdec", "dweb:/ipfs/QmQ6W5VedQpZAwuGTtp1BhmNkvVheLnJq4xwN9Qmt9bAbH" ] }, @@ -824,7 +756,6 @@ "keccak256": "0xd0c15275c5b0d03871332719def9b0f17e8860c7db60e0e71f18b971458a7391", "sha256": "0x015e83fb0b72ccdafb0c217961b21a0321adb2d3f2ad992f5e79635c2086e6dd", "urls": [ - "bzzr://629ae5ad84c45c248144b5eec7827a9cd5b2f2779ef84ab251c8cd876347a098", "dweb:/ipfs/QmdfVfa2mhyosaJVeV7rbfnvQ95GTHPeRPzmvxcds7RYej" ] }, @@ -836,7 +767,6 @@ "keccak256": "0x51777116af58223a41aa3016d0bf733bbb0f78ad9ba4bcc36487eba175f65015", "sha256": "0xb5cedfa8de5f9421fbdaccf9fd5038652c2632344b3b68e5278de81e9aeac210", "urls": [ - "bzzr://c7d43da1bc5529d2cc311e00579c36dcff258c42b8ed240b6c4e97bd85492a64", "dweb:/ipfs/QmWbNMzJryhiZmyifLDQteGPwN4aTgXQB6barBvXYVw975" ] }, @@ -848,7 +778,6 @@ "keccak256": "0x7e0bca960d11fb095798ff65d029436f23358ac060b25a0938acfcb4652da2ec", "sha256": "0x4a14c7bcaf0d988a829db2174b8f7731898aa8633216490603ad74bff64eca3c", "urls": [ - "bzzr://7f33fe204160253c7ec23cb0ac83224bde3aca9f91a7a686cb67d99248c5fbb6", "dweb:/ipfs/QmPYDf4qYtZLNEAicW7hcvpUJ69FoHiXmUypipDpTKo9hU" ] }, @@ -860,7 +789,6 @@ "keccak256": "0x6d6d75b033717aae0a728e527005d8d2cc7dbd0a835c8873c630a2a9689a2976", "sha256": "0x4af595f976235d33a22ffe223e9e3210b4ca510f6a93f153b3daed60f2b11fbc", "urls": [ - "bzzr://d501ee8c460db75379b5716bcb5ae10e3e32625d6c9b08e319822a110f178906", "dweb:/ipfs/QmNWkyirqXy3gDHNXpPuVUbExMGWjMqPR82Xzs64RzgQzy" ] }, @@ -872,7 +800,6 @@ "keccak256": "0x070e41c7f761ff1a8383a2c0d54c22aab0f115ca8c3790ecea27d6dde11611ca", "sha256": "0x06a671efd8865a6ecc0ad648076177b35abcd06a7059888ea65111272e33a57f", "urls": [ - "bzzr://e4f8176cdb3a0f3ba0b7061079dd9d3495f6a2288bd724780337cacd96515148", "dweb:/ipfs/QmQre11ZPgWSx79Jzca1tkTYFyMbXz8H4kcrhfpWSj4qs8" ] }, @@ -884,7 +811,6 @@ "keccak256": "0x8d6be9e58c33d265b5a8b1132a27fce126067419f3f4f15d3ef6b7147593b61d", "sha256": "0x663ba99f7c7ee907f0f03227502d48a78256c3c292ace3b79a5d3eb510665306", "urls": [ - "bzzr://0bdbad1bdcc3a9775f16f20a35556be4baa0e6c9a9b9d820e8e2cdea80667c6a", "dweb:/ipfs/QmYv3Rsi9pL6PZAtc4XLHezPqti8yCRGEdDBqzEsQv57GV" ] }, @@ -896,7 +822,6 @@ "keccak256": "0x56cb2f6978bf1213982ef217ee76b39dc97b6e66c92a7be7a1b44079c0236e5c", "sha256": "0x534b7d4079d13bb4cd10b7559dc105c2adec625df4105f20ebce47e6da60bfda", "urls": [ - "bzzr://7543aa16521848b06a1359afcb9dbd7be1dd09a36f4ca53edd3ed3a512a475e9", "dweb:/ipfs/QmZaSrn3TPvPVoShtjSonQLFd3BV6RdgRMqw8GTzhnKYpm" ] }, @@ -908,7 +833,6 @@ "keccak256": "0xbc470ab3442e78bb4d3f16c01c39b2f160f4f34eb4373efed11c234e1c7f6ca0", "sha256": "0x5b25f987aae32a0275fdc6c1be36cc47cf126024a04dafd8e4be39a1d1d1422c", "urls": [ - "bzzr://83bf64f11a09845a6eb732da08283a58f877e9227190f489c9852f790c81d0c4", "dweb:/ipfs/QmfFq3MvisCSUJy8N8EVsBribgPbdpTZb7tQ2eHYw7dwag" ] }, @@ -920,7 +844,6 @@ "keccak256": "0x3820aae0de50f10f62819d65f0b5a236ccffed11ab465a3295a5408fa47e24f5", "sha256": "0x5eaee3240a06891abf5ac70c75caf9a0c33ebe9a2736abdaa22a337f86c22933", "urls": [ - "bzzr://5124a21890d6b0ae70bfd031f741d7edc74cff70a26ca74750d446b15a8efb06", "dweb:/ipfs/QmcsfYpEWbPXfVptzi1YvGokxi2FYCUzUr8rQYJCc5fEiB" ] }, @@ -932,7 +855,6 @@ "keccak256": "0x798b23086ce1339e3d47b3648a1f3ae40561e2c9f66ffcc98e71fc14a7f77584", "sha256": "0x64117d4b13bfc5bc6e5f80823519b140e753a0c09e99edd756772dc3029bc1f8", "urls": [ - "bzzr://0fd1c8db6338b2143ab0e49a33edaa133108ba77f1238408018b5b2a0ecdeb62", "dweb:/ipfs/QmNQTFQmfnjxnDmbguVSnZ5DiHGFQHCsffccW5c2DMcSsT" ] }, @@ -944,7 +866,6 @@ "keccak256": "0xdd4ae95607655404b769fab5f949ac95c6a1a506330f512aef0d92974c390431", "sha256": "0xc2c4738c96ad329cbb9baea615ed50ffb5a53d93fed8e00785e47242581d3c60", "urls": [ - "bzzr://38f396377d5a5a60d0b9d8c4dc1343485517ff31bcd281d531f98534dc79d811", "dweb:/ipfs/QmVdW2ygaT2vecoSUog3HUn8hZqXU4XXQZvuRSdpV6DJPL" ] }, @@ -956,7 +877,6 @@ "keccak256": "0x9afa714859d1c8f8ed2fded497b83a7a420474282494d25d4c9f592667729f21", "sha256": "0x387343bcf8f2b77fe4cdcddcaa84361fabf8e1c3508f874fbbcbb9c313542f56", "urls": [ - "bzzr://ade0fd040981c4e8c7adfe366296e452687c7bb6421de8546a0678be4add016a", "dweb:/ipfs/Qma9V9dJwmkim98H6DQX4f7RH395vsUuqHCDxbKetcbj18" ] }, @@ -968,7 +888,6 @@ "keccak256": "0xb0f7f19a8590e5c0aaf779019c1deaafed170d8c26bec9bfd782d212e097619e", "sha256": "0x7c3b3d0066fd381283b1d8d9a86153b2ddb5c01da14a1ae015c05cfa484e81b6", "urls": [ - "bzzr://fa438d41ed52c9e0cca556efee61486fc77e60df06081921abb0a0f19b602d35", "dweb:/ipfs/QmcM1TcDB4ta8ttNLWZ4d24M4Qs35rc91sQkdNmJMNbuvV" ] }, @@ -980,7 +899,6 @@ "keccak256": "0x4f6cdc0f25e734bcb977bb6a3e22fa41d8a82cbd5f220a2e4238c2d233526d1a", "sha256": "0x71135e459d691767ce3453bab4564ef4a640dd50182da36517cbc1f96c1d4c7c", "urls": [ - "bzzr://ac5baefba32f4779a03d1207d9f1ed69365280c702fd73002a729b7a3d52c425", "dweb:/ipfs/QmPiBrYZxxpNZPQ98GNyL7Xa1F9Dq7uHtdt9ESwhPNkHhc" ] }, @@ -992,7 +910,6 @@ "keccak256": "0x331f4bc6de3d44d87b68629e83f711105325b482da7e9ca9bdbdd01371fee438", "sha256": "0x27b2820ef93805a65c76b7945a49432582d306fd17a28985709a51e6403677c2", "urls": [ - "bzzr://af0d70945c85865298732ac2bfdacdf2774fb4daf793c94fafe135b839a60a5c", "dweb:/ipfs/QmWzBJ8gdccvRSSB5YsMKiF2qt3RFmAP2X25QEWqqQnR4y" ] }, @@ -1004,7 +921,6 @@ "keccak256": "0x3f2be218cf4545b4d2e380417c6da1e008fdc4255ab38c9ee12f64c0e3f55ea9", "sha256": "0x617828e63be485c7cc2dbcbdd5a22b582b40fafaa41016ad595637b83c90656c", "urls": [ - "bzzr://fe8da5b2531d31e4b67acdce09c81eccba1100550a7222722152ffdb16ea85ef", "dweb:/ipfs/QmTedx1wBKSUaLatuqXYngjfKQLD2cGqPKjdLYCnbMYwiz" ] }, @@ -1016,7 +932,6 @@ "keccak256": "0x9a8fa4183ef95496045189b80dfb39f745db89a903b398e40131f500953e5d57", "sha256": "0xd82bdcba2c386d60b33aca148a9cfdf097551f68c5e45d8ec01aebbafacf5075", "urls": [ - "bzzr://338117c2130fcb6bce3006330712b6e7ee99875b56ce4bb6182312f76e4a6bac", "dweb:/ipfs/QmcKzrqRBy7PeFQxzJDs1AZZzNHKaKbJces6zUDysXZofJ" ] }, @@ -1028,7 +943,6 @@ "keccak256": "0x6be35b86f5656c06ae897ef311c28da375bdcbded68c4a81e124f2cb36adf830", "sha256": "0xe0b74e0a16e783a35169f74d1a615ecb48d07c30f97346b83cd587949268681e", "urls": [ - "bzzr://434c17a0cc3bf371e5b9baa7f804b37ffd2dc141a98c59b2ba6021fc419a39c0", "dweb:/ipfs/QmPnhNtzrEBeWWQMXdAByQTDPoKXXV9NFXLk3YL4QbghMP" ] }, @@ -1040,7 +954,6 @@ "keccak256": "0x3a420fa9963772eee5b9221ebb8cf9548eea8f88b09537390960ea9b440f333c", "sha256": "0x5c509f760dc110a695c8b39bbc21e08c17dee431aa14d606f59e623d7c3cc657", "urls": [ - "bzzr://fdc05062e4c7ec85ed18ab17b6f04f3274a4b7caf0be483eb86007d708825fb0", "dweb:/ipfs/QmciAxUX2kfuoxitmMdkKSfWn2SfxQdieLRa3S5S2munot" ] }, @@ -1052,7 +965,6 @@ "keccak256": "0x370efd28e2d28b6d0ba55e20d8994f3d286c3772552ed63586b5fe157c0d3c57", "sha256": "0x45bea352b41d04039e19439962ddef1d3e10cf2bc9526feba39f2cc79e3c5a17", "urls": [ - "bzzr://5e66947c220c91a6cd39bc22965dcf861015b8613a6e09aa7fb7dc10f367b5d7", "dweb:/ipfs/QmXLgy6oexvCBWYS5pTpJWohsDNGqgdNFLRKX7JrE3NxYt" ] }, @@ -1064,7 +976,6 @@ "keccak256": "0x907eeba6e6e0d6977ac5a8f50e4dd2762539ca827ceab1afb1f5a4f0f3ce3e0c", "sha256": "0x92d283c545395b91a656fa1ec94d567a464bca55aebcdbb99debf42b43026845", "urls": [ - "bzzr://63ec828814e2b57db2a7a146061a96cc39797ba39a0063a7b664421a48f21c00", "dweb:/ipfs/Qma6o4e57YtWj8cQLQs12r2Enx9qmRA7VHtupCauXjYTAk" ] }, @@ -1076,7 +987,6 @@ "keccak256": "0x743aaafac24d9740a0b71215f55a132f89336a662487944767ca4bfd66400769", "sha256": "0x9c681b165c8647867589c0a5ecdc8692637a935928a2b1bbea2ff4a1f4976985", "urls": [ - "bzzr://6e70fe6bfe8c3fc63f8a3eba733731aab129e6e58828b78058e53bb50440709b", "dweb:/ipfs/QmZy5ho8W943FMGwppXZFS1WFrVwV3UXhUUwcD7oH5vrYe" ] }, @@ -1088,7 +998,6 @@ "keccak256": "0x1b6ceeabad21bbb2011ba13373160f7c4d46c11371a354243ee1be07159345f3", "sha256": "0x11b054b55273ec55f6ab3f445eb0eb2c83a23fed43d10079d34ac3eabe6ed8b1", "urls": [ - "bzzr://c604bdd6384bf73594cd0e5cfbe979048191549ebc88e70996346f3b744c0680", "dweb:/ipfs/QmW2SQbEhiz3n2qV5iL8WBgzapv6cXjkLStvTMpCZhvr2x" ] }, @@ -1100,7 +1009,6 @@ "keccak256": "0x4639103a26b2f669bd3ecc22b1a1665819f2a2956f917ab91380bd9565dbcd01", "sha256": "0xf8c9554471ff2db3843167dffb7a503293b5dc728c8305b044ef9fd37d626ca7", "urls": [ - "bzzr://d201e60bd46193b11382988a854132b9e7fb0e1574cc766cb7f9efe8e44a680c", "dweb:/ipfs/QmdduJxmPXungjJk2FBDw1bdDQ6ucHxYGLXRMBJqMFW7h9" ] } diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 687d2cfd50..0f1e9016ff 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -1,8 +1,8 @@ import React, {useEffect, useState} from 'react' // eslint-disable-line -import {FormattedMessage} from 'react-intl' -import {PluginRecord} from '../types' +import { FormattedMessage } from 'react-intl' +import { PluginRecord } from '../types' import './panel.css' -import {CustomTooltip, RenderIf, RenderIfNot} from '@remix-ui/helper' +import { CustomTooltip, RenderIf, RenderIfNot } from '@remix-ui/helper' export interface RemixPanelProps { plugins: Record, diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index ee274fc55b..b5b4037eb2 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -18,7 +18,7 @@ export const setEventsDispatch = (reducerDispatch: React.Dispatch) => { dispatch = reducerDispatch } -export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { +export const setupEvents = (plugin: RunTab) => { // This maintains current network state and update the pinned contracts list, // only when there is a change in provider or in chain id for same provider // as 'networkStatus' is triggered in each 10 seconds diff --git a/libs/remix-ui/run-tab/src/lib/actions/index.ts b/libs/remix-ui/run-tab/src/lib/actions/index.ts index ff39737ced..5387887f67 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/index.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/index.ts @@ -27,7 +27,7 @@ export const initRunTab = (udapp: RunTab, resetEventsAndAccounts: boolean) => as dispatch = reducerDispatch setEventsDispatch(reducerDispatch) if (resetEventsAndAccounts) { - setupEvents(plugin) + setupEvents(plugin) resetAndInit(plugin) } } 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 ae569274ce..26d87b7fc0 100644 --- a/libs/remix-ui/run-tab/src/lib/run-tab.tsx +++ b/libs/remix-ui/run-tab/src/lib/run-tab.tsx @@ -78,7 +78,7 @@ export function RunTabUI(props: RunTabProps) { initialState.selectExEnv = plugin.blockchain.getProvider() const [runTab, dispatch] = useReducer(runTabReducer, initialState) - const REACT_API = {runTab} + const REACT_API = { runTab } const currentfile = plugin.config.get('currentFile') useEffect(() => { From 4ccbd68fee85eeebd6003aaba91471c1740b961d Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 13:36:22 +0100 Subject: [PATCH 20/54] Remove unused comments --- libs/remix-ui/app/src/lib/remix-app/remix-app.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index d458271243..d2ae9e5bb9 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -207,9 +207,6 @@ const RemixApp = (props: IRemixAppUi) => { >
- {/* }> -
-
*/}
{props.app.pinnedPanel.render()} From b41d70f3e32b0b65287bb0cab62cf419bcddba58 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 14:57:38 +0100 Subject: [PATCH 21/54] Hide pinned panel if plugin is deactivated --- apps/remix-ide/src/app/components/pinned-panel.tsx | 8 +++++++- apps/remix-ide/src/app/components/side-panel.tsx | 9 +++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index b9d9d5b416..9bb87fabff 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -25,12 +25,18 @@ export class PinnedPanel extends AbstractPanel { onActivation() { this.renderComponent() + this.on('sidePanel', 'pluginDisabled', (name) => { + if (this.plugins[name] && this.plugins[name].active) { + this.emit('unPinnedPlugin', name) + this.events.emit('unPinnedPlugin', name) + } + }) } async pinView (profile, view) { const activePlugin = this.currentFocus() - if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already pinned`) + if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already pinned`) if (activePlugin) { await this.call('sidePanel', 'unPinView', this.plugins[activePlugin].profile, this.plugins[activePlugin].view) this.remove(activePlugin) diff --git a/apps/remix-ide/src/app/components/side-panel.tsx b/apps/remix-ide/src/app/components/side-panel.tsx index 5a3f79851e..3e62f8bea1 100644 --- a/apps/remix-ide/src/app/components/side-panel.tsx +++ b/apps/remix-ide/src/app/components/side-panel.tsx @@ -58,10 +58,8 @@ export class SidePanel extends AbstractPanel { } removeView(profile) { - if (this.plugins[profile.name].active) this.call('menuicons', 'select', 'filePanel') + if (this.plugins[profile.name] && this.plugins[profile.name].active) this.call('menuicons', 'select', 'filePanel') super.removeView(profile) - this.emit('pluginDisabled', profile.name) - this.call('menuicons', 'unlinkContent', profile) this.renderComponent() } @@ -73,7 +71,10 @@ export class SidePanel extends AbstractPanel { async pinView (profile) { await this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name].view) - this.removeView(profile) + if (this.plugins[profile.name].active) this.call('menuicons', 'select', 'filePanel') + super.remove(profile.name) + this.call('menuicons', 'unlinkContent', profile) + this.renderComponent() } async unPinView (profile, view) { From 05ecb1f512be5d4514421e1b15528bb3a356295e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 15 May 2024 15:01:37 +0100 Subject: [PATCH 22/54] Fixed deactivation bug for pinned plugin --- apps/remix-ide/src/app/components/pinned-panel.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 9bb87fabff..10f0d9363d 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -29,6 +29,7 @@ export class PinnedPanel extends AbstractPanel { if (this.plugins[name] && this.plugins[name].active) { this.emit('unPinnedPlugin', name) this.events.emit('unPinnedPlugin', name) + super.remove(name) } }) } From 20640d3ec5e0acbccd3711ac48f05db3df76dc89 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 16 May 2024 11:45:54 +0100 Subject: [PATCH 23/54] Fix solidity compiler breaking --- libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 9786e11fbf..b1751ecb4c 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -373,7 +373,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { // Load solc compiler version according to pragma in contract file const _setCompilerVersionFromPragma = (filename: string) => { - if (!solJsonBinData.selectorList) return + if (solJsonBinData && !solJsonBinData.selectorList) return api.readFile(filename).then((data) => { if (!data) return const pragmaArr = data.match(/(pragma solidity (.+?);)/g) From b8b0d2e9fb612985437b167cb4208e460388dffb Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 20 May 2024 15:48:08 +0100 Subject: [PATCH 24/54] Removed wrong translations --- apps/remix-ide/src/app/tabs/locales/es/panel.json | 12 ------------ apps/remix-ide/src/app/tabs/locales/fr/panel.json | 12 ------------ apps/remix-ide/src/app/tabs/locales/it/panel.json | 12 ------------ apps/remix-ide/src/app/tabs/locales/ru/panel.json | 10 ---------- apps/remix-ide/src/app/tabs/locales/zh/panel.json | 12 ------------ 5 files changed, 58 deletions(-) delete mode 100644 apps/remix-ide/src/app/tabs/locales/es/panel.json delete mode 100644 apps/remix-ide/src/app/tabs/locales/fr/panel.json delete mode 100644 apps/remix-ide/src/app/tabs/locales/it/panel.json delete mode 100644 apps/remix-ide/src/app/tabs/locales/ru/panel.json delete mode 100644 apps/remix-ide/src/app/tabs/locales/zh/panel.json diff --git a/apps/remix-ide/src/app/tabs/locales/es/panel.json b/apps/remix-ide/src/app/tabs/locales/es/panel.json deleted file mode 100644 index 84ea48e377..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/es/panel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "panel.author": "Autor", - "panel.maintainedBy": "Mantenido por", - "panel.documentation": "Documentación", - "panel.description": "Descripción", - "panel.maintainedByRemix": "Mantenido por Remix", - "panel.pluginInfo": "Información del Complemento", - "panel.linkToDoc": "Enlace a la documentación", - "panel.makeAnissue": "Crear un asunto", - "panel.pinnedMsg": "Click to dock plugin to the right", - "panel.unPinnedMsg": "Click to return plugin to the side panel" -} diff --git a/apps/remix-ide/src/app/tabs/locales/fr/panel.json b/apps/remix-ide/src/app/tabs/locales/fr/panel.json deleted file mode 100644 index d337d61274..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/fr/panel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "panel.author": "Auteur", - "panel.maintainedBy": "Maintenu par :", - "panel.documentation": "Documentation", - "panel.description": "Description", - "panel.maintainedByRemix": "Maintenu par Remix", - "panel.pluginInfo": "Informations sur l'extension", - "panel.linkToDoc": "Lien vers la documentation", - "panel.makeAnissue": "Faire un ticket", - "panel.pinnedMsg": "Click to dock plugin to the right", - "panel.unPinnedMsg": "Click to return plugin to the side panel" -} diff --git a/apps/remix-ide/src/app/tabs/locales/it/panel.json b/apps/remix-ide/src/app/tabs/locales/it/panel.json deleted file mode 100644 index 67e7adcb94..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/it/panel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "panel.author": "Autore", - "panel.maintainedBy": "Mantenuto Da", - "panel.documentation": "Documentazione", - "panel.description": "Descrizione", - "panel.maintainedByRemix": "Mantenuto da Remix", - "panel.pluginInfo": "Informazioni sul plugin", - "panel.linkToDoc": "Link alla documentazione", - "panel.makeAnissue": "Crea una Issue", - "panel.pinnedMsg": "Click to dock plugin to the right", - "panel.unPinnedMsg": "Click to return plugin to the side panel" -} diff --git a/apps/remix-ide/src/app/tabs/locales/ru/panel.json b/apps/remix-ide/src/app/tabs/locales/ru/panel.json deleted file mode 100644 index 066069d5bd..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/ru/panel.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "panel.author": "Автор", - "panel.maintainedBy": "Поддерживается", - "panel.documentation": "Документация", - "panel.description": "Описание", - "panel.maintainedByRemix": "Поддерживается Remix", - "panel.pluginInfo": "Информация о плагине", - "panel.linkToDoc": "Ссылка на документацию", - "panel.makeAnissue": "Создать задачу" -} diff --git a/apps/remix-ide/src/app/tabs/locales/zh/panel.json b/apps/remix-ide/src/app/tabs/locales/zh/panel.json deleted file mode 100644 index 42e9bdbdfe..0000000000 --- a/apps/remix-ide/src/app/tabs/locales/zh/panel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "panel.author": "作者", - "panel.maintainedBy": "维护者", - "panel.documentation": "文档", - "panel.description": "描述", - "panel.maintainedByRemix": "由 Remix 维护", - "panel.pluginInfo": "插件信息", - "panel.linkToDoc": "文档链接", - "panel.makeAnissue": "提交 issue", - "panel.pinnedMsg": "Click to return plugin to the side panel", - "panel.unPinnedMsg": "Click to dock plugin to the right" -} From 2d3dbe43e8d5b1865d41b7df42dd941ffe7f3ec7 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 20 May 2024 15:50:54 +0100 Subject: [PATCH 25/54] Modified tooltip for pin icon --- apps/remix-ide/src/app/tabs/locales/en/panel.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/panel.json b/apps/remix-ide/src/app/tabs/locales/en/panel.json index eb8a204f1e..ca051c730f 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/panel.json @@ -4,8 +4,8 @@ "panel.documentation": "Documentation", "panel.description": "Description", "panel.maintainedByRemix": "Maintained by Remix", - "panel.pinnedMsg": "Click to dock plugin to the right", - "panel.unPinnedMsg": "Click to return plugin to the side panel", + "panel.pinnedMsg": "Click to return plugin to the right side panel", + "panel.unPinnedMsg": "Click to return plugin to the left side panel", "panel.maintainedExternally": "Not maintained by Remix", "panel.pluginInfo": "Plugin info", "panel.linkToDoc": "Link to documentation", From 4f8e33236bf6986c4872d4ce990eb86ea8c02937 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 20 May 2024 15:55:51 +0100 Subject: [PATCH 26/54] Add plugins to necessary plugins list --- apps/remix-ide/src/remixAppManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index e462a94074..df13ce19c0 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -77,7 +77,9 @@ let requiredModules = [ // services + layout views + system views 'doc-viewer', 'doc-gen', 'remix-templates', - 'solhint' + 'solhint', + 'pinnedPanel', + 'pluginStateLogger' ] From 94945d1ded01a458837d6997af32cb47fa4c5320 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 20 May 2024 16:06:00 +0100 Subject: [PATCH 27/54] Replace with bootstrap classes --- libs/remix-ui/app/src/lib/remix-app/remix-app.tsx | 2 +- libs/remix-ui/app/src/lib/remix-app/style/remix-app.css | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index d2ae9e5bb9..803be1de60 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -208,7 +208,7 @@ const RemixApp = (props: IRemixAppUi) => {
-
+
{props.app.pinnedPanel.render()}
Date: Tue, 28 May 2024 15:23:52 +0100 Subject: [PATCH 28/54] Change pin icons --- .../panel/src/lib/plugins/panel-header.tsx | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 0f1e9016ff..438d1bf87a 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -44,6 +44,19 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { {plugin?.profile?.name && }
+ { + plugin && plugin.profile.name !== 'filePanel' && ( + + +
+ }> + + +
+
+
+ ) + }
{plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? ( }> @@ -62,22 +75,13 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { { plugin && plugin.profile.name !== 'filePanel' && ( - <> - -
- }> - - -
-
- -
- }> - - -
-
- + +
+ }> + + +
+
) } From 56edfc9255679df4018513f8789c50b02444701d Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 May 2024 11:54:01 +0100 Subject: [PATCH 29/54] Add functionality for plugin calls to maximise and reset pinned panel size --- .../src/app/components/pinned-panel.tsx | 1 - apps/remix-ide/src/app/panels/layout.ts | 24 +++++++++++- .../src/app/tabs/locales/en/panel.json | 2 +- .../remix-app/components/dragbar/dragbar.tsx | 39 ++++++++++++++----- .../app/src/lib/remix-app/remix-app.tsx | 27 ++++++------- .../debugger-ui/src/lib/api/debugger-api.ts | 20 ++++++++-- 6 files changed, 81 insertions(+), 32 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 10f0d9363d..03fc6e1050 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -15,7 +15,6 @@ const pinnedPanel = { } export class PinnedPanel extends AbstractPanel { - sideelement: any dispatch: React.Dispatch = () => {} loggedState: any diff --git a/apps/remix-ide/src/app/panels/layout.ts b/apps/remix-ide/src/app/panels/layout.ts index 1db8f29dfb..fa564370f4 100644 --- a/apps/remix-ide/src/app/panels/layout.ts +++ b/apps/remix-ide/src/app/panels/layout.ts @@ -6,7 +6,7 @@ import { QueryParams } from '@remix-project/remix-lib' const profile: Profile = { name: 'layout', description: 'layout', - methods: ['minimize', 'maximiseSidePanel', 'resetSidePanel', 'maximizeTerminal'] + methods: ['minimize', 'maximiseSidePanel', 'resetSidePanel', 'maximizeTerminal', 'maximisePinnedPanel', 'resetPinnedPanel'] } interface panelState { @@ -74,6 +74,16 @@ export class Layout extends Plugin { this.event.emit('resetsidepanel') } }) + + this.on('pinnedPanel', 'pinnedPlugin', async (name) => { + const current = await this.call('pinnedPanel', 'currentFocus') + if (this.maximised[current]) { + this.event.emit('maximisepinnedpanel') + } else { + this.event.emit('resetpinnedpanel') + } + }) + document.addEventListener('keypress', e => { if (e.shiftKey && e.ctrlKey) { if (e.code === 'KeyF') { @@ -110,6 +120,12 @@ export class Layout extends Plugin { this.maximised[current] = true } + async maximisePinnedPanel () { + this.event.emit('maximisepinnedpanel') + const current = await this.call('pinnedPanel', 'currentFocus') + this.maximised[current] = true + } + async maximizeTerminal() { this.panels.terminal.minimized = false this.event.emit('change', this.panels) @@ -121,4 +137,10 @@ export class Layout extends Plugin { const current = await this.call('sidePanel', 'currentFocus') this.maximised[current] = false } + + async resetPinnedPanel () { + this.event.emit('resetpinnedpanel') + const current = await this.call('pinnedPanel', 'currentFocus') + this.maximised[current] = false + } } diff --git a/apps/remix-ide/src/app/tabs/locales/en/panel.json b/apps/remix-ide/src/app/tabs/locales/en/panel.json index ca051c730f..f9a9b2ffd1 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/panel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/panel.json @@ -4,7 +4,7 @@ "panel.documentation": "Documentation", "panel.description": "Description", "panel.maintainedByRemix": "Maintained by Remix", - "panel.pinnedMsg": "Click to return plugin to the right side panel", + "panel.pinnedMsg": "Click to move plugin to the right side panel", "panel.unPinnedMsg": "Click to return plugin to the left side panel", "panel.maintainedExternally": "Not maintained by Remix", "panel.pluginInfo": "Plugin info", diff --git a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx index 609cd6edb3..4bbb9066e8 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx @@ -32,22 +32,41 @@ const DragBar = (props: IRemixDragBarUi) => { useEffect(() => { initialWidth.current = props.refObject.current.clientWidth if (props.maximiseTrigger > 0) { - const width = 0.4 * window.innerWidth - if (width > props.refObject.current.offsetWidth) { - props.refObject.current.style.width = width + 'px' - setTimeout(() => { - setDragBarPosX(offset + width) - }, 300) + if (props.layoutPosition === 'left') { + const width = 0.4 * window.innerWidth + + if (width > props.refObject.current.offsetWidth) { + props.refObject.current.style.width = width + 'px' + setTimeout(() => { + setDragBarPosX(offset + width) + }, 300) + } + } else if (props.layoutPosition === 'right') { + const width = 0.4 * window.innerWidth + + if (width > props.refObject.current.offsetWidth) { + props.refObject.current.style.width = width + 'px' + setTimeout(() => { + setDragBarPosX(window.innerWidth - width) + }, 300) + } } } }, [props.maximiseTrigger]) useEffect(() => { if (props.maximiseTrigger > 0) { - props.refObject.current.style.width = initialWidth.current + 'px' - setTimeout(() => { - setDragBarPosX(offset + initialWidth.current) - }, 300) + if (props.layoutPosition === 'left') { + props.refObject.current.style.width = initialWidth.current + 'px' + setTimeout(() => { + setDragBarPosX(offset + initialWidth.current) + }, 300) + } else if (props.layoutPosition === 'right') { + props.refObject.current.style.width = props.minWidth + 'px' + setTimeout(() => { + setDragBarPosX(window.innerWidth - props.minWidth) + }, 300) + } } }, [props.resetTrigger]) diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 803be1de60..29dc3de3fd 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -96,12 +96,6 @@ const RemixApp = (props: IRemixAppUi) => { }) }) - props.app.layout.event.on('minimizepinnedpanel', () => { - setTimeout(() => { - setHidePinnedPanel(true) - }, 1000) - }) - props.app.layout.event.on('maximisepinnedpanel', () => { setMaximiseRightTrigger((prev) => { return prev + 1 @@ -211,15 +205,18 @@ const RemixApp = (props: IRemixAppUi) => {
{props.app.pinnedPanel.render()}
- + { + !hidePinnedPanel && + + }
{props.app.hiddenPanel.render()}
diff --git a/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts b/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts index 577974a282..0f444a7464 100644 --- a/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts +++ b/libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts @@ -183,14 +183,26 @@ export const DebuggerApiMixin = (Base) => class extends Base { showMessage (title: string, message: string) {} - onStartDebugging (debuggerBackend: any) { - this.call('layout', 'maximiseSidePanel') + async onStartDebugging (debuggerBackend: any) { + const pinnedPlugin = await this.call('pinnedPanel', 'currentFocus') + + if (pinnedPlugin === 'debugger') { + this.call('layout', 'maximisePinnedPanel') + } else { + this.call('layout', 'maximiseSidePanel') + } this.emit('startDebugging') this.debuggerBackend = debuggerBackend } - onStopDebugging () { - this.call('layout', 'resetSidePanel') + async onStopDebugging () { + const pinnedPlugin = await this.call('pinnedPanel', 'currentFocus') + + if (pinnedPlugin === 'debugger') { + this.call('layout', 'resetPinnedPanel') + } else { + this.call('layout', 'resetSidePanel') + } this.emit('stopDebugging') this.debuggerBackend = null } From d94595f0e60452b4f86cb84a3946aba9a8b69293 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 May 2024 13:05:52 +0100 Subject: [PATCH 30/54] Added e2e --- apps/remix-ide-e2e/src/tests/layout.test.ts | 79 +++++++++++++++++++ .../panel/src/lib/plugins/panel-header.tsx | 6 +- 2 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 apps/remix-ide-e2e/src/tests/layout.test.ts diff --git a/apps/remix-ide-e2e/src/tests/layout.test.ts b/apps/remix-ide-e2e/src/tests/layout.test.ts new file mode 100644 index 0000000000..23398171d8 --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/layout.test.ts @@ -0,0 +1,79 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' + +module.exports = { + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done) + }, + + '@sources': function () { + return sources + }, + + 'Should pin solidity compiler plugin to the right and switch focus for left side panel to the file-explorer': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('[data-id="movePluginToRight"]') + .click('[data-id="movePluginToRight"]') + .waitForElementVisible('[data-id="movePluginToLeft"]') + .waitForElementVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]') + .assert.containsText('.sidepanel h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORER') + .assert.containsText('.pinned-panel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER') + }, + 'Should unpin and focus on solidity compiler in the left side panel': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('[data-id="movePluginToLeft"]') + .click('[data-id="movePluginToLeft"]') + .waitForElementVisible('[data-id="movePluginToRight"]') + .assert.containsText('.sidepanel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER') + .waitForElementNotVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]') + }, + 'Should pin a plugin while a another plugin is already pinned': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('[data-id="movePluginToRight"]') + .click('[data-id="movePluginToRight"]') + .waitForElementVisible('[data-id="movePluginToLeft"]') + .waitForElementVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]') + .assert.containsText('.pinned-panel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER') + .clickLaunchIcon('udapp') + .click('[data-id="movePluginToRight"]') + .waitForElementVisible('[data-id="movePluginToLeft"]') + .assert.containsText('.pinned-panel h6[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS') + .assert.containsText('.sidepanel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER') + }, + 'Should pin a pinned plugin to the right after reloading the page': function (browser: NightwatchBrowser) { + browser.refreshPage() + .waitForElementVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]') + .assert.containsText('.pinned-panel h6[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS') + }, + 'Should maintain logged state of udapp plugin after pinning and unpinning': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .click('*[data-id="treeViewLitreeViewItemcontracts"]') + .openFile('contracts/1_Storage.sol') + .pause(5000) + .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .waitForElementPresent('#instance0xd9145CCE52D386f254917e481eB44e9943F39138') + .clickInstance(0) + .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '10' }) + .clickFunction('retrieve - call') + .click('[data-id="movePluginToLeft"]') + .waitForElementVisible('[data-id="movePluginToRight"]') + .clickInstance(0) + .waitForElementContainsText('[data-id="treeViewLi0"]', 'uint256: 10') + }, + 'Should maintain logged state of search plugin after pinning and unpinning': function (browser: NightwatchBrowser) { + browser.clickLaunchIcon('search') + .waitForElementVisible('*[id="search_input"]') + .waitForElementVisible('*[id="search_include"]') + .setValue('*[id="search_include"]', ', *.*').pause(2000) + .setValue('*[id="search_input"]', 'read').sendKeys('*[id="search_input"]', browser.Keys.ENTER) + .pause(1000) + .waitForElementContainsText('*[data-id="search_results"]', '3_BALLOT.SOL', 60000) + .waitForElementContainsText('*[data-id="search_results"]', 'contracts', 60000) + .waitForElementContainsText('*[data-id="search_results"]', 'README.TXT', 60000) + .click('[data-id="movePluginToRight"]') + .waitForElementContainsText('*[data-id="search_results"]', '3_BALLOT.SOL') + .waitForElementContainsText('*[data-id="search_results"]', 'contracts') + .waitForElementContainsText('*[data-id="search_results"]', 'README.TXT') + } +} + +const sources = [] diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 438d1bf87a..b2d87297e2 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -48,9 +48,9 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { plugin && plugin.profile.name !== 'filePanel' && ( -
+
}> - +
@@ -76,7 +76,7 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => { plugin && plugin.profile.name !== 'filePanel' && ( -
+
}> From fdecbdea75683c4bb0ecd0b148cede876d684d62 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 May 2024 10:14:12 +0100 Subject: [PATCH 31/54] Disable blockscout api test --- apps/remix-ide-e2e/src/tests/url.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index 04b0cb9642..679fb72951 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -70,7 +70,7 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') !== -1, - 'code has not been loaded') + 'code has not been loaded') }) }, @@ -87,7 +87,7 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'proposals.length = _numProposals;') !== -1, - 'url has not been loaded') + 'url has not been loaded') }) }, @@ -121,8 +121,8 @@ module.exports = { }) }, - - 'Should load Blockscout verified contracts from URL "address" and "blockscout" params (multiple sources)': function (browser: NightwatchBrowser) { + //Disabled due to failure from blockscout api + 'Should load Blockscout verified contracts from URL "address" and "blockscout" params (multiple sources)': '' + function (browser: NightwatchBrowser) { browser .url('http://127.0.0.1:8080/#address=0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9&blockscout=eth.blockscout.com') .refreshPage() @@ -162,7 +162,7 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'proposals.length = _numProposals;') !== -1, - 'code has been loaded') + 'code has been loaded') }) .url('http://127.0.0.1:8080') // refresh without loading the code sample .currentWorkspaceIs('default_workspace') From e011b5ee9c67032a5c68b5930639a8a0a64a81f7 Mon Sep 17 00:00:00 2001 From: ryestew Date: Fri, 31 May 2024 11:14:18 -0400 Subject: [PATCH 32/54] update font awesome kit --- .../src/assets/fontawesome/css/all.css | 2 ++ .../fontawesome/webfonts/custom-icons.ttf | Bin 4404 -> 4756 bytes .../fontawesome/webfonts/custom-icons.woff2 | Bin 2608 -> 2780 bytes 3 files changed, 2 insertions(+) diff --git a/apps/remix-ide/src/assets/fontawesome/css/all.css b/apps/remix-ide/src/assets/fontawesome/css/all.css index 7513e4fc29..59c32c20ed 100644 --- a/apps/remix-ide/src/assets/fontawesome/css/all.css +++ b/apps/remix-ide/src/assets/fontawesome/css/all.css @@ -19391,6 +19391,8 @@ readers do not read off random characters that represent icons */ .fak.fa-cairo::before, .fa-kit.fa-cairo::before { content: "\e000"; } .fak.fa-circom::before, .fa-kit.fa-circom::before { content: "\e001"; } +.fak.fa-fa-dock-l::before, .fa-kit.fa-fa-dock-l::before { content: "\e007"; } +.fak.fa-fa-dock-r::before, .fa-kit.fa-fa-dock-r::before { content: "\e006"; } .fak.fa-lexon::before, .fa-kit.fa-lexon::before { content: "\e004"; } .fak.fa-solidity-mono::before, .fa-kit.fa-solidity-mono::before { content: "\e005"; } .fak.fa-ts-logo::before, .fa-kit.fa-ts-logo::before { content: "\e003"; } diff --git a/apps/remix-ide/src/assets/fontawesome/webfonts/custom-icons.ttf b/apps/remix-ide/src/assets/fontawesome/webfonts/custom-icons.ttf index 1be7447613967218f9724509ad411c67ed5f7afe..cd8888a51eb4189dac74f7cc68a57afea1378189 100644 GIT binary patch delta 1127 zcmZ9LOK1~O6o&tECy%Bzk7*}~+GuBNO>NOO(`cfi1`AbC@qv$ph#K3}7Mms{5i2gD zxDgRit_yW1R#)9Af`XyqMqGZbaZeiw{_PwfHrXS>}WAx#)^fLtmjy7K0kGN{FB*}WBn6o`!G?+k0pywUvkdQ zXC^q{=@9MAUwHLQ6l*i;6%@GshOMVcqxs-m*kZlFS}W#f>Sbsm%z+jT=+pUPA$0LQ z>)<=UbF^Hl){Z=QaS3QoaDJv~7F)0?T3I*~-th}Me z^LKucW8wg?_*)!yb^;=HTk{iWh5|A~Yv_mENICM$Dcag%ci2nLQa6X*k?!$6^nQEx zl^(R#72eI6whFyS198JJGTBU4HIu!`Uc>bHeSX!9#ba?&Rn_P3HdQmtnu`oZgUi%& zbjzyIt^UpgQKGZos`VvoO7ziV5zXbI!rCh|5|*WjJ$3;N|1GUsjV8`o4H~u@Q9)%z z(-iBDqR}wl(f`a5n_D(yn9D|ObD3x$(1p0m z9=pbQdI2v?d~_2&#BjysRwQxUm8;ta2ggg( zwfv<*wNxw&jFyUWb!aVROHa3_(H-9D}y9tttRuyT(lu$Yw(mu%1%z zB1JEbLIn>V1Q81!6hzuX^rYfJM9`xc4<1w$^jyD9M(D6J^StlOeBb=+t>LFbZ4iJk zR-nQ-J(oFJ7@xEO8ew;#%&wH)oji+7FnV9hOAp+tBm>rbq8$69VTkWe%>LTngy%du~6{wxF0 z6~H&waGR}PkLPdm+z&jy(Az9>sJ?!Xyr3Qbi-^KD@TK^}+l1`5Itr-6GKBsxhv%=e z#a`dw);l&Az29*g>{&q(qrLP|j8TF7qDJFlo%S=mBjd>*x)W{#Ns9enjVZjBOxPtu zcu9gBu%AIi3fCq3w$1VLF;dbGAcwW@6J z>v>Gb(y(L&F&dDpVp7RS_HCQv$3>c#egI?iOmY}A)Ri1TTDc)vhh`{_6mc(sh-xXl zXfHLZZr#YHa}zl;n-`l}N-;;p87(OeYlp<|*zOVYlv{5ZCokJg*RhT1YOB&}HJZmV znKJuU-%giYM=WYn;=Eo+75TqeLK9WEsKY=OX}+=vt|oI{JdYPt6QiQ59}#Q%S@9;G p5P5xwOz|SV$2ZOE#CI(#^!Tb6OzhM6MMxo)eB`G91;uP4`wx7^fXV;> diff --git a/apps/remix-ide/src/assets/fontawesome/webfonts/custom-icons.woff2 b/apps/remix-ide/src/assets/fontawesome/webfonts/custom-icons.woff2 index 70babe6b9770370569372f65eadb16c301b73264..d107b4d1c3d02ff22e3655759b04239afee162c8 100644 GIT binary patch delta 2753 zcmV;y3O@C)6xwUK*RY`ISutsijThpo;_OmQi5ZKuP?|@c0 zy$X64WCwXg_+b?U|DR6l|39NqNQz|^WHSobZ*3_gIv~TL7LXm_t(^m`u;bTXN8Dmj zU5iDjg{RW(UsYZS9x;FDzIdno#cY{mvH$;mMKHh@g#Mp5a3?b9pP?+;NE^ZBsi4im zPLM2HAYI&1iO$D}GR;kx3W11dpoc&6*>`+=a+|-=MEnCl!Eaviws-8x?LH+QfGrXE zWYQi)*zUGO;yy&X|B461iax*~x?dn73dm~|fh;?__!Hht9tnTk2TvoSyPvN0H)`m$ zM1njg2`z!jD!ePUf?vQ0Fgj?c0L^LD9D~a$Q3jg1r{db83krG4= z&gjaA!J`E!OMx`tXJuZdkA1yk4)@ z54+)p8`kUpe+N-qVphfx5XI&He^tg2rkl-X^Z$=r+HAhR*=%s1&G$E(GLC>KF8}|8 zGLGQ6es3p1;qF`b13pMOJ)a13!`zwCj<(iyRVvvUshEF{gR5GPc4bEkbDpDK_KUvO zwXRjmosvrGT9;K_m6g=8l4|TnJKC`yb=_%~dO5#AwlkgS49=BN1Vm9;#!(cP2X`6m z>;%182_dv6b-naMOyfiVBF}SA2tWYE(b4`vBH)O4+DxZu9t3Hog>b}OMmswJW;1K= zf~#>Ut^y!`V#mAO#oE~nmxc)ig77+GdJ_GJ$d0<_ zS{K=hxo75DGczx$p*2f(rZbCSHLQAO8*Q=Fc2laWvSns&nR#wn?pmqHXSCcIX4*Sj z#mvmhVZn=GWxAoYq=U(5AjI{B7fb3AT)4vxQGQD;GWm7 z31s;Z02jB+vLgr=H4YE2CxCO0YuChoj~xI(aB2Sl&~SAofC`A?s)}Qrb6fyNMFD65 zI1Ms@1krAb?_f)Fx*O4{(WV;)?o4M|o-3&`F16;m?|HNXuM8I}!`!tk&y}nymP)a# zDz0_UOKW)?GG{4Dep zd_UY#m3%l6=bAFbn?m3B{qU#Bq>rGzZ&KZcj9ZY}eHDMj9zBenNpxBbRjq5gydG)B zVKwI*a))cEXY7}{?x_kT?fm+vkyR{-B&v|onh0r{lG0(+;he~7tA=!wVpOw zXIU6}axzJhJf2K^-*sJAsUX~c3&Jo6gCIzYqG{?n&w?<|&nJ6P5O|*BC>e&au66O^ zM?LCM|9#Zmadfx4-7RoExZY$h%co@=?@fY0N$E*XD&>39bsZt#IF9GtQM!)wCVN@d z9P2ufo|Mv8fs)eogz)|Jy|=p6|91cpQ9#Y^`}iZ?M^B+w&|C3PJOeL(!SC=-u}7qb zYA~$Wuw}!FPkRgxZ0Gb19%>ECvexvhhmo4q%%iztB^{~Q^j5{DxVjRSW7?-z*4?U> z(^5%QXrnbB@@y(PNdj3^YJt+ADk6!If<#?^1xCX&MA-D-M>UbAHdL7>%&fm$4=;bFpoLDa@9tzcSG4GXm{s}%wno6Mvi!$p%O7J6*eTeHlnM@EMiV$SeTO?X7B9tx- z4^K%^kkT4trQ(1xprT|?iFzT>q_ix}LR+(HMMp$NT|6SB6$sOkmL{{q6ovcuhY?~F z?%y9qgr~@V_q$!+C-VK%8wmsO=z~A;27Uq@20@1cRACGzpbmg)q6T#}Q3EwmlgS`a zlgUD&CXd$= z*v`Hw5iYV~k!5eOBDV1rpzFGrdbsmg1JN*yI0@#B2TEF3sN>k>ih=)UtN0o$8tP-) zP9r;iN5viSWBMXC0KC!FKiywy^~i87{J7_RX`5$sU0J@fVWxnZlJl z%KOUS08mE#alanm>D~_zs_=mh2vj%<494M1Hn#%>=HYX@fHFRp@C`u??)$?qRN!yO zK@OfqBS$3$$Oi%76|9^GggH711Uh~X44%M$U$eO#C~%2h1_2&3VF>n+2E#Bz|3D5T zey|Y+==go7x45-@^ZJd|6?ymKmb`KG&J}rSORnCyD%USA-|Vfe$ji%DFRu2MS7h&+ z?)SWTxp!|x-n=JQZ`@pw*LwF>pXuFOm934dE4{l{WqNb<(ADc}cP=hZc(SkT&&_y$ zaCTmlooAIHq@|o>u)9?%T`?N>5c^^7+dK^Pr2oYP$=Q*+CyIyD(Nx2sz>Cx=k zENj)%eBAF#8P&!N*<~`k%BU%9UyW`j>&O$ri8~Vw6*bC?VZd_7P*c#8V@PGFbC2PI z_0kCES?P?40*fL{!$_g*nGG4jXs>I37^7k1kEK?pyq+#?c;HIGj4(uK^+kj7O+m$( zK7UFc`OMt2#bI~s@rcNT=U$@lj&o8UE?csea$@Glo;}OCHWuzG7YsGT$wc#>Z;L+&>P3yj H2Lk{A=GaXv delta 2584 zcmV+z3g`9Q6|fW=cTYw#00961000Uw015yA000n0000T+001$O8yzoY#<1irjiQRGEo#LLWR&FAo*xap;A_tVTyD1 zWY3r_eaw_$$uP=SYbt-$Didq(W+OJl_W@EjQJE;9GP^1r0##)7bx6XIYK4=PjY)YG zJ}B{Q`MUKGh=`c(`GoSl4@$28H=2ll09f|pd;aeE&vM(1AZ&=pCy_J|VYA&3iNu`$ zM#_4E5)lQYwS+*Don3qbFC&ixZjVP2(XGDM`WrR$0wO`4V{(5HQhFTCMhf{_~%&RxewvR;zpd{O3Pkt^WTxL~)5(8Am`Am;e7^ z8Aq6|*X#BF-*#cW{^EMQ#_iW%T(8SG0;0J5|AWgog67G+k_3g@&)^SuGv)LoBFqhQ zXGS~PTGv&nWNV~i{!FcEJ=&!mZJ0Y8^`bxNYhCMFwcLLxsidxTS=CipNlh!M#(uP; z9s5z&m9o%_@deq=bfz;nQ$`UGMP(UBQC#lbe6+J8^kyl9(4N%w!VfWx69I@k&pjak z0Tc%ZyL*X%BjRZ@ou+vZq?s1N5jP+0>R&7cp))8l)ge_N8NL+lWfJ@Gjpw(nNO;rG)s1- zGbh7xSoX{^O0m##>#D1=WoB-fd2U+nTB*Q~Yq>Mbuy?kKnVA>E37-s0(+#C%>w6ya zxW9^-rD|K|xmhxEXQYy<)^$JHQMy9KT=Gf9Ttz3CJAZ$~T52#4Jn(4s>jAWv`|db$ z<2?tH+X8-?C})t^&l|6xaf{!neIPYE^qT-2f*&``Lk1q_c{4!4uBxIu)7CnxH=O+1;lYx#WBt}E`Wog0JH#{1{pwtXuHAZu%S8KlIYlI z(+vZ6rZX+il~fs*T65j^JlcVmhKr?P?%I~;N>&w1rC3%K*ShD0wLA_PGbX2}ry-Od z_MxwkyfrPS+DSg_t8f`AA7P&eJuTBaB>MF9G)#ZK8~O^qA8x5i-kOLrO_}1Qq3`>C z_?=|ZTTt$hRQr$>3sT#U_kD}d5)uG7{qL4|N?!#^O4k#@_tV#3 zcisQD01;6@&Gw7LelQO+x$DOtByEvKcDs?bJje%D)9+({3#9M?w0 zA(ccgS{4%9evO8sH|h3BLpZ31ByZ&Lk+n9-GL3H_mOT9#*a6zc*)9~z% zamht4pOyTV=8J-KCUn76ZK5o=L25P2L`Bf_QvN}w!&s;D;C{zv%+xoEwJfnMiY~y&s(}-T2gBpl{H>5Ty@@%hHhA@AuUsN%te3Iy5qGO zYkPO@dTqwq-rY6FVa##X)@lxsQ(Lo5)6AGfd3vU1EU8!cS*9x@lgUobFPtX3Tb0R&ATn z_vLa~kWRc%&I@L7QtblcQjmYrP>?;>jI9u#=lq1s3DQXvC?}XsBA+h{COMm0$}+LY zN%6Rl3ZGJiK9kXiTa3>YMwrhXKSb~W`W?nP{{07?4x{H}SC^OVDq~f9dAVxS3#l4X zT9Z7Vn@}b+lKiH+Xt=tRmZe)%)~!lzPW5IN)yt~1T-CIsrOV@o%xiz&z1#MPy!PF@ zZI96l<~VC>j>DMad{+|_xbop28qj+POd{4+lD7izxd(p(S(@BRyd;9U>|!Mk@s5WFM0?fv+z%+b-&(Re&Qt{qiL!T6}iAez8v&j|+4W0*v4E+Wi*Qq#IG@xLe{R}E>dJI#z zMPI-)YV00;plQiCyQ7;}QvOkJxc$jAJ zp-;k562(K=s5O5tHQS9&%aiA`)Ex-fF3abz7mOeTJH*F`F+>W9WxPU&1Tl6ILLxxK zTgd~2*u*||(8UN28mN8xTWDJ-Fz`W>6W_x=5~OlcB0}$xm_VYB5eNPLv=lM65n>35 zCN9B;3lAG`(ZvQl>zxNkkzx-CE~Ab*`gslQ4pj5nY8P;;h_Q!5j1XZ{f29c|cG1Nl zBnAkvgAGWm(>M u9g@g@r%hZ!6KyomK?@!v&f6M#U`2m<#1b6ag(wQH0XY}rJ-- Date: Tue, 28 May 2024 17:48:33 +0100 Subject: [PATCH 33/54] fix vertical alignment of text in button --- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ecba6ec713..e2b2063743 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -373,7 +373,7 @@ export function ContractGUI(props: ContractGUIProps) {
From 52e409e0d194ba78f9306573ca2a88d2743e1d48 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 3 Jun 2024 12:26:51 +0530 Subject: [PATCH 35/54] set 0.8.26 as latest --- apps/remix-ide/src/assets/list.json | 14 +++++++++++++- package.json | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/assets/list.json b/apps/remix-ide/src/assets/list.json index e1eb4bd94d..6a55fff4f7 100644 --- a/apps/remix-ide/src/assets/list.json +++ b/apps/remix-ide/src/assets/list.json @@ -1011,9 +1011,21 @@ "urls": [ "dweb:/ipfs/QmdduJxmPXungjJk2FBDw1bdDQ6ucHxYGLXRMBJqMFW7h9" ] + }, + { + "path": "soljson-v0.8.26+commit.8a97fa7a.js", + "version": "0.8.26", + "build": "commit.8a97fa7a", + "longVersion": "0.8.26+commit.8a97fa7a", + "keccak256": "0x34ffb570dd3b2041e3df86cb1f9190256cd28ee5a6f3d4200fe4b9747d33f901", + "sha256": "0xdb85e5396f523cc1a53c4c4d742e204f6dcba1a05842623d73be946809e11cd6", + "urls": [ + "dweb:/ipfs/QmS5JdeXtYhGBvdgNTLWuBNHupyP623X4sf43fRbrgiTaA" + ] } ], "releases": { + "0.8.26": "soljson-v0.8.26+commit.8a97fa7a.js", "0.8.25": "soljson-v0.8.25+commit.b61c2a91.js", "0.8.24": "soljson-v0.8.24+commit.e11b9ed9.js", "0.8.23": "soljson-v0.8.23+commit.f704f362.js", @@ -1107,5 +1119,5 @@ "0.4.0": "soljson-v0.4.0+commit.acd334c9.js", "0.3.6": "soljson-v0.3.6+commit.3fc68da5.js" }, - "latestRelease": "0.8.25" + "latestRelease": "0.8.26" } \ No newline at end of file diff --git a/package.json b/package.json index 7cf16effed..ade5becb79 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "description": "Ethereum Remix Monorepo", "main": "index.js", - "defaultVersion": "soljson-v0.8.25+commit.b61c2a91.js", + "defaultVersion": "soljson-v0.8.26+commit.8a97fa7a.js", "keywords": [ "ethereum", "solidity", From f76383a6430285edcb5cc3299a07e5da867f6f9a Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 3 Jun 2024 12:54:25 +0530 Subject: [PATCH 36/54] update complete for year time unit --- .../editor/src/lib/providers/completion/completionGlobals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index cd8fc48e67..2a21068ba8 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -524,7 +524,7 @@ export function GeCompletionUnits(range: monacoTypes.IRange, monaco): monacoType if (unit !== 'years') { completionItem.detail = unit + ': time unit'; } else { - completionItem.detail = 'DEPRECATED: ' + unit + ': time unit'; + completionItem.detail = 'REMOVED in v0.5.0: ' + unit + ': time unit'; } completionItems.push(completionItem); }); From 8568331b5cc49700ef2385665ab89823c085c6e6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 28 May 2024 13:30:54 +0530 Subject: [PATCH 37/54] Minor updates for pinning contracts --- apps/remix-ide/src/app/tabs/locales/en/udapp.json | 1 + apps/remix-ide/src/app/tabs/locales/es/udapp.json | 1 + apps/remix-ide/src/app/tabs/locales/fr/udapp.json | 1 + apps/remix-ide/src/app/tabs/locales/it/udapp.json | 1 + apps/remix-ide/src/app/tabs/locales/ru/udapp.json | 1 + apps/remix-ide/src/app/tabs/locales/zh/udapp.json | 1 + libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/udapp.json b/apps/remix-ide/src/app/tabs/locales/en/udapp.json index 2f0ba01f02..bfab9f9759 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/en/udapp.json @@ -123,6 +123,7 @@ "udapp.llIError6": "Both 'receive' and 'fallback' functions are not defined", "udapp.llIError7": "Please define a 'Fallback' function to send calldata and a either 'Receive' or payable 'Fallback' to send ethers", "udapp.copy": "Copy", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "You are about to create a transaction on {name} Network. Confirm the details to send the info to your provider.", diff --git a/apps/remix-ide/src/app/tabs/locales/es/udapp.json b/apps/remix-ide/src/app/tabs/locales/es/udapp.json index 5ed17d12f9..84dcdf5f5c 100644 --- a/apps/remix-ide/src/app/tabs/locales/es/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/es/udapp.json @@ -102,6 +102,7 @@ "udapp.llIError6": "Las funciones 'receive' y 'fallback' no están definidas", "udapp.llIError7": "Por favor defina una función 'Fallback' para enviar calldata y un 'Receice' o payable 'Fallback' para enviar ethers", "udapp.copy": "Copiar", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "Estás a punto de crear una transacción en la Red {name}. Confirma los detalles para enviar la información a tu proveedor.", "udapp.mainnetText2": "El proveedor para muchos usuarios es MetaMask. El proveedor le pedirá que firme la transacción antes de enviarla a la Red {name}.", diff --git a/apps/remix-ide/src/app/tabs/locales/fr/udapp.json b/apps/remix-ide/src/app/tabs/locales/fr/udapp.json index 80b22f2cc3..337d856791 100644 --- a/apps/remix-ide/src/app/tabs/locales/fr/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/fr/udapp.json @@ -102,6 +102,7 @@ "udapp.llIError6": "Les fonctions 'receive' et 'fallback' ne sont pas définies", "udapp.llIError7": "Définissez s'il vous plaît une fonction 'Fallback' pour envoyer des calldata et soit une fonction 'Receive' ou une fonction 'Fallback' payable pour envoyer des ethers", "udapp.copy": "Copier", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "Vous êtes sur le point de créer une transaction sur le réseau {name} . Confirmez les détails pour envoyer les informations à votre fournisseur.", "udapp.mainnetText2": "Le provider pour de nombreux utilisateurs est MetaMask. Le provider vous demandera de signer la transaction avant qu'elle ne soit envoyée au réseau {name}.", diff --git a/apps/remix-ide/src/app/tabs/locales/it/udapp.json b/apps/remix-ide/src/app/tabs/locales/it/udapp.json index bb00090309..06c650b01a 100644 --- a/apps/remix-ide/src/app/tabs/locales/it/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/it/udapp.json @@ -102,6 +102,7 @@ "udapp.llIError6": "Le funzioni 'receive' e 'fallback' non sono definite", "udapp.llIError7": "Definisci una funzione 'Fallback' per inviare Calldata e una 'Receive' o 'Fallback' payable per inviare ETH", "udapp.copy": "Copia", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "Stai per creare una transazione su {name} Network. Conferma i dettagli per inviare le informazioni al tuo provider.", "udapp.mainnetText2": "Il provider per molti utenti è MetaMask. Il provider ti chiederà di firmare la transazione prima che venga inviata alla rete {name}.", diff --git a/apps/remix-ide/src/app/tabs/locales/ru/udapp.json b/apps/remix-ide/src/app/tabs/locales/ru/udapp.json index 4e69c9e02a..32f5de3cb2 100644 --- a/apps/remix-ide/src/app/tabs/locales/ru/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/ru/udapp.json @@ -103,6 +103,7 @@ "udapp.llIError6": "Обе функции 'receive' и 'fallback' не определены", "udapp.llIError7": "Пожалуйста, определите функцию 'Fallback' для отправки вызываемых данных или 'Receive' или оплачиваемую функцию 'Fallback' для отправки эфира", "udapp.copy": "Копировать", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "Вы собираетесь создать транзакцию в сети {name}. Подтвердите данные для отправки информации вашему провайдеру.", "udapp.mainnetText2": "Провайдером для многих пользователей является MetaMask. Провайдер попросит вас подписать транзакцию перед отправкой ее в сеть {name}.", diff --git a/apps/remix-ide/src/app/tabs/locales/zh/udapp.json b/apps/remix-ide/src/app/tabs/locales/zh/udapp.json index 3e7b4e3ba8..e504a1d9a1 100644 --- a/apps/remix-ide/src/app/tabs/locales/zh/udapp.json +++ b/apps/remix-ide/src/app/tabs/locales/zh/udapp.json @@ -102,6 +102,7 @@ "udapp.llIError6": "'receive' 和 'fallback' 函数都未定义", "udapp.llIError7": "定义一个 'Fallback' 函数来发送 calldata ,并且定义一个 'Receive' 或 可支付的 'Fallback' 来发送以太币", "udapp.copy": "复制", + "udapp.copyAddress": "Copy Address", "udapp._comment_mainnet.tsx": "libs/remix-ui/run-tab/src/lib/components/mainnet.tsx", "udapp.mainnetText1": "您即将在 {name} 网络上创建一笔交易。确认详细信息,将信息发送给您的 provider 。", "udapp.mainnetText2": "许多用户的 provider 是 MetaMask。在将交易发送到 {name} 网络之前,provider 会要求您签署交易。", diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index 447fa83596..f2dc284fae 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -267,7 +267,7 @@ export function UniversalDappUI(props: UdappProps) { ) }
- +
{ props.isPinnedContract ? (
}> From 46d97a25d7fafa9c394320a368358c9dd4d6ec79 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 31 May 2024 08:58:13 +0200 Subject: [PATCH 38/54] export server --- libs/remix-simulator/src/index.ts | 1 + libs/remix-simulator/src/server.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/remix-simulator/src/index.ts b/libs/remix-simulator/src/index.ts index e49f4baf86..038ef9308e 100644 --- a/libs/remix-simulator/src/index.ts +++ b/libs/remix-simulator/src/index.ts @@ -1 +1,2 @@ export { Provider, extend, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCResponseCallback } from './provider' +export * as Server from './server' diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 15636cac5a..cdd5bf09e2 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -58,9 +58,11 @@ class Server { } app.listen(port, host, () => { - log('Remix Simulator listening on ws://' + host + ':' + port) if (!this.rpcOnly) { + log('Remix Simulator listening on ws://' + host + ':' + port) log('http json-rpc is deprecated and disabled by default. To enable it use --rpc') + } else { + log('Remix Simulator listening on http://' + host + ':' + port) } }) } From 20a1caad497e21d94c164ed922667d9fb87fb72f Mon Sep 17 00:00:00 2001 From: Zubin Pratap Date: Mon, 3 Jun 2024 15:19:39 +1000 Subject: [PATCH 39/54] update ProviderOptions and update typing for server constructor param --- libs/remix-simulator/src/provider.ts | 1 + libs/remix-simulator/src/server.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 39b1cd1c5f..161bd1ff81 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -38,6 +38,7 @@ export type ProviderOptions = { logDetails?: boolean blocks?: string[], coinbase?: string + rpc?: boolean } export class Provider { diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index cdd5bf09e2..2c3a2f9f5e 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -2,7 +2,7 @@ import express from 'express' import cors from 'cors' import bodyParser from 'body-parser' import expressWs from 'express-ws' -import { Provider } from './provider' +import { Provider, ProviderOptions } from './provider' import { log } from './utils/logs' const app = express() @@ -10,7 +10,7 @@ class Server { provider rpcOnly - constructor (options) { + constructor (options?:ProviderOptions) { this.provider = new Provider(options) this.provider.init().then(() => { log('Provider initiated') From 834752c0faf8c0c98bf81e37723d054bd39c9785 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 12:20:05 +0200 Subject: [PATCH 40/54] use export keyword --- libs/remix-simulator/bin/ethsim | 2 +- libs/remix-simulator/src/index.ts | 2 +- libs/remix-simulator/src/server.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/remix-simulator/bin/ethsim b/libs/remix-simulator/bin/ethsim index 814e2a6a46..95e5ab879d 100755 --- a/libs/remix-simulator/bin/ethsim +++ b/libs/remix-simulator/bin/ethsim @@ -32,7 +32,7 @@ program console.log('details: ', option.details) console.log('host: ', option.ip) console.log('port: ', option.port) - const Server = require('../src/server') + const { Server } = require('../src/server') const server = new Server({ coinbase: option.coinbase, rpc: option.rpc, diff --git a/libs/remix-simulator/src/index.ts b/libs/remix-simulator/src/index.ts index 038ef9308e..35835a8ee2 100644 --- a/libs/remix-simulator/src/index.ts +++ b/libs/remix-simulator/src/index.ts @@ -1,2 +1,2 @@ export { Provider, extend, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCResponseCallback } from './provider' -export * as Server from './server' +export { Server } from './server' diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 2c3a2f9f5e..70c32fbaf5 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -6,7 +6,7 @@ import { Provider, ProviderOptions } from './provider' import { log } from './utils/logs' const app = express() -class Server { +export class Server { provider rpcOnly @@ -68,4 +68,3 @@ class Server { } } -module.exports = Server From c635bcff9e12baeaee4fcf268fb6a44d5467f4b4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 12:25:42 +0200 Subject: [PATCH 41/54] renaming --- libs/remix-simulator/bin/ethsim | 2 +- libs/remix-simulator/src/provider.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-simulator/bin/ethsim b/libs/remix-simulator/bin/ethsim index 95e5ab879d..93a3404f59 100755 --- a/libs/remix-simulator/bin/ethsim +++ b/libs/remix-simulator/bin/ethsim @@ -36,7 +36,7 @@ program const server = new Server({ coinbase: option.coinbase, rpc: option.rpc, - logDetails: option.details + details: option.details }) server.start(option.ip, option.port) }) diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 161bd1ff81..5edc5a7bd5 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -35,7 +35,7 @@ export type ProviderOptions = { nodeUrl?: string, blockNumber?: number | 'latest', stateDb?: State, - logDetails?: boolean + details?: boolean blocks?: string[], coinbase?: string rpc?: boolean @@ -91,12 +91,12 @@ export class Provider { return } const method = this.methods[payload.method] - if (this.options.logDetails) { + if (this.options.details) { info(payload) } if (method) { return method.call(method, payload, (err, result) => { - if (this.options.logDetails) { + if (this.options.details) { info(err) info(result) } From c0791ac74ea11bbba9210505204e654f9940f41a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:26:31 +0200 Subject: [PATCH 42/54] remove cli provider option --- libs/remix-simulator/src/provider.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-simulator/src/provider.ts b/libs/remix-simulator/src/provider.ts index 5edc5a7bd5..27918a4359 100644 --- a/libs/remix-simulator/src/provider.ts +++ b/libs/remix-simulator/src/provider.ts @@ -38,7 +38,6 @@ export type ProviderOptions = { details?: boolean blocks?: string[], coinbase?: string - rpc?: boolean } export class Provider { From 0e2b49d5608c1663c83f4304b30ad94fbf61cb2f Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:27:57 +0200 Subject: [PATCH 43/54] split options & add helper --- libs/remix-simulator/bin/ethsim | 37 +++++++++++++++++++++--------- libs/remix-simulator/src/server.ts | 18 +++++++-------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/libs/remix-simulator/bin/ethsim b/libs/remix-simulator/bin/ethsim index 93a3404f59..dd7a9c6538 100755 --- a/libs/remix-simulator/bin/ethsim +++ b/libs/remix-simulator/bin/ethsim @@ -23,22 +23,37 @@ program .command('start') .option('-p, --port [port]', 'specify port', 8545) .option('-b, --ip [host]', 'specify host', '127.0.0.1') - .option('-c, --coinbase [coinbase]', 'specify coinbase', '0x0000000000000000000000000000000000000000') .option('--rpc', 'run rpc server only', true) .option('--details', 'display payloads for every requests and their responses', false) - .action((option) => { - console.log('coinbase: ', option.coinbase) + .option('-c, --coinbase [coinbase]', 'specify coinbase', '0x0000000000000000000000000000000000000000') + .option('-f, --fork [fork]', 'specify fork name') + .option('-n, --nodeUrl [nodeUrl]', 'specify node url') + .option('-bn, --blockNumber [blockNumber]', 'specify block Number') + .option('-s, --stateDb [stateDb]', 'specify state database') + .option('-bs, --blocks [blocks]', 'specify blocks') + .action((option, env) => { + env.outputHelp() + console.log('\n') + console.log('Usage:') + console.log('remix-simulator start') + console.log('remix-simulator start -n -f cancun -bn latest') + console.log('\n') + console.log('Command line options:') + console.log('port: ', option.port) + console.log('host: ', option.ip) console.log('rpc: ', option.rpc) console.log('details: ', option.details) - console.log('host: ', option.ip) - console.log('port: ', option.port) + console.log('\n') + console.log('Provider options:') + console.log('coinbase: ', option.coinbase) + console.log('fork: ', option.fork) + console.log('nodeUrl: ', option.nodeUrl) + console.log('blockNumber: ', option.blockNumber) + console.log('stateDb: ', option.stateDb) + console.log('blocks: ', option.blocks) const { Server } = require('../src/server') - const server = new Server({ - coinbase: option.coinbase, - rpc: option.rpc, - details: option.details - }) - server.start(option.ip, option.port) + const server = new Server(option) + server.start(option) }) program.parse(process.argv) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 70c32fbaf5..16d1bbc31e 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -8,19 +8,17 @@ const app = express() export class Server { provider - rpcOnly - constructor (options?:ProviderOptions) { + constructor (options?: ProviderOptions) { this.provider = new Provider(options) this.provider.init().then(() => { log('Provider initiated') }).catch((error) => { log(error) - }) - this.rpcOnly = options.rpc + }) } - start (host, port) { + start (cliOptions: CliOptions) { const wsApp = expressWs(app) app.use(cors()) @@ -31,7 +29,7 @@ export class Server { res.send('Welcome to remix-simulator') }) - if (this.rpcOnly) { + if (cliOptions.rpc) { app.use((req, res) => { this.provider.sendAsync(req.body, (err, jsonResponse) => { if (err) { @@ -57,12 +55,12 @@ export class Server { }) } - app.listen(port, host, () => { - if (!this.rpcOnly) { - log('Remix Simulator listening on ws://' + host + ':' + port) + app.listen(cliOptions.port, cliOptions.ip, () => { + if (!cliOptions.rpc) { + log('Remix Simulator listening on ws://' + cliOptions.ip + ':' + cliOptions.port) log('http json-rpc is deprecated and disabled by default. To enable it use --rpc') } else { - log('Remix Simulator listening on http://' + host + ':' + port) + log('Remix Simulator listening on http://' + cliOptions.ip + ':' + cliOptions.port) } }) } From 1ce517b8e4b9eaf616ee95c524d3ca8ec64260b4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:28:19 +0200 Subject: [PATCH 44/54] type CliOptions --- libs/remix-simulator/src/server.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 16d1bbc31e..3795541174 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -6,6 +6,12 @@ import { Provider, ProviderOptions } from './provider' import { log } from './utils/logs' const app = express() +export type CliOptions = { + rpc?: boolean, + port: number + ip: string +} + export class Server { provider From ca278486e5f964be12520ad2580884e021b84aaa Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:28:29 +0200 Subject: [PATCH 45/54] log transaction/calls --- libs/remix-simulator/src/server.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 3795541174..2984ce2fc1 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -37,20 +37,37 @@ export class Server { if (cliOptions.rpc) { app.use((req, res) => { + if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { + console.log('Receiving call/transaction:') + console.log(req.body.params) + } this.provider.sendAsync(req.body, (err, jsonResponse) => { if (err) { + console.error(err) return res.send(JSON.stringify({ error: err })) } + if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { + console.log(jsonResponse) + } res.send(jsonResponse) }) }) } else { wsApp.app.ws('/', (ws, req) => { ws.on('message', (msg) => { - this.provider.sendAsync(JSON.parse(msg.toString()), (err, jsonResponse) => { + const body = JSON.parse(msg.toString()) + if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { + console.log('Receiving call/transaction:') + console.log(body.params) + } + this.provider.sendAsync(body, (err, jsonResponse) => { if (err) { + console.error(err) return ws.send(JSON.stringify({ error: err })) } + if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { + console.log(jsonResponse) + } ws.send(JSON.stringify(jsonResponse)) }) }) From b6e590a99ee4915e19c9b548c234db47fc9c1983 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:37:03 +0200 Subject: [PATCH 46/54] log test accounts --- libs/remix-simulator/src/server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 2984ce2fc1..84160e057c 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -19,6 +19,8 @@ export class Server { this.provider = new Provider(options) this.provider.init().then(() => { log('Provider initiated') + log('Test accounts:') + log(Object.keys(this.provider.Accounts.accounts)) }).catch((error) => { log(error) }) From f7f1941c7452e486a4e1d36e664361e7bdee631f Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 14:50:01 +0200 Subject: [PATCH 47/54] linting --- libs/remix-simulator/src/server.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 84160e057c..734ceebdc9 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -23,7 +23,7 @@ export class Server { log(Object.keys(this.provider.Accounts.accounts)) }).catch((error) => { log(error) - }) + }) } start (cliOptions: CliOptions) { @@ -41,7 +41,7 @@ export class Server { app.use((req, res) => { if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { console.log('Receiving call/transaction:') - console.log(req.body.params) + console.log(req.body.params) } this.provider.sendAsync(req.body, (err, jsonResponse) => { if (err) { @@ -49,7 +49,7 @@ export class Server { return res.send(JSON.stringify({ error: err })) } if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { - console.log(jsonResponse) + console.log(jsonResponse) } res.send(jsonResponse) }) @@ -60,7 +60,7 @@ export class Server { const body = JSON.parse(msg.toString()) if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { console.log('Receiving call/transaction:') - console.log(body.params) + console.log(body.params) } this.provider.sendAsync(body, (err, jsonResponse) => { if (err) { @@ -68,7 +68,7 @@ export class Server { return ws.send(JSON.stringify({ error: err })) } if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { - console.log(jsonResponse) + console.log(jsonResponse) } ws.send(JSON.stringify(jsonResponse)) }) From a03c7d4b917908dcaa5674112f0401b6e08acb74 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Jun 2024 18:04:49 +0200 Subject: [PATCH 48/54] update import and logging --- libs/remix-simulator/src/server.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/remix-simulator/src/server.ts b/libs/remix-simulator/src/server.ts index 734ceebdc9..0f285609d1 100644 --- a/libs/remix-simulator/src/server.ts +++ b/libs/remix-simulator/src/server.ts @@ -1,10 +1,7 @@ -import express from 'express' import cors from 'cors' import bodyParser from 'body-parser' -import expressWs from 'express-ws' import { Provider, ProviderOptions } from './provider' -import { log } from './utils/logs' -const app = express() +import { log, error } from './utils/logs' export type CliOptions = { rpc?: boolean, @@ -26,7 +23,10 @@ export class Server { }) } - start (cliOptions: CliOptions) { + async start (cliOptions: CliOptions) { + const expressWs = (await import('express-ws')).default + const express = (await import('express')).default + const app = express() const wsApp = expressWs(app) app.use(cors()) @@ -40,16 +40,16 @@ export class Server { if (cliOptions.rpc) { app.use((req, res) => { if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { - console.log('Receiving call/transaction:') - console.log(req.body.params) + log('Receiving call/transaction:') + log(req.body.params) } this.provider.sendAsync(req.body, (err, jsonResponse) => { if (err) { - console.error(err) + error(err) return res.send(JSON.stringify({ error: err })) } if (req && req.body && (req.body.method === 'eth_sendTransaction' || req.body.method === 'eth_call')) { - console.log(jsonResponse) + log(jsonResponse) } res.send(jsonResponse) }) @@ -59,16 +59,16 @@ export class Server { ws.on('message', (msg) => { const body = JSON.parse(msg.toString()) if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { - console.log('Receiving call/transaction:') - console.log(body.params) + log('Receiving call/transaction:') + log(body.params) } this.provider.sendAsync(body, (err, jsonResponse) => { if (err) { - console.error(err) + error(err) return ws.send(JSON.stringify({ error: err })) } if (body && (body.method === 'eth_sendTransaction' || body.method === 'eth_call')) { - console.log(jsonResponse) + log(jsonResponse) } ws.send(JSON.stringify(jsonResponse)) }) From b6dd9261bc433aead86a4ceff5c7a7fd6b41ca93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Wed, 22 May 2024 14:13:08 +0200 Subject: [PATCH 49/54] switched open gpt to solcoder for error explaining --- .../src/app/components/feedbackAlert.tsx | 2 +- apps/remix-ide/src/app/plugins/solcoderAI.tsx | 31 ++++++++++++++++++- apps/vyper/src/app/utils/remix-client.tsx | 5 ++- libs/remix-ui/renderer/src/lib/renderer.tsx | 6 ++-- .../terminal/src/lib/remix-ui-terminal.tsx | 5 +-- .../terminal/src/lib/terminalWelcome.tsx | 3 -- 6 files changed, 41 insertions(+), 11 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx index 3edf89cc20..5bc7114520 100644 --- a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx +++ b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx @@ -24,7 +24,7 @@ export function FeedbackAlert ({ message, askGPT }: FeedbackAlertProps) { { e.stopPropagation() askGPT() - }}>ASK GPT + }}>ASK SOL-GPT
diff --git a/apps/remix-ide/src/app/plugins/solcoderAI.tsx b/apps/remix-ide/src/app/plugins/solcoderAI.tsx index 94687d3440..44e7a8121e 100644 --- a/apps/remix-ide/src/app/plugins/solcoderAI.tsx +++ b/apps/remix-ide/src/app/plugins/solcoderAI.tsx @@ -15,7 +15,7 @@ const profile = { name: 'solcoder', displayName: 'solcoder', description: 'solcoder', - methods: ['code_generation', 'code_completion', "solidity_answer", "code_explaining", "code_insertion"], + methods: ['code_generation', 'code_completion', "solidity_answer", "code_explaining", "code_insertion", "error_explaining"], events: [], maintainedBy: 'Remix', } @@ -218,6 +218,35 @@ export class SolCoder extends Plugin { } } + async error_explaining(prompt): Promise { + this.emit("aiInfering") + this.call('layout', 'maximizeTerminal') + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + + let result + try { + result = await( + await fetch(this.api_url, { + method: 'POST', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ "data":[prompt, "error_explaining", false,2000,0.9,0.8,50]}), + }) + ).json() + if (result) { + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.data[0] }) + } + return result.data[0] + } catch (e) { + this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) + return + } finally { + this.emit("aiInferingDone") + } + } + _build_solgpt_promt(user_promt:string){ if (this.solgpt_chat_history.length === 0){ return user_promt diff --git a/apps/vyper/src/app/utils/remix-client.tsx b/apps/vyper/src/app/utils/remix-client.tsx index 088aa6c36d..3de036f352 100644 --- a/apps/vyper/src/app/utils/remix-client.tsx +++ b/apps/vyper/src/app/utils/remix-client.tsx @@ -5,6 +5,7 @@ import {PluginClient} from '@remixproject/plugin' import {Contract, compileContract} from './compiler' import {ExampleContract} from '../components/VyperResult' import EventEmitter from 'events' +const _paq = (window._paq = window._paq || []) export type VyperComplierAddress = 'https://vyper2.remixproject.org/' | 'http://localhost:8000/' @@ -66,11 +67,13 @@ export class RemixClient extends PluginClient { return } try { + // TODO: remove! no formatting required since already handled on server const formattedMessage = ` ${message} can you explain why this error occurred and how to fix it? ` - await this.client.call('openaigpt' as any, 'message', formattedMessage) + await this.client.call('solcoder' as any, 'error_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining']) } catch (err) { console.error('unable to askGpt') console.error(err) diff --git a/libs/remix-ui/renderer/src/lib/renderer.tsx b/libs/remix-ui/renderer/src/lib/renderer.tsx index 00a7af8ab3..6d830a8230 100644 --- a/libs/remix-ui/renderer/src/lib/renderer.tsx +++ b/libs/remix-ui/renderer/src/lib/renderer.tsx @@ -75,8 +75,8 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => { try { const content = await plugin.call('fileManager', 'readFile', editorOptions.errFile) const message = intl.formatMessage({ id: 'solidity.openaigptMessage' }, { content, messageText }) - await plugin.call('openaigpt', 'message', message) - _paq.push(['trackEvent', 'ai', 'openai', 'explainSolidityError']) + await plugin.call('solcoder', 'error_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_SolidityError']) } catch (err) { console.error('unable to askGtp') console.error(err) @@ -111,7 +111,7 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => { onClick={() => { askGtp() }} style={{ borderColor: "var(--ai)" }} > - ASK GPT + ASK SOL-GPT
diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index b5edd8a425..7936cda55e 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -235,10 +235,11 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { try { if (script.trim().startsWith('git')) { // await this.call('git', 'execute', script) code might be used in the future + // TODO: rm gpt or redirect gpt to sol-pgt } else if (script.trim().startsWith('gpt')) { call('terminal', 'log',{ type: 'warn', value: `> ${script}` }) - await call('openaigpt', 'message', script) - _paq.push(['trackEvent', 'ai', 'openai', 'askFromTerminal']) + await call('solcoder', 'solidity_answer', script) + _paq.push(['trackEvent', 'ai', 'solcoder', 'askFromTerminal']) } else if (script.trim().startsWith('sol-gpt')) { call('terminal', 'log',{ type: 'warn', value: `> ${script}` }) await call('solcoder', 'solidity_answer', script) diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx index 7fb7dbea23..1d1dcf77c8 100644 --- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx +++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx @@ -54,9 +54,6 @@ const TerminalWelcomeMessage = ({ packageJson, storage }) => { ethers.js {' '} -
  • - gpt <your question here> {' '} -
  • sol-gpt <your Solidity question here> {' '}
  • From b8eae1d74f273a8345685aa4abf77a0f544447b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Wed, 22 May 2024 14:28:02 +0200 Subject: [PATCH 50/54] added support for circom errors and modfied also function explain --- apps/circuit-compiler/src/app/components/container.tsx | 10 +++++++--- libs/remix-ui/editor/src/lib/remix-ui-editor.tsx | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index 51cc280594..0b67e6b153 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -11,6 +11,7 @@ import { WitnessToggler } from './witnessToggler' import { WitnessSection } from './witness' import { CompilerFeedback } from './feedback' import { CompilerReport, PrimeValue } from '../types' +const _paq = (window._paq = window._paq || []) export function Container () { const circuitApp = useContext(CircuitAppContext) @@ -73,7 +74,8 @@ export function Container () { explain why the error occurred and how to fix it. ` // @ts-ignore - await circuitApp.plugin.call('openaigpt', 'message', message) + await circuitApp.plugin.call('solcoder', 'error_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } else { const message = ` error message: ${error} @@ -81,7 +83,8 @@ export function Container () { explain why the error occurred and how to fix it. ` // @ts-ignore - await circuitApp.plugin.call('openaigpt', 'message', message) + await circuitApp.plugin.call('solcoder', 'error_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } } else { const error = report.message @@ -91,7 +94,8 @@ export function Container () { explain why the error occurred and how to fix it. ` // @ts-ignore - await circuitApp.plugin.call('openaigpt', 'message', message) + await circuitApp.plugin.call('solcoder', 'error_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } } diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index a0ed7626aa..b29586115e 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -739,8 +739,8 @@ export const EditorUI = (props: EditorUIProps) => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) const message = intl.formatMessage({ id: 'editor.explainFunctionByAI' }, { content, currentFunction: currentFunction.current }) - await props.plugin.call('openaigpt', 'message', message) - _paq.push(['trackEvent', 'ai', 'openai', 'explainFunction']) + await props.plugin.call('solcoder', 'code_explaining', message, content) + _paq.push(['trackEvent', 'ai', 'solcoder', 'explainFunction']) }, } From a0713d6d8d86922fc46cb6cf4a4b33d430f027a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Wed, 22 May 2024 14:38:35 +0200 Subject: [PATCH 51/54] added documentation generation --- libs/remix-ui/editor/src/lib/remix-ui-editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index b29586115e..ed28f65618 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -723,8 +723,8 @@ export const EditorUI = (props: EditorUIProps) => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) const message = intl.formatMessage({ id: 'editor.generateDocumentationByAI' }, { content, currentFunction: currentFunction.current }) - await props.plugin.call('openaigpt', 'message', message) - _paq.push(['trackEvent', 'ai', 'openai', 'generateDocumentation']) + await props.plugin.call('solcoder', 'code_explaining', message) + _paq.push(['trackEvent', 'ai', 'solcoder', 'generateDocumentation']) }, } From bd67db5e1f519219727290a96a296fc03dfb711d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Wed, 22 May 2024 14:58:02 +0200 Subject: [PATCH 52/54] moved logs to solcoderAI.tsx --- .../src/app/components/container.tsx | 6 +----- apps/remix-ide/src/app/plugins/solcoderAI.tsx | 13 +++++++++++++ apps/vyper/src/app/utils/remix-client.tsx | 3 --- .../src/lib/providers/inlineCompletionProvider.ts | 3 --- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index 0b67e6b153..40cf20f5df 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -11,7 +11,6 @@ import { WitnessToggler } from './witnessToggler' import { WitnessSection } from './witness' import { CompilerFeedback } from './feedback' import { CompilerReport, PrimeValue } from '../types' -const _paq = (window._paq = window._paq || []) export function Container () { const circuitApp = useContext(CircuitAppContext) @@ -54,7 +53,7 @@ export function Container () { const handleCircuitAutoCompile = (value: boolean) => { circuitApp.dispatch({ type: 'SET_AUTO_COMPILE', payload: value }) } - + const handleCircuitHideWarnings = (value: boolean) => { circuitApp.dispatch({ type: 'SET_HIDE_WARNINGS', payload: value }) } @@ -75,7 +74,6 @@ export function Container () { ` // @ts-ignore await circuitApp.plugin.call('solcoder', 'error_explaining', message) - _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } else { const message = ` error message: ${error} @@ -84,7 +82,6 @@ export function Container () { ` // @ts-ignore await circuitApp.plugin.call('solcoder', 'error_explaining', message) - _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } } else { const error = report.message @@ -95,7 +92,6 @@ export function Container () { ` // @ts-ignore await circuitApp.plugin.call('solcoder', 'error_explaining', message) - _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_circom']) } } diff --git a/apps/remix-ide/src/app/plugins/solcoderAI.tsx b/apps/remix-ide/src/app/plugins/solcoderAI.tsx index 44e7a8121e..6e5efcf7bd 100644 --- a/apps/remix-ide/src/app/plugins/solcoderAI.tsx +++ b/apps/remix-ide/src/app/plugins/solcoderAI.tsx @@ -50,6 +50,8 @@ export class SolCoder extends Plugin { async code_generation(prompt): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') + _paq.push(['trackEvent', 'ai', 'solcoder', 'code_generation']) + let result try { result = await( @@ -78,6 +80,9 @@ export class SolCoder extends Plugin { async solidity_answer(prompt): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + _paq.push(['trackEvent', 'ai', 'solcoder', 'answering']) + let result try { const main_prompt = this._build_solgpt_promt(prompt) @@ -112,6 +117,9 @@ export class SolCoder extends Plugin { async code_explaining(prompt, context:string=""): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + _paq.push(['trackEvent', 'ai', 'solcoder', 'explaining']) + let result try { result = await( @@ -138,6 +146,8 @@ export class SolCoder extends Plugin { async code_completion(prompt, options:SuggestOptions=null): Promise { this.emit("aiInfering") + _paq.push(['trackEvent', 'ai', 'solcoder', 'code_completion']) + let result try { result = await( @@ -184,6 +194,8 @@ export class SolCoder extends Plugin { async code_insertion(msg_pfx, msg_sfx): Promise { this.emit("aiInfering") + _paq.push(['trackEvent', 'ai', 'solcoder', 'code_insertion']) + let result try { result = await( @@ -222,6 +234,7 @@ export class SolCoder extends Plugin { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + _paq.push(['trackEvent', 'ai', 'solcoder', 'explaining']) let result try { diff --git a/apps/vyper/src/app/utils/remix-client.tsx b/apps/vyper/src/app/utils/remix-client.tsx index 3de036f352..cbfa5eb87e 100644 --- a/apps/vyper/src/app/utils/remix-client.tsx +++ b/apps/vyper/src/app/utils/remix-client.tsx @@ -5,8 +5,6 @@ import {PluginClient} from '@remixproject/plugin' import {Contract, compileContract} from './compiler' import {ExampleContract} from '../components/VyperResult' import EventEmitter from 'events' -const _paq = (window._paq = window._paq || []) - export type VyperComplierAddress = 'https://vyper2.remixproject.org/' | 'http://localhost:8000/' export class RemixClient extends PluginClient { @@ -73,7 +71,6 @@ export class RemixClient extends PluginClient { can you explain why this error occurred and how to fix it? ` await this.client.call('solcoder' as any, 'error_explaining', message) - _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining']) } catch (err) { console.error('unable to askGpt') console.error(err) diff --git a/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts b/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts index 92c79914b5..ce274d57b5 100644 --- a/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts @@ -66,7 +66,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli this.props.plugin.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Solcoder - generating code for following comment: ' + ask.replace('///', '') }) const data = await this.props.plugin.call('solcoder', 'code_generation', word) - _paq.push(['trackEvent', 'ai', 'solcoder', 'code_generation']) const parsedData = data[0].trimStart() //JSON.parse(data).trimStart() const item: monacoTypes.languages.InlineCompletion = { @@ -105,7 +104,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli // Code insertion try { const output = await this.props.plugin.call('solcoder', 'code_insertion', word, word_after) - _paq.push(['trackEvent', 'ai', 'solcoder', 'code_insertion']) const generatedText = output[0] // no need to clean it. should already be const item: monacoTypes.languages.InlineCompletion = { @@ -130,7 +128,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli try { // Code completion const output = await this.props.plugin.call('solcoder', 'code_completion', word) - _paq.push(['trackEvent', 'ai', 'solcoder', 'code_completion']) const generatedText = output[0] let clean = generatedText From 6b345a1259934e1f222365a44d34cb90880a4253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Fri, 24 May 2024 10:54:27 +0200 Subject: [PATCH 53/54] renamed sol-gpt to remix ai --- apps/circuit-compiler/src/app/components/feedbackAlert.tsx | 2 +- apps/remix-ide/src/app/plugins/solcoderAI.tsx | 6 +++--- libs/remix-ui/renderer/src/lib/renderer.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx index 5bc7114520..0ce8066bad 100644 --- a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx +++ b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx @@ -24,7 +24,7 @@ export function FeedbackAlert ({ message, askGPT }: FeedbackAlertProps) { { e.stopPropagation() askGPT() - }}>ASK SOL-GPT + }}>ASK Remix AI
    diff --git a/apps/remix-ide/src/app/plugins/solcoderAI.tsx b/apps/remix-ide/src/app/plugins/solcoderAI.tsx index 6e5efcf7bd..85ea43bef7 100644 --- a/apps/remix-ide/src/app/plugins/solcoderAI.tsx +++ b/apps/remix-ide/src/app/plugins/solcoderAI.tsx @@ -80,7 +80,7 @@ export class SolCoder extends Plugin { async solidity_answer(prompt): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for Remix AI answer...` }) _paq.push(['trackEvent', 'ai', 'solcoder', 'answering']) let result @@ -117,7 +117,7 @@ export class SolCoder extends Plugin { async code_explaining(prompt, context:string=""): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for Remix AI answer...` }) _paq.push(['trackEvent', 'ai', 'solcoder', 'explaining']) let result @@ -233,7 +233,7 @@ export class SolCoder extends Plugin { async error_explaining(prompt): Promise { this.emit("aiInfering") this.call('layout', 'maximizeTerminal') - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for SOL-GPT answer...` }) + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `\n\nWaiting for Remix AI answer...` }) _paq.push(['trackEvent', 'ai', 'solcoder', 'explaining']) let result diff --git a/libs/remix-ui/renderer/src/lib/renderer.tsx b/libs/remix-ui/renderer/src/lib/renderer.tsx index 6d830a8230..c6041801ed 100644 --- a/libs/remix-ui/renderer/src/lib/renderer.tsx +++ b/libs/remix-ui/renderer/src/lib/renderer.tsx @@ -111,7 +111,7 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => { onClick={() => { askGtp() }} style={{ borderColor: "var(--ai)" }} > - ASK SOL-GPT + ASK Remix AI
    From e4dd8dfc77778b7b83c8e4052de9795c60a135ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Mon, 27 May 2024 12:13:30 +0200 Subject: [PATCH 54/54] rm openai bindings --- apps/remix-ide/src/app.js | 6 +-- apps/remix-ide/src/app/plugins/openaigpt.tsx | 49 -------------------- apps/remix-ide/src/remixAppManager.js | 1 - apps/remix-ide/src/remixEngine.js | 1 - 4 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 apps/remix-ide/src/app/plugins/openaigpt.tsx diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 1fa9e2f8f7..5a2ddf2a47 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -54,8 +54,6 @@ import { electronTemplates } from './app/plugins/electron/templatesPlugin' import { xtermPlugin } from './app/plugins/electron/xtermPlugin' import { ripgrepPlugin } from './app/plugins/electron/ripgrepPlugin' import { compilerLoaderPlugin, compilerLoaderPluginDesktop } from './app/plugins/electron/compilerLoaderPlugin' - -import {OpenAIGpt} from './app/plugins/openaigpt' import {SolCoder} from './app/plugins/solcoderAI' const isElectron = require('is-electron') @@ -233,7 +231,6 @@ class AppComponent { const contractFlattener = new ContractFlattener() // ----------------- AI -------------------------------------- - const openaigpt = new OpenAIGpt() const solcoder = new SolCoder() // ----------------- import content service ------------------------ @@ -352,7 +349,6 @@ class AppComponent { contractFlattener, solidityScript, templates, - openaigpt, solcoder, pluginStateLogger ]) @@ -512,7 +508,7 @@ class AppComponent { await this.appManager.registerContextMenuItems() } ) - await this.appManager.activatePlugin(['solidity-script', 'openaigpt']) + await this.appManager.activatePlugin(['solidity-script']) await this.appManager.activatePlugin(['solcoder']) diff --git a/apps/remix-ide/src/app/plugins/openaigpt.tsx b/apps/remix-ide/src/app/plugins/openaigpt.tsx deleted file mode 100644 index e436d7c9d7..0000000000 --- a/apps/remix-ide/src/app/plugins/openaigpt.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Plugin } from '@remixproject/engine' -import { CreateChatCompletionResponse } from 'openai' - -const _paq = (window._paq = window._paq || []) - -const profile = { - name: 'openaigpt', - displayName: 'openaigpt', - description: 'openaigpt', - methods: ['message'], - events: [], - maintainedBy: 'Remix', -} - -export class OpenAIGpt extends Plugin { - constructor() { - super(profile) - } - - async message(prompt): Promise { - this.call('layout', 'maximizeTerminal') - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Waiting for GPT answer...' }) - let result - try { - result = await ( - await fetch('https://openai-gpt.remixproject.org', { - method: 'POST', - headers: { - Accept: 'application/json', - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ prompt }), - }) - ).json() - } catch (e) { - this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) - return - } - - if (result && result.choices && result.choices.length) { - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.choices[0].message.content }) - } else if (result.error) { - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.error }) - } else { - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'No response...' }) - } - return result.data - } -} diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index df13ce19c0..c52b50c081 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -71,7 +71,6 @@ let requiredModules = [ // services + layout views + system views 'vyperCompilationDetails', 'contractflattener', 'solidity-script', - 'openaigpt', 'solcoder', 'home', 'doc-viewer', diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js index 948eca47bc..baaf75deda 100644 --- a/apps/remix-ide/src/remixEngine.js +++ b/apps/remix-ide/src/remixEngine.js @@ -26,7 +26,6 @@ export class RemixEngine extends Engine { if (name === 'compilerloader') return { queueTimeout: 60000 * 4 } if (name === 'filePanel') return { queueTimeout: 60000 * 20 } if (name === 'fileManager') return { queueTimeout: 60000 * 20 } - if (name === 'openaigpt') return { queueTimeout: 60000 * 2 } if (name === 'solcoder') return { queueTimeout: 60000 * 2 } if (name === 'cookbookdev') return { queueTimeout: 60000 * 3 } return { queueTimeout: 10000 }