Skip to content

Commit

Permalink
fix: only allow contracts to be compiled with noir-compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Nov 7, 2023
1 parent cde49d1 commit 535dbe1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 535dbe1

Please sign in to comment.