Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions yarn-project/noir-compiler/src/contract-interface-gen/abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export function generateContractArtifact(
{ contract, debug }: NoirContractCompilationArtifacts,
aztecNrVersion?: string,
): ContractArtifact {
const constructorArtifact = contract.functions.find(({ name }) => name === 'constructor');
if (constructorArtifact === undefined) {
throw new Error('Contract must have a constructor function');
}
if (contract.functions.length > 2 ** FUNCTION_TREE_HEIGHT) {
throw new Error(`Contract can only have a maximum of ${2 ** FUNCTION_TREE_HEIGHT} functions`);
}
Expand Down