From ebed3da83908c165570c2f1ced91eeda7e79b239 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 10 Feb 2023 18:19:46 +0100 Subject: [PATCH 01/13] yarn install --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3f5d6a2006..5cd08a7c61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2883,7 +2883,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -12293,7 +12293,7 @@ ethers@^5.4.2: "@ethersproject/web" "5.5.0" "@ethersproject/wordlists" "5.5.0" -ethers@^5.7.2: +ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== From 8cb2cda4cfad7c7be58b0443c522c22df0e5894a Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 13 Feb 2023 15:13:15 +0100 Subject: [PATCH 02/13] fixes --- apps/remix-ide/src/app/plugins/contractFlattener.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/contractFlattener.tsx b/apps/remix-ide/src/app/plugins/contractFlattener.tsx index 4433ffcf23..307fd72f31 100644 --- a/apps/remix-ide/src/app/plugins/contractFlattener.tsx +++ b/apps/remix-ide/src/app/plugins/contractFlattener.tsx @@ -26,7 +26,7 @@ export class ContractFlattener extends Plugin { async flattenAContract(action: customAction) { this.fileName = action.path[0] - this.call('solidity', 'compile', this.fileName) + await this.call('solidity', 'compile', this.fileName) } /** @@ -38,9 +38,12 @@ export class ContractFlattener extends Plugin { async flattenContract (source: any, filePath: string, data: any) { const ast = data.sources const dependencyGraph = getDependencyGraph(ast, filePath) + console.log({ dependencyGraph }) + const sortedGraph = dependencyGraph.sort().reverse() const sorted = dependencyGraph.isEmpty() - ? [filePath] - : dependencyGraph.sort().reverse() + ? [filePath] + : dependencyGraph.sort().reverse() + console.log({ sortedGraph, sorted }) const sources = source.sources const result = concatSourceFiles(sorted, sources) await this.call('fileManager', 'writeFile', `${filePath}_flattened.sol`, result) From ff10b891f6f5b5084f62c83714e54bf0f0004f3b Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 13 Feb 2023 16:54:09 +0100 Subject: [PATCH 03/13] fix bug where flattened sol file is in wrong order --- apps/remix-ide/src/app/plugins/contractFlattener.tsx | 3 --- .../solidity-compiler/src/lib/logic/flattenerUtilities.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/contractFlattener.tsx b/apps/remix-ide/src/app/plugins/contractFlattener.tsx index 307fd72f31..71c3a4a1c1 100644 --- a/apps/remix-ide/src/app/plugins/contractFlattener.tsx +++ b/apps/remix-ide/src/app/plugins/contractFlattener.tsx @@ -38,12 +38,9 @@ export class ContractFlattener extends Plugin { async flattenContract (source: any, filePath: string, data: any) { const ast = data.sources const dependencyGraph = getDependencyGraph(ast, filePath) - console.log({ dependencyGraph }) - const sortedGraph = dependencyGraph.sort().reverse() const sorted = dependencyGraph.isEmpty() ? [filePath] : dependencyGraph.sort().reverse() - console.log({ sortedGraph, sorted }) const sources = source.sources const result = concatSourceFiles(sorted, sources) await this.call('fileManager', 'writeFile', `${filePath}_flattened.sol`, result) 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 3d90ab35da..ea147ba3c9 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -28,7 +28,7 @@ function _traverse(graph, visited, ast, name) { for (const dependency of dependencies) { const path = resolve(name, dependency); if (path in visited) { - continue; + // continue; fixes wrong ordering of source in flattened file } visited[path] = 1; graph.add(name, path); From aa3276b235b6d78ac563c7bd82f95d8bacbd9f9a Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Tue, 14 Feb 2023 10:29:20 +0100 Subject: [PATCH 04/13] fix yarn.lock. fix comment --- .../solidity-compiler/src/lib/logic/flattenerUtilities.ts | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 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 ea147ba3c9..462353d8e7 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/flattenerUtilities.ts @@ -28,7 +28,7 @@ function _traverse(graph, visited, ast, name) { for (const dependency of dependencies) { const path = resolve(name, dependency); 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); diff --git a/yarn.lock b/yarn.lock index 5cd08a7c61..3f5d6a2006 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2883,7 +2883,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1": +"@ethersproject/providers@5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -12293,7 +12293,7 @@ ethers@^5.4.2: "@ethersproject/web" "5.5.0" "@ethersproject/wordlists" "5.5.0" -ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== From eacf3878b103e941064827beb38827a88af5c0b8 Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 7 Feb 2023 11:38:59 +0100 Subject: [PATCH 05/13] featured area restyling --- .../src/lib/components/homeTabFeatured.tsx | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index f2ea97fe57..5c7ca78893 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -38,49 +38,51 @@ function HomeTabFeatured() { >
-
-
- From 51af32233778ed31e46ea1a2e8a522a71623687a Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 7 Feb 2023 12:04:26 +0100 Subject: [PATCH 06/13] restyling learneth section --- .../src/lib/components/homeTabLearn.tsx | 20 +++++++------- .../src/lib/components/homeTabTitle.tsx | 27 ++++++++++--------- .../home-tab/src/lib/remix-ui-home-tab.tsx | 2 +- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx index 9d675949b1..e701d21d9c 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx @@ -70,7 +70,7 @@ function HomeTabLearn ({plugin}: HomeTabLearnProps) { {(state.visibleTutorial === VisibleTutorial.Basics) &&
- + + +
} {(state.visibleTutorial === VisibleTutorial.Advanced) &&
- - + + + + +
}
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index b09242c7e5..78aad5345e 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -52,19 +52,22 @@ function HomeTabTitle() { return (
-
-
playRemi()} style={{ filter: themeFilter.filter}} > - -
- -
+
+
Remix +
+
playRemi()} > + +
+ +
+
- +