diff --git a/crates/starknet-types-core/Cargo.toml b/crates/starknet-types-core/Cargo.toml index f07b4a7..b5b4030 100644 --- a/crates/starknet-types-core/Cargo.toml +++ b/crates/starknet-types-core/Cargo.toml @@ -42,6 +42,7 @@ hash = ["dep:lambdaworks-crypto"] arbitrary = ["std", "dep:arbitrary"] serde = ["dep:serde"] num-traits = [] +alloc = ["serde?/alloc"] [dev-dependencies] proptest = "1.1.0" diff --git a/crates/starknet-types-core/src/felt/mod.rs b/crates/starknet-types-core/src/felt/mod.rs index 5056bf9..f732179 100644 --- a/crates/starknet-types-core/src/felt/mod.rs +++ b/crates/starknet-types-core/src/felt/mod.rs @@ -960,8 +960,8 @@ mod errors { #[cfg(test)] mod test { use super::alloc::{format, string::String, vec::Vec}; + use super::felt_arbitrary::nonzero_felt; use super::*; - use crate::felt_arbitrary::nonzero_felt; use core::ops::Shl; use proptest::prelude::*; #[cfg(feature = "serde")] diff --git a/crates/starknet-types-rpc/Cargo.toml b/crates/starknet-types-rpc/Cargo.toml index 38ae114..4760201 100644 --- a/crates/starknet-types-rpc/Cargo.toml +++ b/crates/starknet-types-rpc/Cargo.toml @@ -16,7 +16,7 @@ default = ["std"] std = ["serde/std", "starknet-types-core/std"] [dependencies] -starknet-types-core = { path = "../starknet-types-core", default-features = false, features = ["serde"] } +starknet-types-core = { path = "../starknet-types-core", default-features = false, features = ["serde", "alloc"] } serde = { version = "1", default-features = false, features = ["derive"] } [dev-dependencies] diff --git a/ensure_no_std/Cargo.toml b/ensure_no_std/Cargo.toml index e18e611..c6291eb 100644 --- a/ensure_no_std/Cargo.toml +++ b/ensure_no_std/Cargo.toml @@ -8,6 +8,7 @@ starknet-types-core = { path = "../crates/starknet-types-core", default-features "alloc", "serde", "curve", + "num-traits", ] } starknet-types-rpc = { path = "../crates/starknet-types-rpc", default-features = false } wee_alloc = "0.4.5"