diff --git a/Cargo.lock b/Cargo.lock index 7e5f4b4fd5..d843b20e63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,7 +406,6 @@ dependencies = [ "itertools 0.10.5", "keccak", "log", - "memoize", "num-bigint", "num-integer", "num-traits 0.2.17", @@ -2043,29 +2042,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoize" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7500eb334b820fcb9d8bfb9061d75fe910ed6302f690b24f3abaa133a581479c" -dependencies = [ - "lazy_static", - "lru", - "memoize-inner", -] - -[[package]] -name = "memoize-inner" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfde264c318ec8c2de5c39e0ba3910fac8d1065e3b947b183ebd884b799719b" -dependencies = [ - "lazy_static", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "metrics" version = "0.21.1" diff --git a/Cargo.toml b/Cargo.toml index 8ae4361039..d9d230610b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,6 @@ indexmap = "2.1.0" itertools = "0.10.3" keccak = "0.1.3" log = "0.4" -memoize = "0.4.1" num-bigint = "0.4" num-integer = "0.1.45" num-traits = "0.2" diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index cb32033316..69da1262dd 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -31,7 +31,6 @@ indexmap.workspace = true itertools.workspace = true keccak.workspace = true log.workspace = true -memoize.workspace = true num-bigint.workspace = true num-integer.workspace = true num-traits.workspace = true diff --git a/crates/blockifier/src/test_utils/prices.rs b/crates/blockifier/src/test_utils/prices.rs index 16821d2b4a..461c9b48d5 100644 --- a/crates/blockifier/src/test_utils/prices.rs +++ b/crates/blockifier/src/test_utils/prices.rs @@ -1,3 +1,4 @@ +use cached::proc_macro::cached; use cairo_vm::vm::runners::cairo_runner::ExecutionResources as VmExecutionResources; use starknet_api::core::ContractAddress; use starknet_api::hash::StarkFelt; @@ -36,7 +37,7 @@ impl From for VmExecutionResources { } /// Returns the expected VM resource consumption for a fee transfer call from the given address. -#[memoize::memoize] +#[cached] fn fee_transfer_resources( account_contract_address: ContractAddress, fee_type: FeeType,