Open drknzz opened 7 months ago
The same happens when you call a contract that is not deployed
. It's not being able to handle the result, it panics immediately.
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)
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: https://github.com/foundry-rs/starknet-foundry/blob/b02aa0c7ef1aadc48a2d51467fdf55045387c695/crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/rpc.rs#L138
However when calling from another contract, this is the entered arm: https://github.com/foundry-rs/starknet-foundry/blob/b02aa0c7ef1aadc48a2d51467fdf55045387c695/crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/rpc.rs#L131 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: