From ebe01341b335d58bb11bc2cb3dda914f41ba7524 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 19 Mar 2024 12:49:35 +0100 Subject: [PATCH 1/3] Fix parsing bug when typing an array value as witness input. --- .../src/app/components/witness.tsx | 16 +++++++++++++--- apps/remix-ide/src/assets/list.json | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/witness.tsx b/apps/circuit-compiler/src/app/components/witness.tsx index 4b085fda2f..08f82ca171 100644 --- a/apps/circuit-compiler/src/app/components/witness.tsx +++ b/apps/circuit-compiler/src/app/components/witness.tsx @@ -12,10 +12,20 @@ export function WitnessSection ({ plugin, signalInputs, status }: {plugin: Circo const handleSignalInput = (e: any) => { let value = e.target.value - try { - value = remixLib.execution.txFormat.parseFunctionParams(value) - } catch (e) { + if (value.startsWith('[') && value.endsWith(']')) { + try { + value = remixLib.execution.txFormat.parseFunctionParams(value) + } catch (e) { // do nothing + } + } else if (value.startsWith('[') && !value.endsWith(']')) { + // do nothing + } else { + try { + value = remixLib.execution.txFormat.parseFunctionParams(value) + } catch (e) { + // do nothing + } } setWitnessValues({ ...witnessValues, diff --git a/apps/remix-ide/src/assets/list.json b/apps/remix-ide/src/assets/list.json index b22d882d4b..04a4929e01 100644 --- a/apps/remix-ide/src/assets/list.json +++ b/apps/remix-ide/src/assets/list.json @@ -1091,9 +1091,22 @@ "bzzr://c604bdd6384bf73594cd0e5cfbe979048191549ebc88e70996346f3b744c0680", "dweb:/ipfs/QmW2SQbEhiz3n2qV5iL8WBgzapv6cXjkLStvTMpCZhvr2x" ] + }, + { + "path": "soljson-v0.8.25+commit.b61c2a91.js", + "version": "0.8.25", + "build": "commit.b61c2a91", + "longVersion": "0.8.25+commit.b61c2a91", + "keccak256": "0x4639103a26b2f669bd3ecc22b1a1665819f2a2956f917ab91380bd9565dbcd01", + "sha256": "0xf8c9554471ff2db3843167dffb7a503293b5dc728c8305b044ef9fd37d626ca7", + "urls": [ + "bzzr://d201e60bd46193b11382988a854132b9e7fb0e1574cc766cb7f9efe8e44a680c", + "dweb:/ipfs/QmdduJxmPXungjJk2FBDw1bdDQ6ucHxYGLXRMBJqMFW7h9" + ] } ], "releases": { + "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", "0.8.22": "soljson-v0.8.22+commit.4fc1097e.js", @@ -1186,5 +1199,5 @@ "0.4.0": "soljson-v0.4.0+commit.acd334c9.js", "0.3.6": "soljson-v0.3.6+commit.3fc68da5.js" }, - "latestRelease": "0.8.24" + "latestRelease": "0.8.25" } \ No newline at end of file From 59b19068e1ad2e4c2e498efff2677da5eea7bb71 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 20 Mar 2024 10:41:28 +0100 Subject: [PATCH 2/3] Revert desktop artefacts --- apps/remix-ide/src/assets/list.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/remix-ide/src/assets/list.json b/apps/remix-ide/src/assets/list.json index 04a4929e01..b22d882d4b 100644 --- a/apps/remix-ide/src/assets/list.json +++ b/apps/remix-ide/src/assets/list.json @@ -1091,22 +1091,9 @@ "bzzr://c604bdd6384bf73594cd0e5cfbe979048191549ebc88e70996346f3b744c0680", "dweb:/ipfs/QmW2SQbEhiz3n2qV5iL8WBgzapv6cXjkLStvTMpCZhvr2x" ] - }, - { - "path": "soljson-v0.8.25+commit.b61c2a91.js", - "version": "0.8.25", - "build": "commit.b61c2a91", - "longVersion": "0.8.25+commit.b61c2a91", - "keccak256": "0x4639103a26b2f669bd3ecc22b1a1665819f2a2956f917ab91380bd9565dbcd01", - "sha256": "0xf8c9554471ff2db3843167dffb7a503293b5dc728c8305b044ef9fd37d626ca7", - "urls": [ - "bzzr://d201e60bd46193b11382988a854132b9e7fb0e1574cc766cb7f9efe8e44a680c", - "dweb:/ipfs/QmdduJxmPXungjJk2FBDw1bdDQ6ucHxYGLXRMBJqMFW7h9" - ] } ], "releases": { - "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", "0.8.22": "soljson-v0.8.22+commit.4fc1097e.js", @@ -1199,5 +1186,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.24" } \ No newline at end of file From d939f4960ad1a85361db72cfd25f00a9f00d1f84 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Fri, 22 Mar 2024 06:52:18 +0100 Subject: [PATCH 3/3] Update downloadsoljson.sh --- apps/remix-ide/ci/downloadsoljson.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/ci/downloadsoljson.sh b/apps/remix-ide/ci/downloadsoljson.sh index 6fa9979acb..4d3d93932f 100644 --- a/apps/remix-ide/ci/downloadsoljson.sh +++ b/apps/remix-ide/ci/downloadsoljson.sh @@ -10,27 +10,22 @@ if ! command -v curl &> /dev/null; then exit 1 fi -if ! command -v jq &> /dev/null; then - echo "jq could not be found" - exit 1 -fi - # Read the defaultVersion from package.json -defaultVersion=$(jq -r '.defaultVersion' package.json) +defaultVersion=$(grep '"defaultVersion"' package.json | awk -F '"' '{print $4}') echo "Specified version from package.json: $defaultVersion" # Download the list.json file containing available versions curl -s https://binaries.soliditylang.org/wasm/list.json > list.json # Use jq to extract the path for the specified version from the builds array -path=$(jq -r --arg version "$defaultVersion" '.builds[] | select(.path==$version) | .path' list.json) -if [ -z "$path" ]; then +check=$(grep "\"$defaultVersion\"" list.json) +if [ -z "$check" ]; then echo "The specified version $defaultVersion could not be found in the list" exit 1 fi -echo "Path for the specified version: $path" -fullPath="https://binaries.soliditylang.org/bin/$path" +echo "Path for the specified version: $defaultVersion" +fullPath="https://binaries.soliditylang.org/bin/$defaultVersion" echo "Download fullPath: $fullPath" # Ensure the target directory exists