-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different errors when calling unknown entry point selector error from contract and from test #1812
Comments
The same happens when you call a contract that is |
BTW: I would wonder if that's the behavior that is possible to replicate on contract-contract basis on starknet currently, before we implement it (for both of those cases) |
cptartur
changed the title
Unkown entry point selector error from contract
Different errors when calling unknown entry point selector error from contract and from test
Sep 23, 2024
5 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 4, 2024
<!-- Reference any GitHub issues resolved by this PR --> Closes #1812 The `Err` message chosen to be thrown by `safe-dispatcher` is intended to replicate `cairo-test` behavior. These felts are taken explicitly from [`CairoHintProcessor`](https://github.com/starkware-libs/cairo/blob/2ad7718591a8d2896fec2b435c509ee5a3da9fad/crates/cairo-lang-runner/src/casm_run/mod.rs#L1055-L1057) ## Introduced changes <!-- A brief description of the changes --> - Add proper regex to catch falling error message ## Checklist <!-- Make sure all of these are complete --> - [x] Linked relevant issue - [x] Updated relevant documentation - [x] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which components does the task require to be changed? (think hard pls)
snforge
Description
Calling inexistent entry point:
When calling from test this is the entered arm:
starknet-foundry/crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/rpc.rs
Line 138 in b02aa0c
However when calling from another contract, this is the entered arm:
starknet-foundry/crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/rpc.rs
Line 131 in b02aa0c
It enters
try_extract_panic_data
One solution would be to match the entry point error message via a regex in there.
The use case for calling an inexistent entry point is testing entry points after calling
replace_class
.Example error message:
The text was updated successfully, but these errors were encountered: