-
Notifications
You must be signed in to change notification settings - Fork 177
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
Support for e2e tests in cairo with devnet #389
Comments
starknet_call
RPC method in Foundry
I think it shouldn't, at least in the standard test target. Standard test target and dispatchers should operate on contract execution layer not on the transaction layer. Why? Because of use-cases like account testing (transaction layer assumes existence of an account) and testing contract designed to be called from other contracts. We could consider introducing additional target |
I think it should be at least noted somewhere in the docs that calling in forge never behaves like
We should definitely support that somehow. |
Cairo 1 Protostar did, Protostar 0 didn't |
Moving this to |
This task is mostly about the whole discussion about the call/invoke architecture in tests as well as stateful tests. Not sure what component it should be attached to, perhaps both cheatnet and forge? |
Is it still relevant? @cptartur @MaksymilianDemitraszek |
I think it kind of still is? In case we want to add some tests in the future that are not in the invoke transaction context. |
starknet_call
RPC method in Foundry
Renaming it to be more accurate |
Duplicate of #1033 |
On Starknet, when calling contracts using
starknet_call
RPC method (without an account) info methods likeget_caller_address
etc. return default valeus e.g.0
. There is no transaction and block context.However this is impossible to do in Starknet Foundry. It doesn't matter if the method accepts
@ContractState
orref ContractState
, we are always executing the method in cheated context - all cheatcoded values are present,get_caller_address
returns non 0 value etc.It should be possible to emulate
starknet_call
in Foundry. We should either change the behavior of Dispatchers or introduce a separate method for just calling contracts.The text was updated successfully, but these errors were encountered: