diff --git a/apps/circuit-compiler/src/app/actions/index.ts b/apps/circuit-compiler/src/app/actions/index.ts index 332d7de97c..20257007d0 100644 --- a/apps/circuit-compiler/src/app/actions/index.ts +++ b/apps/circuit-compiler/src/app/actions/index.ts @@ -29,7 +29,7 @@ export const computeWitness = async (plugin: CircomPluginClient, appState: AppSt const wtns = await snarkjs.wtns.exportJson(witness) const wtnsJson = wtns.map(wtn => wtn.toString()) const fileName = extractNameFromKey(appState.filePath) - const writePath = extractParentFromKey(appState.filePath) + `/bin/${fileName.replace('.circom', '.wtn.json')}` + const writePath = extractParentFromKey(appState.filePath) + `/.bin/${fileName.replace('.circom', '.wtn.json')}` await plugin.call('fileManager', 'writeFile', writePath, JSON.stringify(wtnsJson, null, 2)) plugin._paq.push(['trackEvent', 'circuit-compiler', 'computeWitness', 'wtns.exportJson', writePath]) @@ -53,7 +53,7 @@ export const runSetupAndExport = async (plugin: CircomPluginClient, appState: Ap await plugin.generateR1cs(appState.filePath, { version: appState.version, prime: appState.primeValue }) const fileName = extractNameFromKey(appState.filePath) - const readPath = extractParentFromKey(appState.filePath) + `/bin/${fileName.replace('.circom', '.r1cs')}` + const readPath = extractParentFromKey(appState.filePath) + `/.bin/${fileName.replace('.circom', '.r1cs')}` // @ts-ignore const r1csBuffer = await plugin.call('fileManager', 'readFile', readPath, { encoding: null }) // @ts-ignore @@ -112,12 +112,12 @@ export const generateProof = async (plugin: CircomPluginClient, appState: AppSta dispatch({ type: 'SET_PROOF_FEEDBACK', payload: null }) plugin.emit('statusChanged', { key: 'none' }) const fileName = extractNameFromKey(appState.filePath) - const r1csPath = extractParentFromKey(appState.filePath) + `/bin/${fileName.replace('.circom', '.r1cs')}` + const r1csPath = extractParentFromKey(appState.filePath) + `/.bin/${fileName.replace('.circom', '.r1cs')}` // @ts-ignore const r1csBuffer = await plugin.call('fileManager', 'readFile', r1csPath, { encoding: null }) // @ts-ignore const r1cs = new Uint8Array(r1csBuffer) - const wtnsPath = isElectron() ? extractParentFromKey(appState.filePath) + "/bin/" + fileName.replace('.circom', '_js') + "/" + fileName.replace('.circom', '.wtn') : r1csPath.replace('.r1cs', '.wtn') + const wtnsPath = isElectron() ? extractParentFromKey(appState.filePath) + "/.bin/" + fileName.replace('.circom', '_js') + "/" + fileName.replace('.circom', '.wtn') : r1csPath.replace('.r1cs', '.wtn') // @ts-ignore const wtnsBuffer = await plugin.call('fileManager', 'readFile', wtnsPath, { encoding: null }) // @ts-ignore diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index 98b05a6d1d..3bf8919530 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -158,7 +158,7 @@ export class CircomPluginClient extends PluginClient { const { stdout, stderr } = await this.call('circom', 'run', path, versionToInstall, { prime: prime, wasm: "", inputs: "" }) const fileName = extractNameFromKey(path) - this.lastCompiledCircuitPath = pathModule.normalize(extractParentFromKey(path) + "/bin/" + fileName.replace('.circom', '_js') + "/" + fileName.replace('circom', 'wasm')) + this.lastCompiledCircuitPath = pathModule.normalize(extractParentFromKey(path) + "/.bin/" + fileName.replace('.circom', '_js') + "/" + fileName.replace('circom', 'wasm')) if (stderr) this.call('terminal', 'log', { type: 'error', value: stderr }) if (stdout) this.call('terminal', 'log', { type: 'log', value: stdout }) } catch (error) { @@ -212,7 +212,7 @@ export class CircomPluginClient extends PluginClient { this.lastCompiledFile = path const fileName = extractNameFromKey(path) - this.lastCompiledCircuitPath = extractParentFromKey(path) + "/bin/" + fileName.replace('circom', 'wasm') + this.lastCompiledCircuitPath = extractParentFromKey(path) + "/.bin/" + fileName.replace('circom', 'wasm') // @ts-ignore await this.call('fileManager', 'writeFile', this.lastCompiledCircuitPath, circuitProgram, { encoding: null }) const fileContent = this.lastParsedFiles[path] @@ -279,7 +279,7 @@ export class CircomPluginClient extends PluginClient { throw new Error(r1csErrors) } else { const fileName = extractNameFromKey(path) - const writePath = extractParentFromKey(path) + "/bin/" + fileName.replace('circom', 'r1cs') + const writePath = extractParentFromKey(path) + "/.bin/" + fileName.replace('circom', 'r1cs') // @ts-ignore await this.call('fileManager', 'writeFile', writePath, r1csProgram, true) diff --git a/apps/remix-ide-e2e/src/tests/circom.test.ts b/apps/remix-ide-e2e/src/tests/circom.test.ts index 5829d9c545..6228cda5ca 100644 --- a/apps/remix-ide-e2e/src/tests/circom.test.ts +++ b/apps/remix-ide-e2e/src/tests/circom.test.ts @@ -38,8 +38,8 @@ module.exports = { .waitForElementPresent('[data-id="verticalIconsKindcircuit-compiler"]') .waitForElementVisible('[data-id="verticalIconsKindcircuit-compiler"]') .click('[data-id="play-editor"]') - .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') + .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') }, 'Should compute a witness for a simple circuit #group1': function (browser: NightwatchBrowser) { browser @@ -55,8 +55,8 @@ module.exports = { .click('[data-id="compute_witness_btn"]') .frameParent() .clickLaunchIcon('filePanel') - .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wtn"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wtn"]') + .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wtn"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wtn"]') }, 'Should compile a simple circuit using compile button in circom plugin #group2': function (browser: NightwatchBrowser) { browser @@ -70,8 +70,8 @@ module.exports = { .click('button[data-id="compile_circuit_btn"]') .frameParent() .clickLaunchIcon('filePanel') - .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') + .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') }, 'Should run Groth16 setup and export for a simple circuit using the GUI #group2': function (browser: NightwatchBrowser) { browser @@ -116,8 +116,8 @@ module.exports = { return actions.keyDown(this.Keys.CONTROL).sendKeys('s') }) - .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') - .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') + .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') + .waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') }, 'Should display warnings for compiled circuit without pragma version #group4': function (browser: NightwatchBrowser) { browser @@ -164,7 +164,7 @@ module.exports = { .waitForElementNotPresent('[data-id="circuit_feedback"]') .frameParent() .clickLaunchIcon('filePanel') - .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/bin/simple.wasm"]') + .waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') }, 'Should create a new workspace using hash checker template #group5 #group6': function (browser: NightwatchBrowser) { browser diff --git a/apps/remixdesktop/src/plugins/circomElectronBasePlugin.ts b/apps/remixdesktop/src/plugins/circomElectronBasePlugin.ts index bc77a5632f..dfa1bd72ed 100644 --- a/apps/remixdesktop/src/plugins/circomElectronBasePlugin.ts +++ b/apps/remixdesktop/src/plugins/circomElectronBasePlugin.ts @@ -49,12 +49,12 @@ class CircomElectronPluginClient extends ElectronBasePluginClient { // @ts-ignore const wd = await this.call('fs', 'getWorkingDir') // @ts-ignore - const outputDirExists = await this.call('fs', 'exists', path.normalize(extractParentFromKey(filePath) + '/bin')) + const outputDirExists = await this.call('fs', 'exists', path.normalize(extractParentFromKey(filePath) + '/.bin')) // @ts-ignore - if (!outputDirExists) await this.call('fs', 'mkdir', path.normalize(extractParentFromKey(filePath) + '/bin')) + if (!outputDirExists) await this.call('fs', 'mkdir', path.normalize(extractParentFromKey(filePath) + '/.bin')) filePath = path.join(wd, filePath) const depPath = path.normalize(path.join(wd, '.deps/https/raw.githubusercontent.com/iden3/')) - const outputDir = path.normalize(extractParentFromKey(filePath) + '/bin') + const outputDir = path.normalize(extractParentFromKey(filePath) + '/.bin') this.call('terminal' as any, 'logHtml', `Compiling ${filePath} with circom compiler (${version})`) return await circomCli.run(`${filePath} -l ${depPath} -o ${outputDir}`, version, options) diff --git a/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_trusted_setup.ts b/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_trusted_setup.ts index 4cfcfd4841..30f2e33dcf 100644 --- a/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_trusted_setup.ts @@ -13,7 +13,7 @@ const logger = { const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmTiT4eiYz5KF7gQrDsgfCSTRv3wBPYJ4bRN1MmTRshpnW"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/calculate_hash.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/calculate_hash.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_0 = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_zkproof.ts b/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_zkproof.ts index 9551e63c7f..1072ea7873 100644 --- a/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/hashchecker/scripts/groth16/groth16_zkproof.ts @@ -12,13 +12,13 @@ const logger = { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/calculate_hash.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/calculate_hash.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/calculate_hash.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/calculate_hash.wasm', { encoding: null }); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/calculate_hash.wasm', { encoding: null }); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); diff --git a/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_trusted_setup.ts b/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_trusted_setup.ts index 03763c7662..e6e919ad49 100644 --- a/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_trusted_setup.ts @@ -8,7 +8,7 @@ const snarkjs = require('snarkjs'); const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmTiT4eiYz5KF7gQrDsgfCSTRv3wBPYJ4bRN1MmTRshpnW"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/calculate_hash.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/calculate_hash.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_final = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_zkproof.ts b/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_zkproof.ts index 488378c431..3d6d7feadc 100644 --- a/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/hashchecker/scripts/plonk/plonk_zkproof.ts @@ -15,7 +15,7 @@ const logger = { // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/calculate_hash.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/calculate_hash.wasm', { encoding: null }); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/calculate_hash.wasm', { encoding: null }); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); const zkey_final = { diff --git a/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_trusted_setup.ts b/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_trusted_setup.ts index 48aaeccda9..e972816fe4 100644 --- a/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_trusted_setup.ts @@ -13,7 +13,7 @@ const logger = { const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmTiT4eiYz5KF7gQrDsgfCSTRv3wBPYJ4bRN1MmTRshpnW"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_0 = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_zkproof.ts b/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_zkproof.ts index 8d781bc621..860c9dca61 100644 --- a/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/rln/scripts/groth16/groth16_zkproof.ts @@ -73,13 +73,13 @@ async function prove (signals, wasm, wtns, r1cs, zkey_final, vKey) { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/rln.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.wasm', { encoding: null }); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.wasm', { encoding: null }); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); diff --git a/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_trusted_setup.ts b/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_trusted_setup.ts index 185b4b3d36..062bc5ef6c 100644 --- a/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_trusted_setup.ts @@ -8,7 +8,7 @@ const snarkjs = require('snarkjs'); const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmciCq5JcZQyTLvC9GRanrLBi82ZmSriq1Fr5zANkGHebf"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_final = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_zkproof.ts b/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_zkproof.ts index 0036349e1f..2f95cb5b82 100644 --- a/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/rln/scripts/plonk/plonk_zkproof.ts @@ -96,13 +96,13 @@ async function prove (signals, wasm, wtns, r1cs, zkey_final, vKey) { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/rln.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/rln.wasm', { encoding: null }); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/rln.wasm', { encoding: null }); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_trusted_setup.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_trusted_setup.ts index e06347954a..4603b20dec 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_trusted_setup.ts @@ -13,7 +13,7 @@ const logger = { const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmTiT4eiYz5KF7gQrDsgfCSTRv3wBPYJ4bRN1MmTRshpnW"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_0 = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_zkproof.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_zkproof.ts index a423f54414..f395efe5f9 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/groth16/groth16_zkproof.ts @@ -25,13 +25,13 @@ function hash(message: any): bigint { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', true); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', true); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/semaphore.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.wasm', true); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.wasm', true); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_trusted_setup.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_trusted_setup.ts index 0e443686e6..315ace426f 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_trusted_setup.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_trusted_setup.ts @@ -13,7 +13,7 @@ const logger = { const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmciCq5JcZQyTLvC9GRanrLBi82ZmSriq1Fr5zANkGHebf"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', { encoding: null }); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', { encoding: null }); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_final = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_zkproof.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_zkproof.ts index 9e5f8a1ded..77b996a402 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_zkproof.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/plonk/plonk_zkproof.ts @@ -25,13 +25,13 @@ function hash(message: any): bigint { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', true); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', true); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore await remix.call('circuit-compiler', 'compile', 'circuits/semaphore.circom'); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.wasm', true); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.wasm', true); // @ts-ignore const wasm = new Uint8Array(wasmBuffer); diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/run_setup.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/run_setup.ts index 31a79e7de7..26764841d7 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/run_setup.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/run_setup.ts @@ -26,7 +26,7 @@ function hash(message: any): bigint { const ptau_final = "https://ipfs-cluster.ethdevops.io/ipfs/QmTiT4eiYz5KF7gQrDsgfCSTRv3wBPYJ4bRN1MmTRshpnW"; // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', true); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', true); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); const zkey_0 = { type: "mem" }; diff --git a/libs/remix-ws-templates/src/templates/semaphore/scripts/run_verification.ts b/libs/remix-ws-templates/src/templates/semaphore/scripts/run_verification.ts index e5225ee3ac..24da889470 100644 --- a/libs/remix-ws-templates/src/templates/semaphore/scripts/run_verification.ts +++ b/libs/remix-ws-templates/src/templates/semaphore/scripts/run_verification.ts @@ -25,11 +25,11 @@ function hash(message: any): bigint { (async () => { try { // @ts-ignore - const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.r1cs', true); + const r1csBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.r1cs', true); // @ts-ignore const r1cs = new Uint8Array(r1csBuffer); // @ts-ignore - const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/bin/semaphore.wasm', true); + const wasmBuffer = await remix.call('fileManager', 'readFile', 'circuits/.bin/semaphore.wasm', true); // @ts-ignore const wasm = new Uint8Array(wasmBuffer);