diff --git a/yarn-project/noir-compiler/src/compile/noir/noir-wasm-compiler.ts b/yarn-project/noir-compiler/src/compile/noir/noir-wasm-compiler.ts index 00716b4b001..67f80824ed4 100644 --- a/yarn-project/noir-compiler/src/compile/noir/noir-wasm-compiler.ts +++ b/yarn-project/noir-compiler/src/compile/noir/noir-wasm-compiler.ts @@ -88,6 +88,11 @@ export class NoirWasmContractCompiler { try { const isContract: boolean = this.#package.getType() === 'contract'; + // limit to contracts-only because the rest of the pipeline only supports processing contracts + if (!isContract) { + throw new Error('Noir package is not a contract'); + } + const result = compile(this.#package.getEntryPointPath(), isContract, { /* eslint-disable camelcase */ root_dependencies: this.#dependencyManager.getEntrypointDependencies(),