Skip to content

bot: Update sns_aggregator candid bindings #6916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"CARGO_SORT_VERSION": "1.0.9",
"SNSDEMO_RELEASE": "release-2025-05-28",
"IC_COMMIT_FOR_PROPOSALS": "release-2025-05-30_03-21-base",
"IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2025-05-08_03-21-base"
"IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2025-05-30_03-21-base"
},
"packtool": ""
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/governance/canister/governance.did>
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/governance/canister/governance.did>
type Account = record {
owner : opt principal;
subaccount : opt Subaccount;
Expand Down Expand Up @@ -249,6 +249,24 @@ type GetMetadataResponse = record {
description : opt text;
};

type GetMetricsRequest = record {
time_window_seconds : opt nat64;
};

type Metrics = record {
num_recently_submitted_proposals : opt nat64;
last_ledger_block_timestamp : opt nat64;
};

type GetMetricsResult = variant {
Ok : Metrics;
Err : GovernanceError;
};

type GetMetricsResponse = record {
get_metrics_result : opt GetMetricsResult;
};

type GetModeResponse = record {
mode : opt int32;
};
Expand Down Expand Up @@ -895,6 +913,7 @@ service : (Governance) -> {
get_latest_reward_event : () -> (RewardEvent) query;
get_maturity_modulation : (record {}) -> (GetMaturityModulationResponse);
get_metadata : (record {}) -> (GetMetadataResponse) query;
get_metrics : (GetMetricsRequest) -> (GetMetricsResponse) composite_query;
get_mode : (record {}) -> (GetModeResponse) query;
get_nervous_system_parameters : (null) -> (NervousSystemParameters) query;
get_neuron : (GetNeuron) -> (GetNeuronResponse) query;
Expand Down
32 changes: 31 additions & 1 deletion declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/ledger_suite/icrc1/ledger/ledger.did>
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/ledger_suite/icrc1/ledger/ledger.did>
type BlockIndex = nat;
type Subaccount = blob;
// Number of nanoseconds since the UNIX epoch in UTC timezone.
Expand Down Expand Up @@ -479,6 +479,34 @@ type icrc21_consent_message_response = variant {
Err: icrc21_error;
};

type GetAllowancesArgs = record {
from_account: opt Account;
prev_spender: opt Account;
take: opt nat;
};

type Allowance103 = record {
from_account: Account;
to_spender: Account;
allowance: nat;
expires_at: opt nat64;
};

type GetAllowancesError = variant {
AccessDenied: record {
reason: text;
};
GenericError: record {
error_code: nat;
message: text;
};
};

type icrc103_get_allowances_response = variant {
Ok: vec Allowance103;
Err: GetAllowancesError;
};

service : (ledger_arg : LedgerArg) -> {
archives : () -> (vec ArchiveInfo) query;
get_transactions : (GetTransactionsRequest) -> (GetTransactionsResponse) query;
Expand Down Expand Up @@ -508,5 +536,7 @@ service : (ledger_arg : LedgerArg) -> {
icrc21_canister_call_consent_message: (icrc21_consent_message_request) -> (icrc21_consent_message_response);
icrc10_supported_standards : () -> (vec record { name : text; url : text }) query;

icrc103_get_allowances : (GetAllowancesArgs) -> (icrc103_get_allowances_response) query;

is_ledger_ready: () -> (bool) query;
}
4 changes: 1 addition & 3 deletions declarations/used_by_sns_aggregator/sns_root/sns_root.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/root/canister/root.did>
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/root/canister/root.did>
type CanisterCallError = record {
code : opt int32;
description : text;
Expand Down Expand Up @@ -59,8 +59,6 @@ type ChangeCanisterRequest = record {
stop_before_installing : bool;
mode : CanisterInstallMode;
canister_id : principal;
memory_allocation : opt nat;
compute_allocation : opt nat;
};

type DefiniteCanisterSettings = record {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/swap/canister/swap.did>
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/swap/canister/swap.did>
type BuyerState = record {
icp : opt TransferableAmount;
has_created_neuron_recipes : opt bool;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/nns/sns-wasm/canister/sns-wasm.did>
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/nns/sns-wasm/canister/sns-wasm.did>
type AddWasmRequest = record {
hash : blob;
wasm : opt SnsWasm;
Expand Down
23 changes: 22 additions & 1 deletion rs/sns_aggregator/src/types/ic_sns_governance.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_governance --out ic_sns_governance.rs --header did2rs.header --traits Serialize\,\ Clone\,\ Debug`
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/governance/canister/governance.did>
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/governance/canister/governance.did>
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(missing_docs)]
Expand Down Expand Up @@ -697,6 +697,24 @@ pub struct GetMetadataResponse {
pub description: Option<String>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetMetricsRequest {
pub time_window_seconds: Option<u64>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct Metrics {
pub last_ledger_block_timestamp: Option<u64>,
pub num_recently_submitted_proposals: Option<u64>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub enum GetMetricsResult {
Ok(Metrics),
Err(GovernanceError),
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetMetricsResponse {
pub get_metrics_result: Option<GetMetricsResult>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetModeArg {}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetModeResponse {
Expand Down Expand Up @@ -963,6 +981,9 @@ impl Service {
pub async fn get_metadata(&self, arg0: GetMetadataArg) -> CallResult<(GetMetadataResponse,)> {
ic_cdk::call(self.0, "get_metadata", (arg0,)).await
}
pub async fn get_metrics(&self, arg0: GetMetricsRequest) -> CallResult<(GetMetricsResponse,)> {
ic_cdk::call(self.0, "get_metrics", (arg0,)).await
}
pub async fn get_mode(&self, arg0: GetModeArg) -> CallResult<(GetModeResponse,)> {
ic_cdk::call(self.0, "get_mode", (arg0,)).await
}
Expand Down
31 changes: 30 additions & 1 deletion rs/sns_aggregator/src/types/ic_sns_ledger.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_ledger --out ic_sns_ledger.rs --header did2rs.header --traits Serialize\,\ Clone\,\ Debug`
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/ledger_suite/icrc1/ledger/ledger.did>
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/ledger_suite/icrc1/ledger/ledger.did>
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(missing_docs)]
Expand Down Expand Up @@ -209,6 +209,29 @@ pub struct GetTransactionsResponse {
pub archived_transactions: Vec<GetTransactionsResponseArchivedTransactionsItem>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetAllowancesArgs {
pub take: Option<candid::Nat>,
pub prev_spender: Option<Account>,
pub from_account: Option<Account>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct Allowance103 {
pub from_account: Account,
pub to_spender: Account,
pub allowance: candid::Nat,
pub expires_at: Option<u64>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub enum GetAllowancesError {
GenericError { message: String, error_code: candid::Nat },
AccessDenied { reason: String },
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub enum Icrc103GetAllowancesResponse {
Ok(Vec<Allowance103>),
Err(GetAllowancesError),
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct Icrc10SupportedStandardsRetItem {
pub url: String,
pub name: String,
Expand Down Expand Up @@ -430,6 +453,12 @@ impl Service {
pub async fn get_transactions(&self, arg0: GetTransactionsRequest) -> CallResult<(GetTransactionsResponse,)> {
ic_cdk::call(self.0, "get_transactions", (arg0,)).await
}
pub async fn icrc_103_get_allowances(
&self,
arg0: GetAllowancesArgs,
) -> CallResult<(Icrc103GetAllowancesResponse,)> {
ic_cdk::call(self.0, "icrc103_get_allowances", (arg0,)).await
}
pub async fn icrc_10_supported_standards(&self) -> CallResult<(Vec<Icrc10SupportedStandardsRetItem>,)> {
ic_cdk::call(self.0, "icrc10_supported_standards", ()).await
}
Expand Down
4 changes: 1 addition & 3 deletions rs/sns_aggregator/src/types/ic_sns_root.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_root --out ic_sns_root.rs --header did2rs.header --traits Serialize\,\ Clone\,\ Debug`
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/root/canister/root.did>
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/root/canister/root.did>
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(missing_docs)]
Expand Down Expand Up @@ -107,8 +107,6 @@ pub struct ChangeCanisterRequest {
pub mode: CanisterInstallMode,
pub canister_id: Principal,
pub chunked_canister_wasm: Option<ChunkedCanisterWasm>,
pub memory_allocation: Option<candid::Nat>,
pub compute_allocation: Option<candid::Nat>,
}
#[derive(Serialize, Clone, Debug, CandidType, Deserialize)]
pub struct GetSnsCanistersSummaryRequest {
Expand Down
2 changes: 1 addition & 1 deletion rs/sns_aggregator/src/types/ic_sns_swap.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_swap --out ic_sns_swap.rs --header did2rs.header --traits Serialize\,\ Clone\,\ Debug`
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/sns/swap/canister/swap.did>
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/sns/swap/canister/swap.did>
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(missing_docs)]
Expand Down
2 changes: 1 addition & 1 deletion rs/sns_aggregator/src/types/ic_sns_wasm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Rust code created from candid by: `scripts/did2rs.sh --canister sns_wasm --out ic_sns_wasm.rs --header did2rs.header --traits Serialize\,\ Clone\,\ Debug`
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-08_03-21-base/rs/nns/sns-wasm/canister/sns-wasm.did>
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-05-30_03-21-base/rs/nns/sns-wasm/canister/sns-wasm.did>
#![allow(clippy::all)]
#![allow(unused_imports)]
#![allow(missing_docs)]
Expand Down