|
|
|
@ -181,7 +181,7 @@ export class CircomPluginClient extends PluginClient { |
|
|
|
|
this.lastCompiledFile = path |
|
|
|
|
const fileName = extractNameFromKey(path) |
|
|
|
|
|
|
|
|
|
this.lastCompiledCircuitPath = extractParentFromKey(path) + "/.bin/" + fileName.replace('.circom', '_js') + '/' + fileName.replace('circom', 'wasm') |
|
|
|
|
this.lastCompiledCircuitPath = extractParentFromKey(path) + "/.bin/" + fileName.replace('.circom', '_js') + '/' + fileName.replace('.circom', '.wasm') |
|
|
|
|
// @ts-ignore
|
|
|
|
|
await this.call('fileManager', 'writeFile', this.lastCompiledCircuitPath, circuitProgram, { encoding: null }) |
|
|
|
|
const fileContent = this.lastParsedFiles[path] |
|
|
|
@ -235,7 +235,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) { |
|
|
|
@ -290,7 +290,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) |
|
|
|
|