Skip to content

Commit

Permalink
remove rpc call on declare
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoGiachetta committed Dec 2, 2024
1 parent a4486d6 commit 50e6957
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
26 changes: 4 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ serde_with = "3.11.0"
serde = "1.0.197"
cairo-native = "=0.2.4"
# Sequencer Dependencies
starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main
blockifier = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2", features = ["cairo_native"] } # main
starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main
blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main

starknet_api = { path = "../sequencer/crates/starknet_api" } # main
blockifier = { path = "../sequencer/crates/blockifier", features = ["cairo_native"] } # main
starknet_gateway = { path = "../sequencer/crates/starknet_gateway" } # main
blockifier_reexecution = { path = "../sequencer/crates/blockifier_reexecution" } # main

# starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main
# blockifier = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2", features = ["cairo_native"] } # main
# starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main
# blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", branch = "update-main-2" } # main

[patch.'https://github.com/lambdaclass/cairo_native']
cairo-native = "=0.2.4"
3 changes: 1 addition & 2 deletions rpc-state-reader/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ pub fn execute_tx_with_blockifier(
let block_number = context.block_info().block_number;
let network = parse_to_rpc_chain(&context.chain_info().chain_id.to_string());
// we need to retrieve the next block in order to get the contract_class
let next_reader = RpcStateReader::new(network, block_number.next().unwrap());
let contract_class = next_reader
let contract_class = state
.get_contract_class(&declare_tx.class_hash())
.unwrap();
let class_info = calculate_class_info_for_testing(contract_class);
Expand Down

0 comments on commit 50e6957

Please sign in to comment.