Skip to content

Commit

Permalink
refactor: throw if given function identifier is not found in cairo ze…
Browse files Browse the repository at this point in the history
…ro artifacts
  • Loading branch information
zmalatrax committed Jul 15, 2024
1 parent 02405a8 commit afe1903
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runners/cairoRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export class CairoRunner {
fnName: string = 'main'
): CairoRunner {
const id = program.identifiers.get('__main__.'.concat(fnName));
const offset = id !== undefined ? id.pc ?? 0 : 0;
if (!id) throw new UndefinedEntrypoint(fnName);
const offset = id.pc;

const builtins = program.builtins;

Expand Down

0 comments on commit afe1903

Please sign in to comment.