diff --git a/declarations/used_by_sns_aggregator/sns_governance/sns_governance.did b/declarations/used_by_sns_aggregator/sns_governance/sns_governance.did index bf6ce424f62..57183555c07 100644 --- a/declarations/used_by_sns_aggregator/sns_governance/sns_governance.did +++ b/declarations/used_by_sns_aggregator/sns_governance/sns_governance.did @@ -1,4 +1,4 @@ -//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: +//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: type Account = record { owner : opt principal; subaccount : opt Subaccount; @@ -292,6 +292,16 @@ type Governance = record { neurons : vec record { text; Neuron }; genesis_timestamp_seconds : nat64; target_version: opt Version; + timers : opt Timers; +}; + +type Timers = record { + last_reset_timestamp_seconds : opt nat64; + last_spawned_timestamp_seconds : opt nat64; +}; + +type GetTimersResponse = record { + timers : opt Timers; }; type GovernanceCachedMetrics = record { @@ -741,4 +751,6 @@ service : (Governance) -> { list_proposals : (ListProposals) -> (ListProposalsResponse) query; manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); set_mode : (SetMode) -> (record {}); + reset_timers : (record {}) -> (record {}); + get_timers : (record {}) -> (GetTimersResponse) query; } diff --git a/declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did b/declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did index 02cca6c058e..b79b5459361 100644 --- a/declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did +++ b/declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did @@ -1,4 +1,4 @@ -//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: +//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: type BlockIndex = nat; type Subaccount = blob; // Number of nanoseconds since the UNIX epoch in UTC timezone. diff --git a/declarations/used_by_sns_aggregator/sns_root/sns_root.did b/declarations/used_by_sns_aggregator/sns_root/sns_root.did index 37f0a43d6bf..3bda1f90e0a 100644 --- a/declarations/used_by_sns_aggregator/sns_root/sns_root.did +++ b/declarations/used_by_sns_aggregator/sns_root/sns_root.did @@ -1,4 +1,4 @@ -//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: +//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: type CanisterCallError = record { code : opt int32; description : text; diff --git a/declarations/used_by_sns_aggregator/sns_swap/sns_swap.did b/declarations/used_by_sns_aggregator/sns_swap/sns_swap.did index 304a9cfb818..40a0f0a0dd6 100644 --- a/declarations/used_by_sns_aggregator/sns_swap/sns_swap.did +++ b/declarations/used_by_sns_aggregator/sns_swap/sns_swap.did @@ -1,4 +1,4 @@ -//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: +//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: type BuyerState = record { icp : opt TransferableAmount; has_created_neuron_recipes : opt bool; diff --git a/declarations/used_by_sns_aggregator/sns_wasm/sns_wasm.did b/declarations/used_by_sns_aggregator/sns_wasm/sns_wasm.did index e334869366c..eff311e1748 100644 --- a/declarations/used_by_sns_aggregator/sns_wasm/sns_wasm.did +++ b/declarations/used_by_sns_aggregator/sns_wasm/sns_wasm.did @@ -1,4 +1,4 @@ -//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: +//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm; diff --git a/dfx.json b/dfx.json index 89c471f86bb..8a195e0328c 100644 --- a/dfx.json +++ b/dfx.json @@ -405,7 +405,7 @@ "CARGO_SORT_VERSION": "1.0.9", "SNSDEMO_RELEASE": "release-2024-10-23", "IC_COMMIT_FOR_PROPOSALS": "release-2024-10-23_03-07-ubuntu20.04", - "IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2024-10-17_03-07-scheduler-changes-guestos-revert" + "IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2024-10-23_03-07-ubuntu20.04" }, "packtool": "" } diff --git a/rs/sns_aggregator/src/types/ic_sns_governance.rs b/rs/sns_aggregator/src/types/ic_sns_governance.rs index 52f28f60e8f..b8f8d9c6922 100644 --- a/rs/sns_aggregator/src/types/ic_sns_governance.rs +++ b/rs/sns_aggregator/src/types/ic_sns_governance.rs @@ -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: +//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: #![allow(clippy::all)] #![allow(unused_imports)] #![allow(missing_docs)] @@ -16,6 +16,11 @@ use ic_cdk::api::call::CallResult; // use candid::{self, CandidType, Deserialize, Principal}; // use ic_cdk::api::call::CallResult as Result; +#[derive(Serialize, Clone, Debug, CandidType, Deserialize)] +pub struct Timers { + pub last_spawned_timestamp_seconds: Option, + pub last_reset_timestamp_seconds: Option, +} #[derive(Serialize, Clone, Debug, CandidType, Deserialize)] pub struct Version { pub archive_wasm_hash: serde_bytes::ByteBuf, @@ -468,6 +473,7 @@ pub struct Neuron { #[derive(Serialize, Clone, Debug, CandidType, Deserialize)] pub struct Governance { pub root_canister_id: Option, + pub timers: Option, pub cached_upgrade_steps: Option, pub id_to_nervous_system_functions: Vec<(u64, NervousSystemFunction)>, pub metrics: Option, @@ -633,6 +639,12 @@ pub struct GetSnsInitializationParametersResponse { pub sns_initialization_parameters: String, } #[derive(Serialize, Clone, Debug, CandidType, Deserialize)] +pub struct GetTimersArg {} +#[derive(Serialize, Clone, Debug, CandidType, Deserialize)] +pub struct GetTimersResponse { + pub timers: Option, +} +#[derive(Serialize, Clone, Debug, CandidType, Deserialize)] pub struct GetUpgradeJournalRequest {} #[derive(Serialize, Clone, Debug, CandidType, Deserialize)] pub struct GetUpgradeJournalResponse { @@ -740,6 +752,10 @@ pub struct ManageNeuronResponse { pub command: Option, } #[derive(Serialize, Clone, Debug, CandidType, Deserialize)] +pub struct ResetTimersArg {} +#[derive(Serialize, Clone, Debug, CandidType, Deserialize)] +pub struct ResetTimersRet {} +#[derive(Serialize, Clone, Debug, CandidType, Deserialize)] pub struct SetMode { pub mode: i32, } @@ -799,6 +815,9 @@ impl Service { ) -> CallResult<(GetSnsInitializationParametersResponse,)> { ic_cdk::call(self.0, "get_sns_initialization_parameters", (arg0,)).await } + pub async fn get_timers(&self, arg0: GetTimersArg) -> CallResult<(GetTimersResponse,)> { + ic_cdk::call(self.0, "get_timers", (arg0,)).await + } pub async fn get_upgrade_journal( &self, arg0: GetUpgradeJournalRequest, @@ -817,6 +836,9 @@ impl Service { pub async fn manage_neuron(&self, arg0: ManageNeuron) -> CallResult<(ManageNeuronResponse,)> { ic_cdk::call(self.0, "manage_neuron", (arg0,)).await } + pub async fn reset_timers(&self, arg0: ResetTimersArg) -> CallResult<(ResetTimersRet,)> { + ic_cdk::call(self.0, "reset_timers", (arg0,)).await + } pub async fn set_mode(&self, arg0: SetMode) -> CallResult<(SetModeRet,)> { ic_cdk::call(self.0, "set_mode", (arg0,)).await } diff --git a/rs/sns_aggregator/src/types/ic_sns_ledger.rs b/rs/sns_aggregator/src/types/ic_sns_ledger.rs index 62302dd94f4..b56be6bbafa 100644 --- a/rs/sns_aggregator/src/types/ic_sns_ledger.rs +++ b/rs/sns_aggregator/src/types/ic_sns_ledger.rs @@ -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: +//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: #![allow(clippy::all)] #![allow(unused_imports)] #![allow(missing_docs)] diff --git a/rs/sns_aggregator/src/types/ic_sns_root.rs b/rs/sns_aggregator/src/types/ic_sns_root.rs index 6fd9a08bca3..2ecb42f768c 100644 --- a/rs/sns_aggregator/src/types/ic_sns_root.rs +++ b/rs/sns_aggregator/src/types/ic_sns_root.rs @@ -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: +//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: #![allow(clippy::all)] #![allow(unused_imports)] #![allow(missing_docs)] diff --git a/rs/sns_aggregator/src/types/ic_sns_swap.rs b/rs/sns_aggregator/src/types/ic_sns_swap.rs index a94a19406be..10f1d17848d 100644 --- a/rs/sns_aggregator/src/types/ic_sns_swap.rs +++ b/rs/sns_aggregator/src/types/ic_sns_swap.rs @@ -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: +//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: #![allow(clippy::all)] #![allow(unused_imports)] #![allow(missing_docs)] diff --git a/rs/sns_aggregator/src/types/ic_sns_wasm.rs b/rs/sns_aggregator/src/types/ic_sns_wasm.rs index 1b82a97b986..b69788473c5 100644 --- a/rs/sns_aggregator/src/types/ic_sns_wasm.rs +++ b/rs/sns_aggregator/src/types/ic_sns_wasm.rs @@ -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: +//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: #![allow(clippy::all)] #![allow(unused_imports)] #![allow(missing_docs)]