Skip to content

Commit 0cda415

Browse files
bot: Update proposals candid bindings (#6618)
# Motivation We would like to render all the latest proposal types. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_PROPOSALS` specified in `config.json`. * Updated the `proposals` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the proposals payload rendering crate. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. - [ ] Please check for new proposal types and add tests for them. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <[email protected]>
1 parent be70269 commit 0cda415

File tree

7 files changed

+37
-7
lines changed

7 files changed

+37
-7
lines changed

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"POCKETIC_VERSION": "3.0.1",
112112
"CARGO_SORT_VERSION": "1.0.9",
113113
"SNSDEMO_RELEASE": "release-2025-03-05",
114-
"IC_COMMIT_FOR_PROPOSALS": "release-2025-03-14_03-10-base",
114+
"IC_COMMIT_FOR_PROPOSALS": "release-2025-03-20_03-11-base",
115115
"IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2025-03-20_03-11-base"
116116
},
117117
"packtool": ""

declarations/used_by_proposals/nns_governance/nns_governance.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/nns/governance/canister/governance.did>
1+
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/nns/governance/canister/governance.did>
22
type AccountIdentifier = record {
33
hash : blob;
44
};

declarations/used_by_proposals/nns_registry/nns_registry.did

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/registry/canister/canister/registry.did>
1+
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/registry/canister/canister/registry.did>
22
// A brief note about the history of this file: This file used to be
33
// automatically generated, but now, it is hand-crafted, because the
44
// auto-generator has some some pretty degenerate behaviors. The worst of those
@@ -198,6 +198,19 @@ type ApiBoundaryNodeIdRecord = record {
198198
id : opt principal;
199199
};
200200

201+
type GetChunkRequest = record {
202+
content_sha256 : opt blob;
203+
};
204+
205+
type GetChunkResponse = variant {
206+
Ok : Chunk;
207+
Err : text;
208+
};
209+
210+
type Chunk = record {
211+
content : opt blob;
212+
};
213+
201214
type GetNodeOperatorsAndDcsOfNodeProviderResponse = variant {
202215
Ok : vec record { DataCenterRecord; NodeOperatorRecord };
203216
Err : text;
@@ -456,6 +469,7 @@ service : {
456469
deploy_hostos_to_some_nodes : (DeployHostosToSomeNodes) -> ();
457470
get_api_boundary_node_ids : (GetApiBoundaryNodeIdsRequest) -> (GetApiBoundaryNodeIdsResponse) query;
458471
get_build_metadata : () -> (text) query;
472+
get_chunk : (GetChunkRequest) -> (GetChunkResponse) query;
459473
get_node_operators_and_dcs_of_node_provider : (principal) -> (GetNodeOperatorsAndDcsOfNodeProviderResponse) query;
460474
get_node_providers_monthly_xdr_rewards : () -> (GetNodeProvidersMonthlyXdrRewardsResponse) query;
461475
get_subnet_for_canister : (GetSubnetForCanisterRequest) -> (GetSubnetForCanisterResponse) query;

declarations/used_by_proposals/sns_wasm/sns_wasm.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/nns/sns-wasm/canister/sns-wasm.did>
1+
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/nns/sns-wasm/canister/sns-wasm.did>
22
type AddWasmRequest = record {
33
hash : blob;
44
wasm : opt SnsWasm;

rs/proposals/src/canisters/nns_governance/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Rust code created from candid by: `scripts/did2rs.sh --canister nns_governance --out api.rs --header did2rs.header --traits Serialize`
2-
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/nns/governance/canister/governance.did>
2+
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/nns/governance/canister/governance.did>
33
#![allow(clippy::all)]
44
#![allow(missing_docs)]
55
#![allow(clippy::missing_docs_in_private_items)]

rs/proposals/src/canisters/nns_registry/api.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Rust code created from candid by: `scripts/did2rs.sh --canister nns_registry --out api.rs --header did2rs.header --traits Serialize`
2-
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/registry/canister/canister/registry.did>
2+
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/registry/canister/canister/registry.did>
33
#![allow(clippy::all)]
44
#![allow(missing_docs)]
55
#![allow(clippy::missing_docs_in_private_items)]
@@ -247,6 +247,19 @@ pub enum GetApiBoundaryNodeIdsResponse {
247247
Err(String),
248248
}
249249
#[derive(Serialize, CandidType, Deserialize)]
250+
pub struct GetChunkRequest {
251+
pub content_sha256: Option<serde_bytes::ByteBuf>,
252+
}
253+
#[derive(Serialize, CandidType, Deserialize)]
254+
pub struct Chunk {
255+
pub content: Option<serde_bytes::ByteBuf>,
256+
}
257+
#[derive(Serialize, CandidType, Deserialize)]
258+
pub enum GetChunkResponse {
259+
Ok(Chunk),
260+
Err(String),
261+
}
262+
#[derive(Serialize, CandidType, Deserialize)]
250263
pub struct NodeOperatorRecord {
251264
pub ipv6: Option<String>,
252265
pub node_operator_principal_id: serde_bytes::ByteBuf,
@@ -534,6 +547,9 @@ impl Service {
534547
pub async fn get_build_metadata(&self) -> CallResult<(String,)> {
535548
ic_cdk::call(self.0, "get_build_metadata", ()).await
536549
}
550+
pub async fn get_chunk(&self, arg0: GetChunkRequest) -> CallResult<(GetChunkResponse,)> {
551+
ic_cdk::call(self.0, "get_chunk", (arg0,)).await
552+
}
537553
pub async fn get_node_operators_and_dcs_of_node_provider(
538554
&self,
539555
arg0: Principal,

rs/proposals/src/canisters/sns_wasm/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_wasm --out api.rs --header did2rs.header --traits Serialize`
2-
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-14_03-10-base/rs/nns/sns-wasm/canister/sns-wasm.did>
2+
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-03-20_03-11-base/rs/nns/sns-wasm/canister/sns-wasm.did>
33
#![allow(clippy::all)]
44
#![allow(missing_docs)]
55
#![allow(clippy::missing_docs_in_private_items)]

0 commit comments

Comments
 (0)