From d1e62cff81f0a6aface7c3900709bcf7ffa0df7e Mon Sep 17 00:00:00 2001 From: gix-bot Date: Mon, 4 Nov 2024 03:37:36 +0000 Subject: [PATCH] Update IC commit --- packages/ckbtc/candid/minter.did | 2 +- packages/cketh/candid/minter.certified.idl.js | 3 + packages/cketh/candid/minter.d.ts | 3 + packages/cketh/candid/minter.did | 6 +- packages/cketh/candid/minter.idl.js | 3 + packages/cketh/candid/orchestrator.did | 2 +- packages/cmc/candid/cmc.did | 2 +- .../candid/ic-management.certified.idl.js | 1 + .../ic-management/candid/ic-management.d.ts | 5 +- .../ic-management/candid/ic-management.did | 3 +- .../ic-management/candid/ic-management.idl.js | 1 + packages/ledger-icp/candid/index.did | 2 +- packages/ledger-icp/candid/ledger.did | 2 +- packages/ledger-icrc/candid/icrc_index-ng.did | 2 +- packages/ledger-icrc/candid/icrc_index.did | 2 +- packages/ledger-icrc/candid/icrc_ledger.did | 2 +- packages/nns/candid/genesis_token.did | 2 +- .../nns/candid/governance.certified.idl.js | 3 + packages/nns/candid/governance.d.ts | 2 + packages/nns/candid/governance.did | 4 +- packages/nns/candid/governance.idl.js | 3 + .../candid/governance_test.certified.idl.js | 3 + packages/nns/candid/governance_test.d.ts | 2 + packages/nns/candid/governance_test.did | 4 +- packages/nns/candid/governance_test.idl.js | 3 + packages/nns/candid/sns_wasm.did | 2 +- .../candid/sns_governance.certified.idl.js | 95 ++++++++++++++++++- packages/sns/candid/sns_governance.d.ts | 46 +++++++++ packages/sns/candid/sns_governance.did | 58 +++++++++-- packages/sns/candid/sns_governance.idl.js | 95 ++++++++++++++++++- .../sns_governance_test.certified.idl.js | 95 ++++++++++++++++++- packages/sns/candid/sns_governance_test.d.ts | 46 +++++++++ packages/sns/candid/sns_governance_test.did | 48 +++++++++- .../sns/candid/sns_governance_test.idl.js | 95 ++++++++++++++++++- packages/sns/candid/sns_root.certified.idl.js | 15 +++ packages/sns/candid/sns_root.d.ts | 11 +++ packages/sns/candid/sns_root.did | 15 ++- packages/sns/candid/sns_root.idl.js | 15 +++ packages/sns/candid/sns_swap.certified.idl.js | 2 + packages/sns/candid/sns_swap.d.ts | 4 + packages/sns/candid/sns_swap.did | 7 +- packages/sns/candid/sns_swap.idl.js | 2 + 42 files changed, 684 insertions(+), 34 deletions(-) diff --git a/packages/ckbtc/candid/minter.did b/packages/ckbtc/candid/minter.did index 72d1832a..5b34018f 100644 --- a/packages/ckbtc/candid/minter.did +++ b/packages/ckbtc/candid/minter.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid // Represents an account on the ckBTC ledger. type Account = record { owner : principal; subaccount : opt blob }; diff --git a/packages/cketh/candid/minter.certified.idl.js b/packages/cketh/candid/minter.certified.idl.js index d97e9222..f7b5eefe 100644 --- a/packages/cketh/candid/minter.certified.idl.js +++ b/packages/cketh/candid/minter.certified.idl.js @@ -83,6 +83,7 @@ export const idlFactory = ({ IDL }) => { 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)), 'reserved_cycles' : IDL.Nat, }); + const Subaccount = IDL.Vec(IDL.Nat8); const EventSource = IDL.Record({ 'transaction_hash' : IDL.Text, 'log_index' : IDL.Nat, @@ -131,6 +132,7 @@ export const idlFactory = ({ IDL }) => { 'transaction_hash' : IDL.Text, 'value' : IDL.Nat, 'log_index' : IDL.Nat, + 'subaccount' : IDL.Opt(Subaccount), 'block_number' : IDL.Nat, 'erc20_contract_address' : IDL.Text, 'from_address' : IDL.Text, @@ -154,6 +156,7 @@ export const idlFactory = ({ IDL }) => { 'transaction_hash' : IDL.Text, 'value' : IDL.Nat, 'log_index' : IDL.Nat, + 'subaccount' : IDL.Opt(Subaccount), 'block_number' : IDL.Nat, 'from_address' : IDL.Text, }), diff --git a/packages/cketh/candid/minter.d.ts b/packages/cketh/candid/minter.d.ts index 8b3093a3..2fe44a74 100644 --- a/packages/cketh/candid/minter.d.ts +++ b/packages/cketh/candid/minter.d.ts @@ -70,6 +70,7 @@ export interface Event { transaction_hash: string; value: bigint; log_index: bigint; + subaccount: [] | [Subaccount]; block_number: bigint; erc20_contract_address: string; from_address: string; @@ -99,6 +100,7 @@ export interface Event { transaction_hash: string; value: bigint; log_index: bigint; + subaccount: [] | [Subaccount]; block_number: bigint; from_address: string; }; @@ -283,6 +285,7 @@ export type RetrieveEthStatus = | { TxSent: EthTransaction } | { TxCreated: null } | { Pending: null }; +export type Subaccount = Uint8Array | number[]; export interface TransactionReceipt { effective_gas_price: bigint; status: { Success: null } | { Failure: null }; diff --git a/packages/cketh/candid/minter.did b/packages/cketh/candid/minter.did index d44588a1..e806873a 100644 --- a/packages/cketh/candid/minter.did +++ b/packages/cketh/candid/minter.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid type EthereumNetwork = variant { // The public Ethereum mainnet. Mainnet; @@ -6,6 +6,8 @@ type EthereumNetwork = variant { Sepolia; }; +type Subaccount = blob; + type CanisterStatusResponse = record { query_stats : QueryStats; status : CanisterStatusType; @@ -432,6 +434,7 @@ type Event = record { from_address : text; value : nat; "principal" : principal; + subaccount : opt Subaccount; }; InvalidDeposit : record { event_source : EventSource; @@ -503,6 +506,7 @@ type Event = record { value : nat; "principal" : principal; erc20_contract_address : text; + subaccount : opt Subaccount; }; AcceptedErc20WithdrawalRequest : record { max_transaction_fee : nat; diff --git a/packages/cketh/candid/minter.idl.js b/packages/cketh/candid/minter.idl.js index 26f6c1f1..4d22a05a 100644 --- a/packages/cketh/candid/minter.idl.js +++ b/packages/cketh/candid/minter.idl.js @@ -83,6 +83,7 @@ export const idlFactory = ({ IDL }) => { 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)), 'reserved_cycles' : IDL.Nat, }); + const Subaccount = IDL.Vec(IDL.Nat8); const EventSource = IDL.Record({ 'transaction_hash' : IDL.Text, 'log_index' : IDL.Nat, @@ -131,6 +132,7 @@ export const idlFactory = ({ IDL }) => { 'transaction_hash' : IDL.Text, 'value' : IDL.Nat, 'log_index' : IDL.Nat, + 'subaccount' : IDL.Opt(Subaccount), 'block_number' : IDL.Nat, 'erc20_contract_address' : IDL.Text, 'from_address' : IDL.Text, @@ -154,6 +156,7 @@ export const idlFactory = ({ IDL }) => { 'transaction_hash' : IDL.Text, 'value' : IDL.Nat, 'log_index' : IDL.Nat, + 'subaccount' : IDL.Opt(Subaccount), 'block_number' : IDL.Nat, 'from_address' : IDL.Text, }), diff --git a/packages/cketh/candid/orchestrator.did b/packages/cketh/candid/orchestrator.did index 0676916e..4c30a8a4 100644 --- a/packages/cketh/candid/orchestrator.did +++ b/packages/cketh/candid/orchestrator.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid type OrchestratorArg = variant { UpgradeArg : UpgradeArg; InitArg : InitArg; diff --git a/packages/cmc/candid/cmc.did b/packages/cmc/candid/cmc.did index f832eea7..056f98cd 100644 --- a/packages/cmc/candid/cmc.did +++ b/packages/cmc/candid/cmc.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/cmc/cmc.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/nns/cmc/cmc.did' by import-candid type Cycles = nat; type BlockIndex = nat64; type log_visibility = variant { diff --git a/packages/ic-management/candid/ic-management.certified.idl.js b/packages/ic-management/candid/ic-management.certified.idl.js index b6e1a80f..23e24a5b 100644 --- a/packages/ic-management/candid/ic-management.certified.idl.js +++ b/packages/ic-management/candid/ic-management.certified.idl.js @@ -109,6 +109,7 @@ export const idlFactory = ({ IDL }) => { const log_visibility = IDL.Variant({ 'controllers' : IDL.Null, 'public' : IDL.Null, + 'allowed_viewers' : IDL.Vec(IDL.Principal), }); const definite_canister_settings = IDL.Record({ 'freezing_threshold' : IDL.Nat, diff --git a/packages/ic-management/candid/ic-management.d.ts b/packages/ic-management/candid/ic-management.d.ts index 44a3c165..05e11f9c 100644 --- a/packages/ic-management/candid/ic-management.d.ts +++ b/packages/ic-management/candid/ic-management.d.ts @@ -228,7 +228,10 @@ export interface load_canister_snapshot_args { sender_canister_version: [] | [bigint]; snapshot_id: snapshot_id; } -export type log_visibility = { controllers: null } | { public: null }; +export type log_visibility = + | { controllers: null } + | { public: null } + | { allowed_viewers: Array }; export type millisatoshi_per_byte = bigint; export interface node_metrics { num_block_failures_total: bigint; diff --git a/packages/ic-management/candid/ic-management.did b/packages/ic-management/candid/ic-management.did index f21e6f66..ef4f4c4c 100644 --- a/packages/ic-management/candid/ic-management.did +++ b/packages/ic-management/candid/ic-management.did @@ -1,4 +1,4 @@ -// Generated from dfinity/interface-spec commit ac416ec82cd9fae4825824fea639f7ae32aec594 for file 'spec/_attachments/ic.did' +// Generated from dfinity/interface-spec commit 9a5077e7f90f06a5c45e83bcdbec73a6e5427537 for file 'spec/_attachments/ic.did' type canister_id = principal; type wasm_module = blob; type snapshot_id = blob; @@ -6,6 +6,7 @@ type snapshot_id = blob; type log_visibility = variant { controllers; public; + allowed_viewers : vec principal; }; type canister_settings = record { diff --git a/packages/ic-management/candid/ic-management.idl.js b/packages/ic-management/candid/ic-management.idl.js index fce8353b..e5d832f7 100644 --- a/packages/ic-management/candid/ic-management.idl.js +++ b/packages/ic-management/candid/ic-management.idl.js @@ -109,6 +109,7 @@ export const idlFactory = ({ IDL }) => { const log_visibility = IDL.Variant({ 'controllers' : IDL.Null, 'public' : IDL.Null, + 'allowed_viewers' : IDL.Vec(IDL.Principal), }); const definite_canister_settings = IDL.Record({ 'freezing_threshold' : IDL.Nat, diff --git a/packages/ledger-icp/candid/index.did b/packages/ledger-icp/candid/index.did index f1c8b701..4ead43c6 100644 --- a/packages/ledger-icp/candid/index.did +++ b/packages/ledger-icp/candid/index.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ledger_suite/icp/index/index.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ledger_suite/icp/index/index.did' by import-candid type Account = record { owner : principal; subaccount : opt vec nat8 }; type GetAccountIdentifierTransactionsArgs = record { max_results : nat64; diff --git a/packages/ledger-icp/candid/ledger.did b/packages/ledger-icp/candid/ledger.did index 68426db6..8538060f 100644 --- a/packages/ledger-icp/candid/ledger.did +++ b/packages/ledger-icp/candid/ledger.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ledger_suite/icp/ledger.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ledger_suite/icp/ledger.did' by import-candid // This is the official Ledger interface that is guaranteed to be backward compatible. // Amount of tokens, measured in 10^-8 of a token. diff --git a/packages/ledger-icrc/candid/icrc_index-ng.did b/packages/ledger-icrc/candid/icrc_index-ng.did index a027b904..4a077488 100644 --- a/packages/ledger-icrc/candid/icrc_index-ng.did +++ b/packages/ledger-icrc/candid/icrc_index-ng.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid type Tokens = nat; type InitArg = record { diff --git a/packages/ledger-icrc/candid/icrc_index.did b/packages/ledger-icrc/candid/icrc_index.did index e0b4feef..083bfdc1 100644 --- a/packages/ledger-icrc/candid/icrc_index.did +++ b/packages/ledger-icrc/candid/icrc_index.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ledger_suite/icrc1/index/index.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ledger_suite/icrc1/index/index.did' by import-candid type TxId = nat; type Account = record { owner : principal; subaccount : opt blob }; diff --git a/packages/ledger-icrc/candid/icrc_ledger.did b/packages/ledger-icrc/candid/icrc_ledger.did index fe906a63..fdb53371 100644 --- a/packages/ledger-icrc/candid/icrc_ledger.did +++ b/packages/ledger-icrc/candid/icrc_ledger.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid type BlockIndex = nat; type Subaccount = blob; // Number of nanoseconds since the UNIX epoch in UTC timezone. diff --git a/packages/nns/candid/genesis_token.did b/packages/nns/candid/genesis_token.did index 88ef73cb..f9737a17 100644 --- a/packages/nns/candid/genesis_token.did +++ b/packages/nns/candid/genesis_token.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/gtc/canister/gtc.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/nns/gtc/canister/gtc.did' by import-candid type AccountState = record { authenticated_principal_id : opt principal; successfully_transferred_neurons : vec TransferredNeuron; diff --git a/packages/nns/candid/governance.certified.idl.js b/packages/nns/candid/governance.certified.idl.js index cb7e6480..af8c5106 100644 --- a/packages/nns/candid/governance.certified.idl.js +++ b/packages/nns/candid/governance.certified.idl.js @@ -599,6 +599,7 @@ export const idlFactory = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, @@ -666,6 +667,7 @@ export const idlFactory = ({ IDL }) => { const NeuronInfo = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64, 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'neuron_type' : IDL.Opt(IDL.Int32), 'created_timestamp_seconds' : IDL.Nat64, 'state' : IDL.Int32, @@ -1564,6 +1566,7 @@ export const init = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, diff --git a/packages/nns/candid/governance.d.ts b/packages/nns/candid/governance.d.ts index a750f1a0..2fab082e 100644 --- a/packages/nns/candid/governance.d.ts +++ b/packages/nns/candid/governance.d.ts @@ -471,6 +471,7 @@ export interface Neuron { staked_maturity_e8s_equivalent: [] | [bigint]; controller: [] | [Principal]; recent_ballots: Array; + voting_power_refreshed_timestamp_seconds: [] | [bigint]; kyc_verified: boolean; neuron_type: [] | [number]; not_for_profit: boolean; @@ -518,6 +519,7 @@ export interface NeuronInFlightCommand { export interface NeuronInfo { dissolve_delay_seconds: bigint; recent_ballots: Array; + voting_power_refreshed_timestamp_seconds: [] | [bigint]; neuron_type: [] | [number]; created_timestamp_seconds: bigint; state: number; diff --git a/packages/nns/candid/governance.did b/packages/nns/candid/governance.did index d5fff586..06e7385d 100644 --- a/packages/nns/candid/governance.did +++ b/packages/nns/candid/governance.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/governance/canister/governance.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/nns/governance/canister/governance.did' by import-candid type AccountIdentifier = record { hash : blob; }; @@ -578,6 +578,7 @@ type Neuron = record { transfer : opt NeuronStakeTransfer; known_neuron_data : opt KnownNeuronData; spawn_at_timestamp_seconds : opt nat64; + voting_power_refreshed_timestamp_seconds : opt nat64; }; type NeuronBasketConstructionParameters = record { @@ -629,6 +630,7 @@ type NeuronInfo = record { known_neuron_data : opt KnownNeuronData; voting_power : nat64; age_seconds : nat64; + voting_power_refreshed_timestamp_seconds : opt nat64; }; type NeuronStakeTransfer = record { diff --git a/packages/nns/candid/governance.idl.js b/packages/nns/candid/governance.idl.js index 812381e7..494dc3f5 100644 --- a/packages/nns/candid/governance.idl.js +++ b/packages/nns/candid/governance.idl.js @@ -599,6 +599,7 @@ export const idlFactory = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, @@ -666,6 +667,7 @@ export const idlFactory = ({ IDL }) => { const NeuronInfo = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64, 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'neuron_type' : IDL.Opt(IDL.Int32), 'created_timestamp_seconds' : IDL.Nat64, 'state' : IDL.Int32, @@ -1580,6 +1582,7 @@ export const init = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, diff --git a/packages/nns/candid/governance_test.certified.idl.js b/packages/nns/candid/governance_test.certified.idl.js index 1b3f2d1c..3049fcd0 100644 --- a/packages/nns/candid/governance_test.certified.idl.js +++ b/packages/nns/candid/governance_test.certified.idl.js @@ -599,6 +599,7 @@ export const idlFactory = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, @@ -666,6 +667,7 @@ export const idlFactory = ({ IDL }) => { const NeuronInfo = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64, 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'neuron_type' : IDL.Opt(IDL.Int32), 'created_timestamp_seconds' : IDL.Nat64, 'state' : IDL.Int32, @@ -1565,6 +1567,7 @@ export const init = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, diff --git a/packages/nns/candid/governance_test.d.ts b/packages/nns/candid/governance_test.d.ts index fdfe19b4..d018b28d 100644 --- a/packages/nns/candid/governance_test.d.ts +++ b/packages/nns/candid/governance_test.d.ts @@ -471,6 +471,7 @@ export interface Neuron { staked_maturity_e8s_equivalent: [] | [bigint]; controller: [] | [Principal]; recent_ballots: Array; + voting_power_refreshed_timestamp_seconds: [] | [bigint]; kyc_verified: boolean; neuron_type: [] | [number]; not_for_profit: boolean; @@ -518,6 +519,7 @@ export interface NeuronInFlightCommand { export interface NeuronInfo { dissolve_delay_seconds: bigint; recent_ballots: Array; + voting_power_refreshed_timestamp_seconds: [] | [bigint]; neuron_type: [] | [number]; created_timestamp_seconds: bigint; state: number; diff --git a/packages/nns/candid/governance_test.did b/packages/nns/candid/governance_test.did index 440b4b2d..9967d7ed 100644 --- a/packages/nns/candid/governance_test.did +++ b/packages/nns/candid/governance_test.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/governance/canister/governance_test.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/nns/governance/canister/governance_test.did' by import-candid type AccountIdentifier = record { hash : blob; }; @@ -580,6 +580,7 @@ type Neuron = record { transfer : opt NeuronStakeTransfer; known_neuron_data : opt KnownNeuronData; spawn_at_timestamp_seconds : opt nat64; + voting_power_refreshed_timestamp_seconds : opt nat64; }; type NeuronBasketConstructionParameters = record { @@ -631,6 +632,7 @@ type NeuronInfo = record { known_neuron_data : opt KnownNeuronData; voting_power : nat64; age_seconds : nat64; + voting_power_refreshed_timestamp_seconds : opt nat64; }; type NeuronStakeTransfer = record { diff --git a/packages/nns/candid/governance_test.idl.js b/packages/nns/candid/governance_test.idl.js index c43f2fca..676c05a1 100644 --- a/packages/nns/candid/governance_test.idl.js +++ b/packages/nns/candid/governance_test.idl.js @@ -599,6 +599,7 @@ export const idlFactory = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, @@ -666,6 +667,7 @@ export const idlFactory = ({ IDL }) => { const NeuronInfo = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64, 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'neuron_type' : IDL.Opt(IDL.Int32), 'created_timestamp_seconds' : IDL.Nat64, 'state' : IDL.Int32, @@ -1581,6 +1583,7 @@ export const init = ({ IDL }) => { 'staked_maturity_e8s_equivalent' : IDL.Opt(IDL.Nat64), 'controller' : IDL.Opt(IDL.Principal), 'recent_ballots' : IDL.Vec(BallotInfo), + 'voting_power_refreshed_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'kyc_verified' : IDL.Bool, 'neuron_type' : IDL.Opt(IDL.Int32), 'not_for_profit' : IDL.Bool, diff --git a/packages/nns/candid/sns_wasm.did b/packages/nns/candid/sns_wasm.did index c61a1886..9fe0fbb4 100644 --- a/packages/nns/candid/sns_wasm.did +++ b/packages/nns/candid/sns_wasm.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm; diff --git a/packages/sns/candid/sns_governance.certified.idl.js b/packages/sns/candid/sns_governance.certified.idl.js index 9428ddca..c9c70ac6 100644 --- a/packages/sns/candid/sns_governance.certified.idl.js +++ b/packages/sns/candid/sns_governance.certified.idl.js @@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -63,6 +64,50 @@ export const idlFactory = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -99,7 +144,6 @@ export const idlFactory = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -374,6 +418,7 @@ export const idlFactory = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), @@ -478,6 +523,7 @@ export const idlFactory = ({ IDL }) => { const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const GetUpgradeJournalRequest = IDL.Record({}); const GetUpgradeJournalResponse = IDL.Record({ + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'upgrade_steps' : IDL.Opt(Versions), 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'target_version' : IDL.Opt(Version), @@ -622,6 +668,7 @@ export const init = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -682,6 +729,50 @@ export const init = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -718,7 +809,6 @@ export const init = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -993,6 +1083,7 @@ export const init = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), diff --git a/packages/sns/candid/sns_governance.d.ts b/packages/sns/candid/sns_governance.d.ts index 502e5eb3..5e74a053 100644 --- a/packages/sns/candid/sns_governance.d.ts +++ b/packages/sns/candid/sns_governance.d.ts @@ -227,6 +227,7 @@ export interface GetTimersResponse { } export type GetUpgradeJournalRequest = {}; export interface GetUpgradeJournalResponse { + upgrade_journal: [] | [UpgradeJournal]; upgrade_steps: [] | [Versions]; response_timestamp_seconds: [] | [bigint]; target_version: [] | [Version]; @@ -238,6 +239,7 @@ export interface Governance { id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>; metrics: [] | [GovernanceCachedMetrics]; maturity_modulation: [] | [MaturityModulation]; + upgrade_journal: [] | [UpgradeJournal]; mode: number; parameters: [] | [NervousSystemParameters]; is_finalizing_disburse_maturity: [] | [boolean]; @@ -546,9 +548,14 @@ export interface Tally { total: bigint; timestamp_seconds: bigint; } +export interface TargetVersionSet { + old_target_version: [] | [Version]; + new_target_version: [] | [Version]; +} export interface Timers { last_spawned_timestamp_seconds: [] | [bigint]; last_reset_timestamp_seconds: [] | [bigint]; + requires_periodic_tasks: [] | [boolean]; } export interface Tokens { e8s: [] | [bigint]; @@ -566,12 +573,51 @@ export interface UpgradeInProgress { proposal_id: bigint; target_version: [] | [Version]; } +export interface UpgradeJournal { + entries: Array; +} +export interface UpgradeJournalEntry { + event: + | [] + | [ + | { TargetVersionSet: TargetVersionSet } + | { UpgradeOutcome: UpgradeOutcome } + | { UpgradeStarted: UpgradeStarted } + | { UpgradeStepsRefreshed: UpgradeStepsRefreshed } + | { TargetVersionReset: TargetVersionSet }, + ]; + timestamp_seconds: [] | [bigint]; +} +export interface UpgradeOutcome { + status: + | [] + | [ + | { Success: {} } + | { Timeout: {} } + | { ExternalFailure: {} } + | { InvalidState: { version: [] | [Version] } }, + ]; + human_readable: [] | [string]; +} export interface UpgradeSnsControlledCanister { new_canister_wasm: Uint8Array | number[]; mode: [] | [number]; canister_id: [] | [Principal]; canister_upgrade_arg: [] | [Uint8Array | number[]]; } +export interface UpgradeStarted { + current_version: [] | [Version]; + expected_version: [] | [Version]; + reason: + | [] + | [ + | { UpgradeSnsToNextVersionProposal: ProposalId } + | { BehindTargetVersion: {} }, + ]; +} +export interface UpgradeStepsRefreshed { + upgrade_steps: [] | [Versions]; +} export interface Valuation { token: [] | [number]; account: [] | [Account]; diff --git a/packages/sns/candid/sns_governance.did b/packages/sns/candid/sns_governance.did index b4368899..cb4fe173 100644 --- a/packages/sns/candid/sns_governance.did +++ b/packages/sns/candid/sns_governance.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/sns/governance/canister/governance.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/sns/governance/canister/governance.did' by import-candid type Account = record { owner : opt principal; subaccount : opt Subaccount; @@ -291,11 +291,13 @@ type Governance = record { sns_metadata : opt ManageSnsMetadata; neurons : vec record { text; Neuron }; genesis_timestamp_seconds : nat64; - target_version: opt Version; + target_version : opt Version; timers : opt Timers; + upgrade_journal : opt UpgradeJournal; }; type Timers = record { + requires_periodic_tasks : opt bool; last_reset_timestamp_seconds : opt nat64; last_spawned_timestamp_seconds : opt nat64; }; @@ -719,12 +721,56 @@ type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64; }; +type UpgradeJournalEntry = record { + event : opt variant { + UpgradeStepsRefreshed : UpgradeStepsRefreshed; + TargetVersionSet : TargetVersionSet; + TargetVersionReset : TargetVersionSet; + UpgradeStarted : UpgradeStarted; + UpgradeOutcome : UpgradeOutcome; + }; + timestamp_seconds : opt nat64; +}; + +type UpgradeStepsRefreshed = record { + upgrade_steps : opt Versions; +}; + +type TargetVersionSet = record { + new_target_version : opt Version; + old_target_version : opt Version; +}; + +type UpgradeStarted = record { + current_version : opt Version; + expected_version : opt Version; + reason : opt variant { + UpgradeSnsToNextVersionProposal : ProposalId; + BehindTargetVersion : record {}; + } +}; + +type UpgradeOutcome = record { + human_readable : opt text; + status : opt variant { + Success : record {}; + Timeout : record {}; + InvalidState : record { version : opt Version }; + ExternalFailure : record {}; + }; +}; + +type UpgradeJournal = record { + entries : vec UpgradeJournalEntry; +}; + type GetUpgradeJournalRequest = record {}; type GetUpgradeJournalResponse = record { upgrade_steps : opt Versions; response_timestamp_seconds : opt nat64; target_version : opt Version; + upgrade_journal : opt UpgradeJournal; }; service : (Governance) -> { @@ -740,13 +786,9 @@ service : (Governance) -> { get_proposal : (GetProposal) -> (GetProposalResponse) query; get_root_canister_status : (null) -> (CanisterStatusResultV2); get_running_sns_version : (record {}) -> (GetRunningSnsVersionResponse) query; - get_sns_initialization_parameters : (record {}) -> ( - GetSnsInitializationParametersResponse, - ) query; + get_sns_initialization_parameters : (record {}) -> (GetSnsInitializationParametersResponse) query; get_upgrade_journal : (GetUpgradeJournalRequest) -> (GetUpgradeJournalResponse) query; - list_nervous_system_functions : () -> ( - ListNervousSystemFunctionsResponse, - ) query; + list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query; list_neurons : (ListNeurons) -> (ListNeuronsResponse) query; list_proposals : (ListProposals) -> (ListProposalsResponse) query; manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); diff --git a/packages/sns/candid/sns_governance.idl.js b/packages/sns/candid/sns_governance.idl.js index 796ee636..67b9e043 100644 --- a/packages/sns/candid/sns_governance.idl.js +++ b/packages/sns/candid/sns_governance.idl.js @@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -63,6 +64,50 @@ export const idlFactory = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -99,7 +144,6 @@ export const idlFactory = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -374,6 +418,7 @@ export const idlFactory = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), @@ -478,6 +523,7 @@ export const idlFactory = ({ IDL }) => { const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const GetUpgradeJournalRequest = IDL.Record({}); const GetUpgradeJournalResponse = IDL.Record({ + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'upgrade_steps' : IDL.Opt(Versions), 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'target_version' : IDL.Opt(Version), @@ -630,6 +676,7 @@ export const init = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -690,6 +737,50 @@ export const init = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -726,7 +817,6 @@ export const init = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -1001,6 +1091,7 @@ export const init = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), diff --git a/packages/sns/candid/sns_governance_test.certified.idl.js b/packages/sns/candid/sns_governance_test.certified.idl.js index a639a6cc..591d19f3 100644 --- a/packages/sns/candid/sns_governance_test.certified.idl.js +++ b/packages/sns/candid/sns_governance_test.certified.idl.js @@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -63,6 +64,50 @@ export const idlFactory = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -99,7 +144,6 @@ export const idlFactory = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -374,6 +418,7 @@ export const idlFactory = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), @@ -489,6 +534,7 @@ export const idlFactory = ({ IDL }) => { const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const GetUpgradeJournalRequest = IDL.Record({}); const GetUpgradeJournalResponse = IDL.Record({ + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'upgrade_steps' : IDL.Opt(Versions), 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'target_version' : IDL.Opt(Version), @@ -645,6 +691,7 @@ export const init = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -705,6 +752,50 @@ export const init = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -741,7 +832,6 @@ export const init = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -1016,6 +1106,7 @@ export const init = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), diff --git a/packages/sns/candid/sns_governance_test.d.ts b/packages/sns/candid/sns_governance_test.d.ts index f9373ecf..e76c069c 100644 --- a/packages/sns/candid/sns_governance_test.d.ts +++ b/packages/sns/candid/sns_governance_test.d.ts @@ -238,6 +238,7 @@ export interface GetTimersResponse { } export type GetUpgradeJournalRequest = {}; export interface GetUpgradeJournalResponse { + upgrade_journal: [] | [UpgradeJournal]; upgrade_steps: [] | [Versions]; response_timestamp_seconds: [] | [bigint]; target_version: [] | [Version]; @@ -249,6 +250,7 @@ export interface Governance { id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>; metrics: [] | [GovernanceCachedMetrics]; maturity_modulation: [] | [MaturityModulation]; + upgrade_journal: [] | [UpgradeJournal]; mode: number; parameters: [] | [NervousSystemParameters]; is_finalizing_disburse_maturity: [] | [boolean]; @@ -561,9 +563,14 @@ export interface Tally { total: bigint; timestamp_seconds: bigint; } +export interface TargetVersionSet { + old_target_version: [] | [Version]; + new_target_version: [] | [Version]; +} export interface Timers { last_spawned_timestamp_seconds: [] | [bigint]; last_reset_timestamp_seconds: [] | [bigint]; + requires_periodic_tasks: [] | [boolean]; } export interface Tokens { e8s: [] | [bigint]; @@ -581,12 +588,51 @@ export interface UpgradeInProgress { proposal_id: bigint; target_version: [] | [Version]; } +export interface UpgradeJournal { + entries: Array; +} +export interface UpgradeJournalEntry { + event: + | [] + | [ + | { TargetVersionSet: TargetVersionSet } + | { UpgradeOutcome: UpgradeOutcome } + | { UpgradeStarted: UpgradeStarted } + | { UpgradeStepsRefreshed: UpgradeStepsRefreshed } + | { TargetVersionReset: TargetVersionSet }, + ]; + timestamp_seconds: [] | [bigint]; +} +export interface UpgradeOutcome { + status: + | [] + | [ + | { Success: {} } + | { Timeout: {} } + | { ExternalFailure: {} } + | { InvalidState: { version: [] | [Version] } }, + ]; + human_readable: [] | [string]; +} export interface UpgradeSnsControlledCanister { new_canister_wasm: Uint8Array | number[]; mode: [] | [number]; canister_id: [] | [Principal]; canister_upgrade_arg: [] | [Uint8Array | number[]]; } +export interface UpgradeStarted { + current_version: [] | [Version]; + expected_version: [] | [Version]; + reason: + | [] + | [ + | { UpgradeSnsToNextVersionProposal: ProposalId } + | { BehindTargetVersion: {} }, + ]; +} +export interface UpgradeStepsRefreshed { + upgrade_steps: [] | [Versions]; +} export interface Valuation { token: [] | [number]; account: [] | [Account]; diff --git a/packages/sns/candid/sns_governance_test.did b/packages/sns/candid/sns_governance_test.did index 00252864..423c0ce8 100644 --- a/packages/sns/candid/sns_governance_test.did +++ b/packages/sns/candid/sns_governance_test.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/sns/governance/canister/governance_test.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/sns/governance/canister/governance_test.did' by import-candid type Account = record { owner : opt principal; subaccount : opt Subaccount; @@ -302,9 +302,11 @@ type Governance = record { genesis_timestamp_seconds : nat64; target_version: opt Version; timers : opt Timers; + upgrade_journal : opt UpgradeJournal; }; type Timers = record { + requires_periodic_tasks : opt bool; last_reset_timestamp_seconds : opt nat64; last_spawned_timestamp_seconds : opt nat64; }; @@ -733,12 +735,56 @@ type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64; }; +type UpgradeJournalEntry = record { + event : opt variant { + UpgradeStepsRefreshed : UpgradeStepsRefreshed; + TargetVersionSet : TargetVersionSet; + TargetVersionReset : TargetVersionSet; + UpgradeStarted : UpgradeStarted; + UpgradeOutcome : UpgradeOutcome; + }; + timestamp_seconds : opt nat64; +}; + +type UpgradeStepsRefreshed = record { + upgrade_steps : opt Versions; +}; + +type TargetVersionSet = record { + new_target_version : opt Version; + old_target_version : opt Version; +}; + +type UpgradeStarted = record { + current_version : opt Version; + expected_version : opt Version; + reason : opt variant { + UpgradeSnsToNextVersionProposal : ProposalId; + BehindTargetVersion : record {}; + } +}; + +type UpgradeOutcome = record { + human_readable : opt text; + status : opt variant { + Success : record {}; + Timeout : record {}; + InvalidState : record { version : opt Version }; + ExternalFailure : record {}; + }; +}; + +type UpgradeJournal = record { + entries : vec UpgradeJournalEntry; +}; + type GetUpgradeJournalRequest = record {}; type GetUpgradeJournalResponse = record { upgrade_steps : opt Versions; response_timestamp_seconds : opt nat64; target_version : opt Version; + upgrade_journal : opt UpgradeJournal; }; type AdvanceTargetVersionRequest = record { target_version : opt Version; }; diff --git a/packages/sns/candid/sns_governance_test.idl.js b/packages/sns/candid/sns_governance_test.idl.js index 815bce1a..31d3da71 100644 --- a/packages/sns/candid/sns_governance_test.idl.js +++ b/packages/sns/candid/sns_governance_test.idl.js @@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -63,6 +64,50 @@ export const idlFactory = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -99,7 +144,6 @@ export const idlFactory = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -374,6 +418,7 @@ export const idlFactory = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), @@ -489,6 +534,7 @@ export const idlFactory = ({ IDL }) => { const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const GetUpgradeJournalRequest = IDL.Record({}); const GetUpgradeJournalResponse = IDL.Record({ + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'upgrade_steps' : IDL.Opt(Versions), 'response_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'target_version' : IDL.Opt(Version), @@ -653,6 +699,7 @@ export const init = ({ IDL }) => { const Timers = IDL.Record({ 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), }); const Version = IDL.Record({ 'archive_wasm_hash' : IDL.Vec(IDL.Nat8), @@ -713,6 +760,50 @@ export const init = ({ IDL }) => { 'current_basis_points' : IDL.Opt(IDL.Int32), 'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64), }); + const TargetVersionSet = IDL.Record({ + 'old_target_version' : IDL.Opt(Version), + 'new_target_version' : IDL.Opt(Version), + }); + const UpgradeOutcome = IDL.Record({ + 'status' : IDL.Opt( + IDL.Variant({ + 'Success' : IDL.Record({}), + 'Timeout' : IDL.Record({}), + 'ExternalFailure' : IDL.Record({}), + 'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }), + }) + ), + 'human_readable' : IDL.Opt(IDL.Text), + }); + const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); + const UpgradeStarted = IDL.Record({ + 'current_version' : IDL.Opt(Version), + 'expected_version' : IDL.Opt(Version), + 'reason' : IDL.Opt( + IDL.Variant({ + 'UpgradeSnsToNextVersionProposal' : ProposalId, + 'BehindTargetVersion' : IDL.Record({}), + }) + ), + }); + const UpgradeStepsRefreshed = IDL.Record({ + 'upgrade_steps' : IDL.Opt(Versions), + }); + const UpgradeJournalEntry = IDL.Record({ + 'event' : IDL.Opt( + IDL.Variant({ + 'TargetVersionSet' : TargetVersionSet, + 'UpgradeOutcome' : UpgradeOutcome, + 'UpgradeStarted' : UpgradeStarted, + 'UpgradeStepsRefreshed' : UpgradeStepsRefreshed, + 'TargetVersionReset' : TargetVersionSet, + }) + ), + 'timestamp_seconds' : IDL.Opt(IDL.Nat64), + }); + const UpgradeJournal = IDL.Record({ + 'entries' : IDL.Vec(UpgradeJournalEntry), + }); const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) }); const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) }); const DefaultFollowees = IDL.Record({ @@ -749,7 +840,6 @@ export const init = ({ IDL }) => { 'maturity_modulation_disabled' : IDL.Opt(IDL.Bool), 'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64), }); - const ProposalId = IDL.Record({ 'id' : IDL.Nat64 }); const RewardEvent = IDL.Record({ 'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64), 'actual_timestamp_seconds' : IDL.Nat64, @@ -1024,6 +1114,7 @@ export const init = ({ IDL }) => { ), 'metrics' : IDL.Opt(GovernanceCachedMetrics), 'maturity_modulation' : IDL.Opt(MaturityModulation), + 'upgrade_journal' : IDL.Opt(UpgradeJournal), 'mode' : IDL.Int32, 'parameters' : IDL.Opt(NervousSystemParameters), 'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool), diff --git a/packages/sns/candid/sns_root.certified.idl.js b/packages/sns/candid/sns_root.certified.idl.js index 7d72b6bc..d81ae632 100644 --- a/packages/sns/candid/sns_root.certified.idl.js +++ b/packages/sns/candid/sns_root.certified.idl.js @@ -1,7 +1,13 @@ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */ export const idlFactory = ({ IDL }) => { + const Timers = IDL.Record({ + 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), + }); const SnsRootCanister = IDL.Record({ 'dapp_canister_ids' : IDL.Vec(IDL.Principal), + 'timers' : IDL.Opt(Timers), 'testflight' : IDL.Bool, 'archive_canister_ids' : IDL.Vec(IDL.Principal), 'governance_canister_id' : IDL.Opt(IDL.Principal), @@ -82,6 +88,7 @@ export const idlFactory = ({ IDL }) => { 'dapps' : IDL.Vec(CanisterSummary), 'archives' : IDL.Vec(CanisterSummary), }); + const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const ListSnsCanistersResponse = IDL.Record({ 'root' : IDL.Opt(IDL.Principal), 'swap' : IDL.Opt(IDL.Principal), @@ -137,6 +144,7 @@ export const idlFactory = ({ IDL }) => { [GetSnsCanistersSummaryResponse], [], ), + 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []), 'list_sns_canisters' : IDL.Func( [IDL.Record({})], [ListSnsCanistersResponse], @@ -157,6 +165,7 @@ export const idlFactory = ({ IDL }) => { [IDL.Record({})], [], ), + 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []), 'set_dapp_controllers' : IDL.Func( [SetDappControllersRequest], [SetDappControllersResponse], @@ -165,8 +174,14 @@ export const idlFactory = ({ IDL }) => { }); }; export const init = ({ IDL }) => { + const Timers = IDL.Record({ + 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), + }); const SnsRootCanister = IDL.Record({ 'dapp_canister_ids' : IDL.Vec(IDL.Principal), + 'timers' : IDL.Opt(Timers), 'testflight' : IDL.Bool, 'archive_canister_ids' : IDL.Vec(IDL.Principal), 'governance_canister_id' : IDL.Opt(IDL.Principal), diff --git a/packages/sns/candid/sns_root.d.ts b/packages/sns/candid/sns_root.d.ts index b3dd69f5..da3cee5a 100644 --- a/packages/sns/candid/sns_root.d.ts +++ b/packages/sns/candid/sns_root.d.ts @@ -79,6 +79,9 @@ export interface GetSnsCanistersSummaryResponse { dapps: Array; archives: Array; } +export interface GetTimersResponse { + timers: [] | [Timers]; +} export interface ListSnsCanistersResponse { root: [] | [Principal]; swap: [] | [Principal]; @@ -116,6 +119,7 @@ export interface SetDappControllersResponse { } export interface SnsRootCanister { dapp_canister_ids: Array; + timers: [] | [Timers]; testflight: boolean; archive_canister_ids: Array; governance_canister_id: [] | [Principal]; @@ -123,6 +127,11 @@ export interface SnsRootCanister { swap_canister_id: [] | [Principal]; ledger_canister_id: [] | [Principal]; } +export interface Timers { + last_spawned_timestamp_seconds: [] | [bigint]; + last_reset_timestamp_seconds: [] | [bigint]; + requires_periodic_tasks: [] | [boolean]; +} export interface _SERVICE { canister_status: ActorMethod<[CanisterIdRecord], CanisterStatusResult>; change_canister: ActorMethod<[ChangeCanisterRequest], undefined>; @@ -131,6 +140,7 @@ export interface _SERVICE { [GetSnsCanistersSummaryRequest], GetSnsCanistersSummaryResponse >; + get_timers: ActorMethod<[{}], GetTimersResponse>; list_sns_canisters: ActorMethod<[{}], ListSnsCanistersResponse>; manage_dapp_canister_settings: ActorMethod< [ManageDappCanisterSettingsRequest], @@ -138,6 +148,7 @@ export interface _SERVICE { >; register_dapp_canister: ActorMethod<[RegisterDappCanisterRequest], {}>; register_dapp_canisters: ActorMethod<[RegisterDappCanistersRequest], {}>; + reset_timers: ActorMethod<[{}], {}>; set_dapp_controllers: ActorMethod< [SetDappControllersRequest], SetDappControllersResponse diff --git a/packages/sns/candid/sns_root.did b/packages/sns/candid/sns_root.did index 8d1f49f2..50c43c56 100644 --- a/packages/sns/candid/sns_root.did +++ b/packages/sns/candid/sns_root.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/sns/root/canister/root.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/sns/root/canister/root.did' by import-candid type CanisterCallError = record { code : opt int32; description : text; @@ -145,6 +145,17 @@ type SnsRootCanister = record { index_canister_id : opt principal; swap_canister_id : opt principal; ledger_canister_id : opt principal; + timers : opt Timers; +}; + +type Timers = record { + requires_periodic_tasks : opt bool; + last_reset_timestamp_seconds : opt nat64; + last_spawned_timestamp_seconds : opt nat64; +}; + +type GetTimersResponse = record { + timers : opt Timers; }; service : (SnsRootCanister) -> { @@ -163,4 +174,6 @@ service : (SnsRootCanister) -> { set_dapp_controllers : (SetDappControllersRequest) -> ( SetDappControllersResponse, ); + reset_timers : (record {}) -> (record {}); + get_timers : (record {}) -> (GetTimersResponse) query; } diff --git a/packages/sns/candid/sns_root.idl.js b/packages/sns/candid/sns_root.idl.js index 91dd0e61..e3a9e12a 100644 --- a/packages/sns/candid/sns_root.idl.js +++ b/packages/sns/candid/sns_root.idl.js @@ -1,7 +1,13 @@ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */ export const idlFactory = ({ IDL }) => { + const Timers = IDL.Record({ + 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), + }); const SnsRootCanister = IDL.Record({ 'dapp_canister_ids' : IDL.Vec(IDL.Principal), + 'timers' : IDL.Opt(Timers), 'testflight' : IDL.Bool, 'archive_canister_ids' : IDL.Vec(IDL.Principal), 'governance_canister_id' : IDL.Opt(IDL.Principal), @@ -82,6 +88,7 @@ export const idlFactory = ({ IDL }) => { 'dapps' : IDL.Vec(CanisterSummary), 'archives' : IDL.Vec(CanisterSummary), }); + const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const ListSnsCanistersResponse = IDL.Record({ 'root' : IDL.Opt(IDL.Principal), 'swap' : IDL.Opt(IDL.Principal), @@ -137,6 +144,7 @@ export const idlFactory = ({ IDL }) => { [GetSnsCanistersSummaryResponse], [], ), + 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']), 'list_sns_canisters' : IDL.Func( [IDL.Record({})], [ListSnsCanistersResponse], @@ -157,6 +165,7 @@ export const idlFactory = ({ IDL }) => { [IDL.Record({})], [], ), + 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []), 'set_dapp_controllers' : IDL.Func( [SetDappControllersRequest], [SetDappControllersResponse], @@ -165,8 +174,14 @@ export const idlFactory = ({ IDL }) => { }); }; export const init = ({ IDL }) => { + const Timers = IDL.Record({ + 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64), + 'requires_periodic_tasks' : IDL.Opt(IDL.Bool), + }); const SnsRootCanister = IDL.Record({ 'dapp_canister_ids' : IDL.Vec(IDL.Principal), + 'timers' : IDL.Opt(Timers), 'testflight' : IDL.Bool, 'archive_canister_ids' : IDL.Vec(IDL.Principal), 'governance_canister_id' : IDL.Opt(IDL.Principal), diff --git a/packages/sns/candid/sns_swap.certified.idl.js b/packages/sns/candid/sns_swap.certified.idl.js index f1cc56ed..0fd643d1 100644 --- a/packages/sns/candid/sns_swap.certified.idl.js +++ b/packages/sns/candid/sns_swap.certified.idl.js @@ -297,6 +297,7 @@ export const idlFactory = ({ IDL }) => { 'swap' : IDL.Opt(Swap), 'derived' : IDL.Opt(DerivedState), }); + const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const ListCommunityFundParticipantsRequest = IDL.Record({ 'offset' : IDL.Opt(IDL.Nat64), 'limit' : IDL.Opt(IDL.Nat32), @@ -386,6 +387,7 @@ export const idlFactory = ({ IDL }) => { [], ), 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], []), + 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []), 'list_community_fund_participants' : IDL.Func( [ListCommunityFundParticipantsRequest], [ListCommunityFundParticipantsResponse], diff --git a/packages/sns/candid/sns_swap.d.ts b/packages/sns/candid/sns_swap.d.ts index 7297fb1c..936d4d11 100644 --- a/packages/sns/candid/sns_swap.d.ts +++ b/packages/sns/candid/sns_swap.d.ts @@ -142,6 +142,9 @@ export interface GetStateResponse { swap: [] | [Swap]; derived: [] | [DerivedState]; } +export interface GetTimersResponse { + timers: [] | [Timers]; +} export interface GovernanceError { error_message: string; error_type: number; @@ -383,6 +386,7 @@ export interface _SERVICE { get_open_ticket: ActorMethod<[{}], GetOpenTicketResponse>; get_sale_parameters: ActorMethod<[{}], GetSaleParametersResponse>; get_state: ActorMethod<[{}], GetStateResponse>; + get_timers: ActorMethod<[{}], GetTimersResponse>; list_community_fund_participants: ActorMethod< [ListCommunityFundParticipantsRequest], ListCommunityFundParticipantsResponse diff --git a/packages/sns/candid/sns_swap.did b/packages/sns/candid/sns_swap.did index b65e9d3b..386c537e 100644 --- a/packages/sns/candid/sns_swap.did +++ b/packages/sns/candid/sns_swap.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit a6ef593 (2024-10-24 tags: release-2024-10-23_03-07-ubuntu20.04) 'rs/sns/swap/canister/swap.did' by import-candid +// Generated from IC repo commit 51f6f4e (2024-10-31 tags: release-2024-10-31_03-09-ubuntu20.04) 'rs/sns/swap/canister/swap.did' by import-candid type BuyerState = record { icp : opt TransferableAmount; has_created_neuron_recipes : opt bool; @@ -422,6 +422,10 @@ type Timers = record { last_spawned_timestamp_seconds : opt nat64; }; +type GetTimersResponse = record { + timers : opt Timers; +}; + type SweepResult = record { failure : nat32; skipped : nat32; @@ -475,4 +479,5 @@ service : (Init) -> { RefreshBuyerTokensResponse, ); reset_timers : (record {}) -> (record {}); + get_timers : (record {}) -> (GetTimersResponse) query; } diff --git a/packages/sns/candid/sns_swap.idl.js b/packages/sns/candid/sns_swap.idl.js index c955b23f..57bb18e2 100644 --- a/packages/sns/candid/sns_swap.idl.js +++ b/packages/sns/candid/sns_swap.idl.js @@ -297,6 +297,7 @@ export const idlFactory = ({ IDL }) => { 'swap' : IDL.Opt(Swap), 'derived' : IDL.Opt(DerivedState), }); + const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) }); const ListCommunityFundParticipantsRequest = IDL.Record({ 'offset' : IDL.Opt(IDL.Nat64), 'limit' : IDL.Opt(IDL.Nat32), @@ -394,6 +395,7 @@ export const idlFactory = ({ IDL }) => { ['query'], ), 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], ['query']), + 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], ['query']), 'list_community_fund_participants' : IDL.Func( [ListCommunityFundParticipantsRequest], [ListCommunityFundParticipantsResponse],