Skip to content
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

chore: delete CompileContractClass object #335

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ lazy_static = "1.4.0"
num-bigint = { version = "0.4.5", default-features = false }
# TODO(YaelD, 28/5/2024): The special Papyrus version is needed in order to be aligned with the
# starknet-api version. This should be removed once we have a mono-repo.
papyrus_common = { git = "https://github.com/starkware-libs/papyrus.git", rev = "050e470f" }
papyrus_config = { git = "https://github.com/starkware-libs/papyrus.git", rev = "050e470f" }
papyrus_rpc = { git = "https://github.com/starkware-libs/papyrus.git", rev = "050e470f" }
papyrus_storage = { git = "https://github.com/starkware-libs/papyrus.git", rev = "050e470f" }
papyrus_common = { git = "https://github.com/starkware-libs/papyrus.git", rev = "56c6fdc2" }
papyrus_config = { git = "https://github.com/starkware-libs/papyrus.git", rev = "56c6fdc2" }
papyrus_rpc = { git = "https://github.com/starkware-libs/papyrus.git", rev = "56c6fdc2" }
papyrus_storage = { git = "https://github.com/starkware-libs/papyrus.git", rev = "56c6fdc2" }
pretty_assertions = "1.4.0"
prost = "0.12.6"
reqwest = { version = "0.11", features = ["blocking", "json"] }
Expand All @@ -70,7 +70,7 @@ serde_json = "1.0"
starknet_api = { git = "https://github.com/starkware-libs/starknet-api.git", branch = "main-mempool" }
# TODO(YaelD, 28/5/2024): The special Papyrus version is needed in order to be aligned with the
# starknet-api version. This should be removed once we have a mono-repo.
starknet_client = { git = "https://github.com/starkware-libs/papyrus.git", rev = "050e470f" }
starknet_client = { git = "https://github.com/starkware-libs/papyrus.git", rev = "56c6fdc2" }
strum = "0.24.1"
tempfile = "3.3.0"
thiserror = "1.0"
Expand Down
1 change: 1 addition & 0 deletions crates/gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cairo-lang-starknet-classes.workspace = true
cairo-vm.workspace = true
hyper.workspace = true
papyrus_config.workspace = true
papyrus_rpc.workspace = true
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
Expand Down
12 changes: 2 additions & 10 deletions crates/gateway/src/rpc_state_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ use blockifier::blockifier::block::BlockInfo;
use blockifier::execution::contract_class::{ContractClass, ContractClassV0, ContractClassV1};
use blockifier::state::errors::StateError;
use blockifier::state::state_api::{StateReader as BlockifierStateReader, StateResult};
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass;
use papyrus_rpc::CompiledContractClass;
use reqwest::blocking::Client as BlockingClient;
use serde::{Deserialize, Serialize};
use serde::Serialize;
use serde_json::{json, Value};
use starknet_api::block::BlockNumber;
use starknet_api::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce};
use starknet_api::deprecated_contract_class::ContractClass as StarknetApiDeprecatedContractClass;
use starknet_api::hash::StarkFelt;
use starknet_api::state::StorageKey;

Expand Down Expand Up @@ -157,13 +156,6 @@ impl BlockifierStateReader for RpcStateReader {
}
}

// TODO(yael 19/6/2024): make this object public in papyrus and remove it from here.
#[derive(Debug, Clone, Deserialize, Serialize, Eq, PartialEq)]
pub enum CompiledContractClass {
V0(StarknetApiDeprecatedContractClass),
V1(CasmContractClass),
}

pub struct RpcStateReaderFactory {
pub config: RpcStateReaderConfig,
}
Expand Down
Loading