From c48cfa40e71bbd630771fcc37be75f3ffe62f491 Mon Sep 17 00:00:00 2001 From: Igor Novgorodov Date: Wed, 29 Apr 2026 14:27:24 +0200 Subject: [PATCH 1/2] Add new call types --- ic-bn-lib-common/src/types/mod.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ic-bn-lib-common/src/types/mod.rs b/ic-bn-lib-common/src/types/mod.rs index d0aed3f..4f9af11 100644 --- a/ic-bn-lib-common/src/types/mod.rs +++ b/ic-bn-lib-common/src/types/mod.rs @@ -45,9 +45,11 @@ pub enum RequestType { Status, QueryV2, QueryV3, + QuerySubnetV3, CallV2, CallV3, CallV4, + CallSubnetV4, ReadStateV2, ReadStateV3, ReadStateSubnetV2, @@ -56,10 +58,23 @@ pub enum RequestType { impl RequestType { pub const fn is_query(&self) -> bool { - matches!(self, Self::QueryV2 | Self::QueryV3) + matches!(self, Self::QueryV2 | Self::QueryV3 | Self::QuerySubnetV3) } pub const fn is_call(&self) -> bool { - matches!(self, Self::CallV2 | Self::CallV3 | Self::CallV4) + matches!( + self, + Self::CallV2 | Self::CallV3 | Self::CallV4 | Self::CallSubnetV4 + ) + } + + pub const fn is_read_state(&self) -> bool { + matches!( + self, + Self::ReadStateV2 + | Self::ReadStateV3 + | Self::ReadStateSubnetV2 + | Self::ReadStateSubnetV3 + ) } } From 61b23ebfb2a51683402bd7d226d754d25e095063 Mon Sep 17 00:00:00 2001 From: Igor Novgorodov Date: Wed, 29 Apr 2026 14:41:35 +0200 Subject: [PATCH 2/2] Update version --- ic-bn-lib-common/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ic-bn-lib-common/Cargo.toml b/ic-bn-lib-common/Cargo.toml index f6b2724..e706fe2 100644 --- a/ic-bn-lib-common/Cargo.toml +++ b/ic-bn-lib-common/Cargo.toml @@ -5,7 +5,7 @@ license.workspace = true readme.workspace = true keywords.workspace = true description = "A collection of traits & types commonly used by ic-bn-lib and others" -version = "0.1.7" +version = "0.1.8" documentation = "https://docs.rs/ic-bn-lib-common" [dependencies]