From c28bb649103f2b09b02d8e47ef15530fa2d61af5 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 16 Jan 2024 15:49:06 +0100 Subject: [PATCH 1/7] Add circom logs --- .../src/app/services/circomPluginClient.ts | 24 +++++++++++++++++++ package.json | 2 +- yarn.lock | 5 ++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index 3309fdd7ca..e54f12e507 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -123,11 +123,15 @@ export class CircomPluginClient extends PluginClient { async compile(path: string, compilationConfig?: CompilationConfig): Promise { this.internalEvents.emit('circuit_compiling_start') + // @ts-ignore + this.call('terminal', 'log', { type: 'info', value: 'Compiling ' + path }) const [parseErrors, filePathToId] = await this.parse(path) if (parseErrors && (parseErrors.length > 0)) { if (parseErrors[0].type === 'Error') { this.internalEvents.emit('circuit_parsing_errored', parseErrors, filePathToId) + // @ts-ignore + this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) return } else if (parseErrors[0].type === 'Warning') { this.internalEvents.emit('circuit_parsing_warning', parseErrors, filePathToId) @@ -147,6 +151,8 @@ export class CircomPluginClient extends PluginClient { if (circuitProgram.length < 1) { const circuitErrors = circuitApi.report() + // @ts-ignore + this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) throw new Error(circuitErrors) } else { this.lastCompiledFile = path @@ -166,16 +172,26 @@ export class CircomPluginClient extends PluginClient { } else { this.internalEvents.emit('circuit_compiling_done', []) } + // @ts-ignore + circuitApi.log().map(log => { + log && this.call('terminal', 'log', { type: 'log', value: log }) + }) + // @ts-ignore + this.call('terminal', 'log', { type: 'typewritersuccess', value: 'Everything went okay, circom safe' }) } } async generateR1cs (path: string, compilationConfig?: CompilationConfig): Promise { this.internalEvents.emit('circuit_generating_r1cs_start') + // @ts-ignore + this.call('terminal', 'log', { type: 'info', value: 'Generating R1CS for ' + path }) const [parseErrors, filePathToId] = await this.parse(path) if (parseErrors && (parseErrors.length > 0)) { if (parseErrors[0].type === 'Error') { this.internalEvents.emit('circuit_parsing_errored', parseErrors) + // @ts-ignore + this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) return } else if (parseErrors[0].type === 'Warning') { this.internalEvents.emit('circuit_parsing_warning', parseErrors) @@ -195,6 +211,8 @@ export class CircomPluginClient extends PluginClient { if (r1csProgram.length < 1) { const r1csErrors = r1csApi.report() + // @ts-ignore + this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) throw new Error(r1csErrors) } else { this.internalEvents.emit('circuit_generating_r1cs_done') @@ -203,6 +221,12 @@ export class CircomPluginClient extends PluginClient { // @ts-ignore await this.call('fileManager', 'writeFile', writePath, r1csProgram, true) + // @ts-ignore + r1csApi.log().map(log => { + log && this.call('terminal', 'log', { type: 'log', value: log }) + }) + // @ts-ignore + this.call('terminal', 'log', { type: 'typewritersuccess', value: 'Everything went okay, circom safe' }) } } diff --git a/package.json b/package.json index 5ae31e0e7f..ea8cd762c1 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "brace": "^0.8.0", "change-case": "^4.1.1", "chokidar": "^2.1.8", - "circom_wasm": "^0.2.0", + "circom_wasm": "https://github.com/ioedeveloper/circom_wasm.git", "color-support": "^1.1.3", "commander": "^9.4.1", "core-js": "^3.6.5", diff --git a/yarn.lock b/yarn.lock index 8ead0f4bb3..9e2f4c801c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10537,10 +10537,9 @@ circom_runtime@0.1.22: dependencies: ffjavascript "0.2.57" -circom_wasm@^0.2.0: +"circom_wasm@https://github.com/ioedeveloper/circom_wasm.git": version "0.2.0" - resolved "https://registry.yarnpkg.com/circom_wasm/-/circom_wasm-0.2.0.tgz#c35537f0b1f5bfd3d88898306f46c3a3457e5589" - integrity sha512-eqDCbAXJQkKnrAg0Ow3bdaGciGTooRKL20941JGzX8IcqgHoGiZxaSLATkYy97dbmJFrxe8Wr+mOGnvdbqN9bw== + resolved "https://github.com/ioedeveloper/circom_wasm.git#68473f2c1166d96e73513b0a2aac1afcd30b0111" circular-json@^0.3.0: version "0.3.3" From 331c8591b1539b755065868116d317a7abf92f4a Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 22 Jan 2024 16:34:19 +0100 Subject: [PATCH 2/7] AskGPT --- .../src/app/components/container.tsx | 25 ++++++++++++++++++- .../src/app/components/feedback.tsx | 16 +++++++++--- .../src/app/components/feedbackAlert.tsx | 3 ++- .../src/app/services/circomPluginClient.ts | 6 ++--- apps/circuit-compiler/src/app/types/index.ts | 8 +++--- yarn.lock | 2 +- 6 files changed, 47 insertions(+), 13 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index fa7467f69c..5045ff7f9b 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -58,6 +58,29 @@ export function Container () { circuitApp.dispatch({ type: 'SET_HIDE_WARNINGS', payload: value }) } + const askGPT = async (error: string, location?: string) => { + if (location) { + const fullPathLocation = await circuitApp.plugin.resolveReportPath(location) + const content = await circuitApp.plugin.call('fileManager', 'readFile', fullPathLocation) + const message = ` + solidity code: ${content} + error message: ${error} + explain why the error occurred and how to fix it. + ` + // @ts-ignore + await circuitApp.plugin.call('openaigpt', 'message', message) + } else if(error) { + const message = ` + error message: ${error} + explain why the error occurred and how to fix it. + ` + // @ts-ignore + await circuitApp.plugin.call('openaigpt', 'message', message) + } else { + console.error('unable to askGtp, no message provided') + } + } + return (
@@ -86,7 +109,7 @@ export function Container () { - + diff --git a/apps/circuit-compiler/src/app/components/feedback.tsx b/apps/circuit-compiler/src/app/components/feedback.tsx index 164c39e1ac..da4e43af64 100644 --- a/apps/circuit-compiler/src/app/components/feedback.tsx +++ b/apps/circuit-compiler/src/app/components/feedback.tsx @@ -4,7 +4,7 @@ import { RenderIf } from '@remix-ui/helper' import {CopyToClipboard} from '@remix-ui/clipboard' import { FeedbackAlert } from './feedbackAlert' -export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openErrorLocation }: CompilerFeedbackProps) { +export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openErrorLocation, askGPT }: CompilerFeedbackProps) { const [ showException, setShowException ] = useState(true) const handleCloseException = () => { @@ -17,6 +17,10 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr } } + const handleAskGPT = (message: string, location?: string) => { + askGPT(message, location) + } + return (
@@ -40,12 +44,18 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr
handleOpenError(response)}>
- + handleAskGPT(filePathToId[response.labels[0].file_id], filePathToId[response.labels[0].message]) } />
- + { handleAskGPT(response.message) }} />
diff --git a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx index 5c9e092ab4..48e57fab31 100644 --- a/apps/circuit-compiler/src/app/components/feedbackAlert.tsx +++ b/apps/circuit-compiler/src/app/components/feedbackAlert.tsx @@ -3,7 +3,7 @@ import { FeedbackAlertProps } from '../types' import { RenderIf } from '@remix-ui/helper' import {CopyToClipboard} from '@remix-ui/clipboard' -export function FeedbackAlert ({ message, location }: FeedbackAlertProps) { +export function FeedbackAlert ({ message, location, askGPT }: FeedbackAlertProps) { const [ showAlert, setShowAlert] = useState(true) const handleCloseAlert = () => { @@ -24,6 +24,7 @@ export function FeedbackAlert ({ message, location }: FeedbackAlertProps) { + ASK GPT
diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index e54f12e507..312e489efd 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -124,7 +124,7 @@ export class CircomPluginClient extends PluginClient { async compile(path: string, compilationConfig?: CompilationConfig): Promise { this.internalEvents.emit('circuit_compiling_start') // @ts-ignore - this.call('terminal', 'log', { type: 'info', value: 'Compiling ' + path }) + this.call('terminal', 'log', { type: 'log', value: 'Compiling ' + path }) const [parseErrors, filePathToId] = await this.parse(path) if (parseErrors && (parseErrors.length > 0)) { @@ -172,7 +172,6 @@ export class CircomPluginClient extends PluginClient { } else { this.internalEvents.emit('circuit_compiling_done', []) } - // @ts-ignore circuitApi.log().map(log => { log && this.call('terminal', 'log', { type: 'log', value: log }) }) @@ -184,7 +183,7 @@ export class CircomPluginClient extends PluginClient { async generateR1cs (path: string, compilationConfig?: CompilationConfig): Promise { this.internalEvents.emit('circuit_generating_r1cs_start') // @ts-ignore - this.call('terminal', 'log', { type: 'info', value: 'Generating R1CS for ' + path }) + this.call('terminal', 'log', { type: 'log', value: 'Generating R1CS for ' + path }) const [parseErrors, filePathToId] = await this.parse(path) if (parseErrors && (parseErrors.length > 0)) { @@ -221,7 +220,6 @@ export class CircomPluginClient extends PluginClient { // @ts-ignore await this.call('fileManager', 'writeFile', writePath, r1csProgram, true) - // @ts-ignore r1csApi.log().map(log => { log && this.call('terminal', 'log', { type: 'log', value: log }) }) diff --git a/apps/circuit-compiler/src/app/types/index.ts b/apps/circuit-compiler/src/app/types/index.ts index 3b6f7a57b4..16548188b1 100644 --- a/apps/circuit-compiler/src/app/types/index.ts +++ b/apps/circuit-compiler/src/app/types/index.ts @@ -1,6 +1,6 @@ import { compiler_list } from 'circom_wasm' import {Dispatch} from 'react' -import { CircomPluginClient } from '../services/circomPluginClient' +import type { CircomPluginClient } from '../services/circomPluginClient' export type CompilerStatus = "compiling" | "generating" | "computing" | "idle" | "errored" | "warning" export interface ICircuitAppContext { @@ -51,7 +51,8 @@ export type CompilerFeedbackProps = { feedback: string | CompilerReport[], filePathToId: Record, openErrorLocation: (location: string, startRange: string) => void, - hideWarnings: boolean + hideWarnings: boolean, + askGPT: (message: string, location?: string) => void } export type CompilerReport = { @@ -71,7 +72,8 @@ export type CompilerReport = { export type FeedbackAlertProps = { message: string, - location: string + location: string, + askGPT: () => void } export type ConfigurationsProps = { diff --git a/yarn.lock b/yarn.lock index 9e2f4c801c..3d4421f1bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10539,7 +10539,7 @@ circom_runtime@0.1.22: "circom_wasm@https://github.com/ioedeveloper/circom_wasm.git": version "0.2.0" - resolved "https://github.com/ioedeveloper/circom_wasm.git#68473f2c1166d96e73513b0a2aac1afcd30b0111" + resolved "https://github.com/ioedeveloper/circom_wasm.git#e558f8a449ac12151e735c6923c65f33b9b953ff" circular-json@^0.3.0: version "0.3.3" From 6435e25a9caca070a0863701cb63fb1b1a7b7a2c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 23 Jan 2024 10:27:11 +0100 Subject: [PATCH 3/7] Log errors and warnings to the terminal --- .../src/app/services/circomPluginClient.ts | 20 +++++++++++-------- package.json | 2 +- yarn.lock | 7 ++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index 312e489efd..0c22068125 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -130,11 +130,11 @@ export class CircomPluginClient extends PluginClient { if (parseErrors && (parseErrors.length > 0)) { if (parseErrors[0].type === 'Error') { this.internalEvents.emit('circuit_parsing_errored', parseErrors, filePathToId) - // @ts-ignore - this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) + this.logCompilerReport(parseErrors) return } else if (parseErrors[0].type === 'Warning') { this.internalEvents.emit('circuit_parsing_warning', parseErrors, filePathToId) + this.logCompilerReport(parseErrors) } } else { this.internalEvents.emit('circuit_parsing_done', parseErrors, filePathToId) @@ -151,8 +151,7 @@ export class CircomPluginClient extends PluginClient { if (circuitProgram.length < 1) { const circuitErrors = circuitApi.report() - // @ts-ignore - this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) + this.logCompilerReport(circuitErrors) throw new Error(circuitErrors) } else { this.lastCompiledFile = path @@ -189,11 +188,11 @@ export class CircomPluginClient extends PluginClient { if (parseErrors && (parseErrors.length > 0)) { if (parseErrors[0].type === 'Error') { this.internalEvents.emit('circuit_parsing_errored', parseErrors) - // @ts-ignore - this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) + this.logCompilerReport(parseErrors) return } else if (parseErrors[0].type === 'Warning') { this.internalEvents.emit('circuit_parsing_warning', parseErrors) + this.logCompilerReport(parseErrors) } } else { this.internalEvents.emit('circuit_parsing_done', parseErrors, filePathToId) @@ -210,8 +209,7 @@ export class CircomPluginClient extends PluginClient { if (r1csProgram.length < 1) { const r1csErrors = r1csApi.report() - // @ts-ignore - this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) + this.logCompilerReport(r1csErrors) throw new Error(r1csErrors) } else { this.internalEvents.emit('circuit_generating_r1cs_done') @@ -395,4 +393,10 @@ export class CircomPluginClient extends PluginClient { } } } + + async logCompilerReport (report: CompilerReport[]): Promise { + this.call('terminal', 'log', { type: 'log', value: JSON.stringify(report, null, 2) }) + if (report[0].type === 'Error') this.call('terminal', 'log', { type: 'error', value: 'previous errors were found' }) + if (report[0].type === 'Warning') this.call('terminal', 'log', { type: 'log', value: 'previous warnings were found' }) + } } diff --git a/package.json b/package.json index ea8cd762c1..887f70c51a 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "brace": "^0.8.0", "change-case": "^4.1.1", "chokidar": "^2.1.8", - "circom_wasm": "https://github.com/ioedeveloper/circom_wasm.git", + "circom_wasm": "^0.2.1", "color-support": "^1.1.3", "commander": "^9.4.1", "core-js": "^3.6.5", diff --git a/yarn.lock b/yarn.lock index 3d4421f1bd..80e97b8efc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10537,9 +10537,10 @@ circom_runtime@0.1.22: dependencies: ffjavascript "0.2.57" -"circom_wasm@https://github.com/ioedeveloper/circom_wasm.git": - version "0.2.0" - resolved "https://github.com/ioedeveloper/circom_wasm.git#e558f8a449ac12151e735c6923c65f33b9b953ff" +circom_wasm@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/circom_wasm/-/circom_wasm-0.2.1.tgz#11eeceb497c03461676b3bc21d7d71ac3310dd58" + integrity sha512-57Xhg3nUcQX+aMr+sH8XyxklpPgAWohjGkaEbiJDv3UiUveFAB2pOFOOE4whoMm7mjxKbO4n4mVs1oC031ApQQ== circular-json@^0.3.0: version "0.3.3" From 854f19b0fa3789677567746cc396c04413f6af20 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 23 Jan 2024 14:22:19 +0100 Subject: [PATCH 4/7] Add full report context for askGPT --- .../src/app/components/container.tsx | 51 ++++++++++++------- .../src/app/components/feedback.tsx | 8 +-- apps/circuit-compiler/src/app/types/index.ts | 2 +- 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index 5045ff7f9b..a93b56b340 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -10,7 +10,7 @@ import { CircuitActions } from './actions' import { WitnessToggler } from './witnessToggler' import { WitnessSection } from './witness' import { CompilerFeedback } from './feedback' -import { PrimeValue } from '../types' +import { CompilerReport, PrimeValue } from '../types' export function Container () { const circuitApp = useContext(CircuitAppContext) @@ -58,26 +58,41 @@ export function Container () { circuitApp.dispatch({ type: 'SET_HIDE_WARNINGS', payload: value }) } - const askGPT = async (error: string, location?: string) => { - if (location) { - const fullPathLocation = await circuitApp.plugin.resolveReportPath(location) - const content = await circuitApp.plugin.call('fileManager', 'readFile', fullPathLocation) - const message = ` - solidity code: ${content} - error message: ${error} - explain why the error occurred and how to fix it. - ` - // @ts-ignore - await circuitApp.plugin.call('openaigpt', 'message', message) - } else if(error) { + const askGPT = async (report: CompilerReport) => { + circuitApp.appState.filePathToId[report.labels[0].file_id], circuitApp.appState.filePathToId[report.labels[0].message] + if (report.labels.length > 0) { + const location = circuitApp.appState.filePathToId[report.labels[0].file_id] + const error = report.labels[0].message + + if (location) { + const fullPathLocation = await circuitApp.plugin.resolveReportPath(location) + const content = await circuitApp.plugin.call('fileManager', 'readFile', fullPathLocation) + const message = ` + solidity code: ${content} + error message: ${error} + context: ${JSON.stringify(report, null, 2)} + explain why the error occurred and how to fix it. + ` + // @ts-ignore + await circuitApp.plugin.call('openaigpt', 'message', message) + } else { + const message = ` + error message: ${error} + context: ${JSON.stringify(report, null, 2)} + explain why the error occurred and how to fix it. + ` + // @ts-ignore + await circuitApp.plugin.call('openaigpt', 'message', message) + } + } else { + const error = report.message const message = ` - error message: ${error} - explain why the error occurred and how to fix it. - ` + error message: ${error} + context: ${JSON.stringify(report, null, 2)} + explain why the error occurred and how to fix it. + ` // @ts-ignore await circuitApp.plugin.call('openaigpt', 'message', message) - } else { - console.error('unable to askGtp, no message provided') } } diff --git a/apps/circuit-compiler/src/app/components/feedback.tsx b/apps/circuit-compiler/src/app/components/feedback.tsx index da4e43af64..5b61794281 100644 --- a/apps/circuit-compiler/src/app/components/feedback.tsx +++ b/apps/circuit-compiler/src/app/components/feedback.tsx @@ -17,8 +17,8 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr } } - const handleAskGPT = (message: string, location?: string) => { - askGPT(message, location) + const handleAskGPT = (report: CompilerReport) => { + askGPT(report) } return ( @@ -47,7 +47,7 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr handleAskGPT(filePathToId[response.labels[0].file_id], filePathToId[response.labels[0].message]) } /> + askGPT={ () => handleAskGPT(response) } />
@@ -55,7 +55,7 @@ export function CompilerFeedback ({ feedback, filePathToId, hideWarnings, openEr { handleAskGPT(response.message) }} /> + askGPT={() => { handleAskGPT(response) }} /> diff --git a/apps/circuit-compiler/src/app/types/index.ts b/apps/circuit-compiler/src/app/types/index.ts index 16548188b1..add4806427 100644 --- a/apps/circuit-compiler/src/app/types/index.ts +++ b/apps/circuit-compiler/src/app/types/index.ts @@ -52,7 +52,7 @@ export type CompilerFeedbackProps = { filePathToId: Record, openErrorLocation: (location: string, startRange: string) => void, hideWarnings: boolean, - askGPT: (message: string, location?: string) => void + askGPT: (report: CompilerReport) => void } export type CompilerReport = { From 2a1e3bd51a6f6c22a4791bf38922232396ce6169 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 23 Jan 2024 14:29:09 +0100 Subject: [PATCH 5/7] Remove unused line --- apps/circuit-compiler/src/app/components/container.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index a93b56b340..84860b8189 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -59,7 +59,6 @@ export function Container () { } const askGPT = async (report: CompilerReport) => { - circuitApp.appState.filePathToId[report.labels[0].file_id], circuitApp.appState.filePathToId[report.labels[0].message] if (report.labels.length > 0) { const location = circuitApp.appState.filePathToId[report.labels[0].file_id] const error = report.labels[0].message From 983497fe021ca4d16704dc08c6ebcdf917044a4f Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 23 Jan 2024 14:33:46 +0100 Subject: [PATCH 6/7] Change context paramenter to improve GPT --- apps/circuit-compiler/src/app/components/container.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index 84860b8189..fd96cd56b5 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -69,7 +69,7 @@ export function Container () { const message = ` solidity code: ${content} error message: ${error} - context: ${JSON.stringify(report, null, 2)} + full circom error: ${JSON.stringify(report, null, 2)} explain why the error occurred and how to fix it. ` // @ts-ignore @@ -77,7 +77,7 @@ export function Container () { } else { const message = ` error message: ${error} - context: ${JSON.stringify(report, null, 2)} + full circom error: ${JSON.stringify(report, null, 2)} explain why the error occurred and how to fix it. ` // @ts-ignore @@ -87,7 +87,7 @@ export function Container () { const error = report.message const message = ` error message: ${error} - context: ${JSON.stringify(report, null, 2)} + full circom error: ${JSON.stringify(report, null, 2)} explain why the error occurred and how to fix it. ` // @ts-ignore From 459f6f5674a0332a43f964b03a8b5b8c78b48117 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 24 Jan 2024 11:48:10 +0100 Subject: [PATCH 7/7] Fix typo --- apps/circuit-compiler/src/app/components/container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/circuit-compiler/src/app/components/container.tsx b/apps/circuit-compiler/src/app/components/container.tsx index fd96cd56b5..51cc280594 100644 --- a/apps/circuit-compiler/src/app/components/container.tsx +++ b/apps/circuit-compiler/src/app/components/container.tsx @@ -67,7 +67,7 @@ export function Container () { const fullPathLocation = await circuitApp.plugin.resolveReportPath(location) const content = await circuitApp.plugin.call('fileManager', 'readFile', fullPathLocation) const message = ` - solidity code: ${content} + circom code: ${content} error message: ${error} full circom error: ${JSON.stringify(report, null, 2)} explain why the error occurred and how to fix it.