Commit 319a6be
make StarknetSyscallHandler::cheatcode default return error felt
Default impl previously panicked with unimplemented!(). On the sierra-emu
path, a contract that invokes the `cheatcode` libfunc against a handler
that didn't override the method would unwind through the VM and abort
the host. Production handlers (e.g. the blockifier's NativeSyscallHandler)
don't implement cheatcode at all, so the default impl is what runs.
Soft-fail with a single error felt instead, so misuse manifests as a
normal syscall error rather than an unhandled panic. Test handlers that
implement cheatcode override the default and are unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4960d6a commit 319a6be
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
368 | 372 | | |
369 | | - | |
| 373 | + | |
370 | 374 | | |
371 | 375 | | |
0 commit comments