From 1dfd8a7469a1c08191f6dc004dba4abf0256ad59 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:06:04 +0200 Subject: [PATCH] chore(starknet_api): add sierra version utils (#2828) --- crates/starknet_api/src/contract_class.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/starknet_api/src/contract_class.rs b/crates/starknet_api/src/contract_class.rs index c8a295d57a..9306b0656e 100644 --- a/crates/starknet_api/src/contract_class.rs +++ b/crates/starknet_api/src/contract_class.rs @@ -116,6 +116,13 @@ impl FromStr for SierraVersion { } } +#[allow(dead_code)] +impl From<(u64, u64, u64)> for SierraVersion { + fn from((major, minor, patch): (u64, u64, u64)) -> Self { + Self::new(major, minor, patch) + } +} + /// All relevant information about a declared contract class, including the compiled contract class /// and other parameters derived from the original declare transaction required for billing. #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]