You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
We should declare and deploy a simple contract calling the Keccak syscall and running it with our RPCStateReader.
Setup
To do this we can write a simple Cairo 2 contract that calls keccak. Declare it on testnet, deploy it and then invoke it using starkli.
To see how to use starkli to do this take a look at the tutorial: https://book.starkli.rs/tutorials/starkli-101
After doing that we should have an executed transaction on testnet. Take note of its transaction hash and block.
Test the execution of the contract
So now we can replay its execution using the RPC State Reader inside starknet in rust.
To do that take a look at the following example tests from that crate:
The goal of the test from this ticket should be to compare:
Fees (as in the first example)
Return data (retdata). We should basically test that the result is the same. This can be checked comparing the retdata field of the TransactionExecutionInfo obtained with starknet in rust and the value from the TransactionReceipt (the one returned by the execute_tx function).