Skip to content

Commit

Permalink
refactor: move starknet logic to a different crate
Browse files Browse the repository at this point in the history
  • Loading branch information
AvivYossef-starkware committed Jul 22, 2024
1 parent 1139229 commit ca1fd58
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 10 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
resolver = "2"

members = ["crates/committer", "crates/committer_cli"]
members = ["crates/committer", "crates/committer_cli", "crates/starknet-committer"]

[workspace.package]
version = "0.1.0-rc.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/committer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod block_committer;

pub mod felt;
pub mod forest_errors;
pub mod hash;
Expand Down
8 changes: 0 additions & 8 deletions crates/committer/src/patricia_merkle_tree/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ impl NodeIndex {
.expect("Illegal PathToBottom")
}

pub(crate) fn from_starknet_storage_key(key: &StarknetStorageKey) -> Self {
Self::from_leaf_felt(&key.0)
}

pub(crate) fn from_contract_address(address: &ContractAddress) -> Self {
Self::from_leaf_felt(&address.0)
}

pub(crate) fn from_class_hash(class_hash: &ClassHash) -> Self {
Self::from_leaf_felt(&class_hash.0)
}
Expand Down
13 changes: 13 additions & 0 deletions crates/starknet-committer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "starknet-committer"
version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true
license-file.workspace = true

[dependencies]
committer = { path = "../committer", features = ["testing"] }

[lints]
workspace = true
File renamed without changes.
2 changes: 2 additions & 0 deletions crates/starknet-committer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod block_committer;
pub mod starknet_patricia_merkle_tree;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod leaf;
pub mod types;
Empty file.
Empty file.

0 comments on commit ca1fd58

Please sign in to comment.