From de1ad4c7aaab41fae83f50d95d8e97e2614aa956 Mon Sep 17 00:00:00 2001 From: gix-bot Date: Mon, 2 Sep 2024 03:33:06 +0000 Subject: [PATCH] Update IC commit --- packages/ckbtc/candid/minter.did | 2 +- packages/cketh/candid/minter.did | 2 +- packages/cketh/candid/orchestrator.did | 2 +- packages/cmc/candid/cmc.did | 2 +- 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 | 29 +- .../nns/candid/governance.certified.idl.js | 26 +- packages/nns/candid/governance.d.ts | 16 +- packages/nns/candid/governance.did | 468 ++++++++++++++--- packages/nns/candid/governance.idl.js | 26 +- .../candid/governance_test.certified.idl.js | 26 +- packages/nns/candid/governance_test.d.ts | 16 +- packages/nns/candid/governance_test.did | 470 +++++++++++++++--- packages/nns/candid/governance_test.idl.js | 26 +- packages/nns/candid/sns_wasm.did | 163 +++++- .../candid/sns_governance.certified.idl.js | 1 + packages/sns/candid/sns_governance.d.ts | 1 + packages/sns/candid/sns_governance.did | 321 ++++++++++-- packages/sns/candid/sns_governance.idl.js | 1 + .../sns_governance_test.certified.idl.js | 1 + packages/sns/candid/sns_governance_test.d.ts | 1 + packages/sns/candid/sns_governance_test.did | 333 +++++++++++-- .../sns/candid/sns_governance_test.idl.js | 1 + packages/sns/candid/sns_root.certified.idl.js | 1 + packages/sns/candid/sns_root.d.ts | 1 + packages/sns/candid/sns_root.did | 73 ++- packages/sns/candid/sns_root.idl.js | 1 + packages/sns/candid/sns_swap.certified.idl.js | 1 + packages/sns/candid/sns_swap.d.ts | 1 + packages/sns/candid/sns_swap.did | 228 +++++++-- packages/sns/candid/sns_swap.idl.js | 1 + 35 files changed, 1769 insertions(+), 482 deletions(-) diff --git a/packages/ckbtc/candid/minter.did b/packages/ckbtc/candid/minter.did index 31996799d..7eddba70c 100644 --- a/packages/ckbtc/candid/minter.did +++ b/packages/ckbtc/candid/minter.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) '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.did b/packages/cketh/candid/minter.did index 692c4904f..f01377aee 100644 --- a/packages/cketh/candid/minter.did +++ b/packages/cketh/candid/minter.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/ethereum/cketh/minter/cketh_minter.did' by import-candid type EthereumNetwork = variant { // The public Ethereum mainnet. Mainnet; diff --git a/packages/cketh/candid/orchestrator.did b/packages/cketh/candid/orchestrator.did index 82de2e1d3..aca297cfa 100644 --- a/packages/cketh/candid/orchestrator.did +++ b/packages/cketh/candid/orchestrator.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/ethereum/ledger-suite-orchestrator/ledger_suite_orchestrator.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) '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 36e6b7a23..35a927dc9 100644 --- a/packages/cmc/candid/cmc.did +++ b/packages/cmc/candid/cmc.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/cmc/cmc.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/cmc/cmc.did' by import-candid type Cycles = nat; type BlockIndex = nat64; type log_visibility = variant { diff --git a/packages/ledger-icp/candid/index.did b/packages/ledger-icp/candid/index.did index 50f98b037..d636775a8 100644 --- a/packages/ledger-icp/candid/index.did +++ b/packages/ledger-icp/candid/index.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icp_ledger/index/index.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icp_ledger/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 e3ec89945..fa6d02aed 100644 --- a/packages/ledger-icp/candid/ledger.did +++ b/packages/ledger-icp/candid/ledger.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icp_ledger/ledger.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/icp_ledger/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 88a8fd585..2bf9cea67 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/index-ng/index-ng.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/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 d0f495a72..4730793be 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/index/index.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/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 7882bf16e..ed055b2df 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 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/rosetta-api/icrc1/ledger/ledger.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/rosetta-api/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 cb66da43d..d6bcb7751 100644 --- a/packages/nns/candid/genesis_token.did +++ b/packages/nns/candid/genesis_token.did @@ -1,4 +1,4 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/gtc/canister/gtc.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/gtc/canister/gtc.did' by import-candid type AccountState = record { authenticated_principal_id : opt principal; successfully_transferred_neurons : vec TransferredNeuron; @@ -10,15 +10,32 @@ type AccountState = record { has_forwarded : bool; icpts : nat32; }; -type NeuronId = record { id : nat64 }; -type Result = variant { Ok : vec NeuronId; Err : text }; -type Result_1 = variant { Ok; Err : text }; -type Result_2 = variant { Ok : AccountState; Err : text }; + +type NeuronId = record { + id : nat64 +}; + +type Result = variant { + Ok : vec NeuronId; + Err : text +}; + +type Result_1 = variant { + Ok; + Err : text +}; + +type Result_2 = variant { + Ok : AccountState; + Err : text +}; + type TransferredNeuron = record { error : opt text; timestamp_seconds : nat64; neuron_id : opt NeuronId; }; + service : { balance : (text) -> (nat32) query; claim_neurons : (text) -> (Result); @@ -28,4 +45,4 @@ service : { get_build_metadata : () -> (text) query; len : () -> (nat16) query; total : () -> (nat32) query; -} \ No newline at end of file +} diff --git a/packages/nns/candid/governance.certified.idl.js b/packages/nns/candid/governance.certified.idl.js index b8e52c8e4..895853ea2 100644 --- a/packages/nns/candid/governance.certified.idl.js +++ b/packages/nns/candid/governance.certified.idl.js @@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -564,7 +553,6 @@ export const idlFactory = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, @@ -672,7 +660,7 @@ export const idlFactory = ({ IDL }) => { 'Err' : GovernanceError, }); const Result_4 = IDL.Variant({ - 'Ok' : RewardNodeProviders, + 'Ok' : MonthlyNodeProviderRewards, 'Err' : GovernanceError, }); const NeuronInfo = IDL.Record({ @@ -1457,17 +1445,6 @@ export const init = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -1545,7 +1522,6 @@ export const init = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, diff --git a/packages/nns/candid/governance.d.ts b/packages/nns/candid/governance.d.ts index d23b0bb0e..4f6c8e567 100644 --- a/packages/nns/candid/governance.d.ts +++ b/packages/nns/candid/governance.d.ts @@ -70,17 +70,6 @@ export interface CanisterSummary { status: [] | [CanisterStatusResultV2]; canister_id: [] | [Principal]; } -export interface CfNeuron { - has_created_neuron_recipes: [] | [boolean]; - hotkeys: [] | [Principals]; - nns_neuron_id: bigint; - amount_icp_e8s: bigint; -} -export interface CfParticipant { - controller: [] | [Principal]; - hotkey_principal: string; - cf_neurons: Array; -} export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider }; export interface ChangeAutoStakeMaturity { requested_setting_for_auto_stake_maturity: boolean; @@ -690,7 +679,6 @@ export type ProposalActionRequest = export interface ProposalData { id: [] | [NeuronId]; failure_reason: [] | [GovernanceError]; - cf_participants: Array; ballots: Array<[bigint, Ballot]>; proposal_timestamp_seconds: bigint; reward_event_round: bigint; @@ -750,7 +738,9 @@ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError }; export type Result_3 = | { Ok: GovernanceCachedMetrics } | { Err: GovernanceError }; -export type Result_4 = { Ok: RewardNodeProviders } | { Err: GovernanceError }; +export type Result_4 = + | { Ok: MonthlyNodeProviderRewards } + | { Err: GovernanceError }; export type Result_5 = { Ok: NeuronInfo } | { Err: GovernanceError }; export type Result_6 = { Ok: Ok } | { Err: GovernanceError }; export type Result_7 = { Ok: NodeProvider } | { Err: GovernanceError }; diff --git a/packages/nns/candid/governance.did b/packages/nns/candid/governance.did index 2dc697475..1fa9a04f8 100644 --- a/packages/nns/candid/governance.did +++ b/packages/nns/candid/governance.did @@ -1,5 +1,8 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/governance/canister/governance.did' by import-candid -type AccountIdentifier = record { hash : blob }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/governance/canister/governance.did' by import-candid +type AccountIdentifier = record { + hash : blob; +}; + type Action = variant { RegisterKnownNeuron : KnownNeuron; ManageNeuron : ManageNeuron; @@ -18,18 +21,43 @@ type Action = variant { AddOrRemoveNodeProvider : AddOrRemoveNodeProvider; Motion : Motion; }; -type AddHotKey = record { new_hot_key : opt principal }; -type AddOrRemoveNodeProvider = record { change : opt Change }; -type Amount = record { e8s : nat64 }; -type ApproveGenesisKyc = record { principals : vec principal }; -type Ballot = record { vote : int32; voting_power : nat64 }; -type BallotInfo = record { vote : int32; proposal_id : opt NeuronId }; + +type AddHotKey = record { + new_hot_key : opt principal; +}; + +type AddOrRemoveNodeProvider = record { + change : opt Change; +}; + +type Amount = record { + e8s : nat64; +}; + +type ApproveGenesisKyc = record { + principals : vec principal; +}; + +type Ballot = record { + vote : int32; + voting_power : nat64; +}; + +type BallotInfo = record { + vote : int32; + proposal_id : opt NeuronId; +}; + type By = variant { NeuronIdOrSubaccount : record {}; MemoAndController : ClaimOrRefreshNeuronFromAccount; Memo : nat64; }; -type Canister = record { id : opt principal }; + +type Canister = record { + id : opt principal; +}; + type CanisterSettings = record { freezing_threshold : opt nat64; controllers : opt Controllers; @@ -38,6 +66,7 @@ type CanisterSettings = record { memory_allocation : opt nat64; compute_allocation : opt nat64; }; + type CanisterStatusResultV2 = record { status : opt int32; freezing_threshold : opt nat64; @@ -47,32 +76,38 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : opt nat64; module_hash : blob; }; + type CanisterSummary = record { status : opt CanisterStatusResultV2; canister_id : opt principal; }; -type CfNeuron = record { - has_created_neuron_recipes : opt bool; - hotkeys : opt Principals; - nns_neuron_id : nat64; - amount_icp_e8s : nat64; + +type Change = variant { + ToRemove : NodeProvider; + ToAdd : NodeProvider; }; -type CfParticipant = record { - controller : opt principal; - hotkey_principal : text; - cf_neurons : vec CfNeuron; -}; -type Change = variant { ToRemove : NodeProvider; ToAdd : NodeProvider }; + type ChangeAutoStakeMaturity = record { requested_setting_for_auto_stake_maturity : bool; }; -type ClaimOrRefresh = record { by : opt By }; + +type ClaimOrRefresh = record { + by : opt By; +}; + type ClaimOrRefreshNeuronFromAccount = record { controller : opt principal; memo : nat64; }; -type ClaimOrRefreshNeuronFromAccountResponse = record { result : opt Result_1 }; -type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId }; + +type ClaimOrRefreshNeuronFromAccountResponse = record { + result : opt Result_1; +}; + +type ClaimOrRefreshResponse = record { + refreshed_neuron_id : opt NeuronId; +}; + type Command = variant { Spawn : Spawn; Split : Split; @@ -87,6 +122,7 @@ type Command = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Command_1 = variant { Error : GovernanceError; Spawn : SpawnResponse; @@ -102,6 +138,7 @@ type Command_1 = variant { MergeMaturity : MergeMaturityResponse; Disburse : DisburseResponse; }; + type Command_2 = variant { Spawn : NeuronId; Split : Split; @@ -113,19 +150,31 @@ type Command_2 = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Committed = record { total_direct_contribution_icp_e8s : opt nat64; total_neurons_fund_contribution_icp_e8s : opt nat64; sns_governance_canister_id : opt principal; }; + type Committed_1 = record { total_direct_participation_icp_e8s : opt nat64; total_neurons_fund_participation_icp_e8s : opt nat64; sns_governance_canister_id : opt principal; }; -type Configure = record { operation : opt Operation }; -type Controllers = record { controllers : vec principal }; -type Countries = record { iso_codes : vec text }; + +type Configure = record { + operation : opt Operation; +}; + +type Controllers = record { + controllers : vec principal; +}; + +type Countries = record { + iso_codes : vec text; +}; + type CreateServiceNervousSystem = record { url : opt text; governance_parameters : opt GovernanceParameters; @@ -138,22 +187,33 @@ type CreateServiceNervousSystem = record { swap_parameters : opt SwapParameters; initial_token_distribution : opt InitialTokenDistribution; }; + type DateRangeFilter = record { start_timestamp_seconds : opt nat64; end_timestamp_seconds : opt nat64; }; -type Decimal = record { human_readable : opt text }; + +type Decimal = record { + human_readable : opt text; +}; + type DerivedProposalInformation = record { swap_background_information : opt SwapBackgroundInformation; }; + type DeveloperDistribution = record { developer_neurons : vec NeuronDistribution; }; + type Disburse = record { to_account : opt AccountIdentifier; amount : opt Amount; }; -type DisburseResponse = record { transfer_block_height : nat64 }; + +type DisburseResponse = record { + transfer_block_height : nat64; +}; + type DisburseToNeuron = record { dissolve_delay_seconds : nat64; kyc_verified : bool; @@ -161,19 +221,50 @@ type DisburseToNeuron = record { new_controller : opt principal; nonce : nat64; }; + type DissolveState = variant { DissolveDelaySeconds : nat64; WhenDissolvedTimestampSeconds : nat64; }; -type Duration = record { seconds : opt nat64 }; -type ExecuteNnsFunction = record { nns_function : int32; payload : blob }; -type Follow = record { topic : int32; followees : vec NeuronId }; -type Followees = record { followees : vec NeuronId }; -type Followers = record { followers : vec NeuronId }; -type FollowersMap = record { followers_map : vec record { nat64; Followers } }; -type GetNeuronsFundAuditInfoRequest = record { nns_proposal_id : opt NeuronId }; -type GetNeuronsFundAuditInfoResponse = record { result : opt Result_6 }; -type GlobalTimeOfDay = record { seconds_after_utc_midnight : opt nat64 }; + +type Duration = record { + seconds : opt nat64; +}; + +type ExecuteNnsFunction = record { + nns_function : int32; + payload : blob; +}; + +type Follow = record { + topic : int32; + followees : vec NeuronId; +}; + +type Followees = record { + followees : vec NeuronId; +}; + +type Followers = record { + followers : vec NeuronId; +}; + +type FollowersMap = record { + followers_map : vec record { nat64; Followers }; +}; + +type GetNeuronsFundAuditInfoRequest = record { + nns_proposal_id : opt NeuronId; +}; + +type GetNeuronsFundAuditInfoResponse = record { + result : opt Result_6; +}; + +type GlobalTimeOfDay = record { + seconds_after_utc_midnight : opt nat64; +}; + type Governance = record { default_followees : vec record { int32; Followees }; making_sns_proposal : opt MakingSnsProposal; @@ -198,6 +289,7 @@ type Governance = record { neurons : vec record { nat64; Neuron }; genesis_timestamp_seconds : nat64; }; + type GovernanceCachedMetrics = record { total_maturity_e8s_equivalent : nat64; not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; @@ -245,7 +337,12 @@ type GovernanceCachedMetrics = record { timestamp_seconds : nat64; seed_neuron_count : nat64; }; -type GovernanceError = record { error_message : text; error_type : int32 }; + +type GovernanceError = record { + error_message : text; + error_type : int32; +}; + type GovernanceParameters = record { neuron_maximum_dissolve_delay_bonus : opt Percentage; neuron_maximum_age_for_age_bonus : opt Duration; @@ -258,18 +355,25 @@ type GovernanceParameters = record { proposal_rejection_fee : opt Tokens; voting_reward_parameters : opt VotingRewardParameters; }; + type IdealMatchedParticipationFunction = record { serialized_representation : opt text; }; -type Image = record { base64_encoding : opt text }; + +type Image = record { + base64_encoding : opt text; +}; + type IncreaseDissolveDelay = record { additional_dissolve_delay_seconds : nat32; }; + type InitialTokenDistribution = record { treasury_distribution : opt SwapDistribution; developer_distribution : opt DeveloperDistribution; swap_distribution : opt SwapDistribution; }; + type InstallCode = record { skip_stopping_before_installing : opt bool; wasm_module_hash : opt blob; @@ -277,6 +381,7 @@ type InstallCode = record { arg_hash : opt blob; install_mode : opt int32; }; + type InstallCodeRequest = record { arg : opt blob; wasm_module : opt blob; @@ -284,35 +389,52 @@ type InstallCodeRequest = record { canister_id : opt principal; install_mode : opt int32; }; + type KnownNeuron = record { id : opt NeuronId; known_neuron_data : opt KnownNeuronData; }; -type KnownNeuronData = record { name : text; description : opt text }; + +type KnownNeuronData = record { + name : text; + description : opt text; +}; + type LedgerParameters = record { transaction_fee : opt Tokens; token_symbol : opt text; token_logo : opt Image; token_name : opt text; }; -type ListKnownNeuronsResponse = record { known_neurons : vec KnownNeuron }; + +type ListKnownNeuronsResponse = record { + known_neurons : vec KnownNeuron; +}; + type ListNeurons = record { include_public_neurons_in_full_neurons : opt bool; neuron_ids : vec nat64; include_empty_neurons_readable_by_caller : opt bool; include_neurons_readable_by_caller : bool; }; + type ListNeuronsResponse = record { neuron_infos : vec record { nat64; NeuronInfo }; full_neurons : vec Neuron; }; + type ListNodeProviderRewardsRequest = record { date_filter : opt DateRangeFilter; }; + type ListNodeProviderRewardsResponse = record { rewards : vec MonthlyNodeProviderRewards; }; -type ListNodeProvidersResponse = record { node_providers : vec NodeProvider }; + +type ListNodeProvidersResponse = record { + node_providers : vec NodeProvider; +}; + type ListProposalInfo = record { include_reward_status : vec int32; omit_large_fields : opt bool; @@ -322,27 +444,35 @@ type ListProposalInfo = record { include_all_manage_neuron_proposals : opt bool; include_status : vec int32; }; -type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo }; + +type ListProposalInfoResponse = record { + proposal_info : vec ProposalInfo; +}; + type MakeProposalRequest = record { url : text; title : opt text; action : opt ProposalActionRequest; summary : text; }; + type MakeProposalResponse = record { message : opt text; proposal_id : opt NeuronId; }; + type MakingSnsProposal = record { proposal : opt Proposal; caller : opt principal; proposer_id : opt NeuronId; }; + type ManageNeuron = record { id : opt NeuronId; command : opt Command; neuron_id_or_subaccount : opt NeuronIdOrSubaccount; }; + type ManageNeuronCommandRequest = variant { Spawn : Spawn; Split : Split; @@ -357,33 +487,48 @@ type ManageNeuronCommandRequest = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type ManageNeuronRequest = record { id : opt NeuronId; command : opt ManageNeuronCommandRequest; neuron_id_or_subaccount : opt NeuronIdOrSubaccount; }; -type ManageNeuronResponse = record { command : opt Command_1 }; -type Merge = record { source_neuron_id : opt NeuronId }; -type MergeMaturity = record { percentage_to_merge : nat32 }; + +type ManageNeuronResponse = record { + command : opt Command_1; +}; + +type Merge = record { + source_neuron_id : opt NeuronId; +}; + +type MergeMaturity = record { + percentage_to_merge : nat32; +}; + type MergeMaturityResponse = record { merged_maturity_e8s : nat64; new_stake_e8s : nat64; }; + type MergeResponse = record { target_neuron : opt Neuron; source_neuron : opt Neuron; target_neuron_info : opt NeuronInfo; source_neuron_info : opt NeuronInfo; }; + type Migration = record { status : opt int32; failure_reason : opt text; progress : opt Progress; }; + type Migrations = record { neuron_indexes_migration : opt Migration; copy_inactive_neurons_to_stable_memory_migration : opt Migration; }; + type MonthlyNodeProviderRewards = record { minimum_xdr_permyriad_per_icp : opt nat64; registry_version : opt nat64; @@ -393,7 +538,11 @@ type MonthlyNodeProviderRewards = record { xdr_conversion_rate : opt XdrConversionRate; maximum_node_provider_rewards_e8s : opt nat64; }; -type Motion = record { motion_text : text }; + +type Motion = record { + motion_text : text; +}; + type NetworkEconomics = record { neuron_minimum_stake_e8s : nat64; max_proposals_to_keep_per_topic : nat32; @@ -405,6 +554,7 @@ type NetworkEconomics = record { maximum_node_provider_rewards_e8s : nat64; neurons_fund_economics : opt NeuronsFundEconomics; }; + type Neuron = record { id : opt NeuronId; staked_maturity_e8s_equivalent : opt nat64; @@ -429,14 +579,17 @@ type Neuron = record { known_neuron_data : opt KnownNeuronData; spawn_at_timestamp_seconds : opt nat64; }; + type NeuronBasketConstructionParameters = record { dissolve_delay_interval : opt Duration; count : opt nat64; }; + type NeuronBasketConstructionParameters_1 = record { dissolve_delay_interval_seconds : nat64; count : nat64; }; + type NeuronDistribution = record { controller : opt principal; dissolve_delay : opt Duration; @@ -444,12 +597,21 @@ type NeuronDistribution = record { vesting_period : opt Duration; stake : opt Tokens; }; -type NeuronId = record { id : nat64 }; -type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId }; + +type NeuronId = record { + id : nat64; +}; + +type NeuronIdOrSubaccount = variant { + Subaccount : blob; + NeuronId : NeuronId; +}; + type NeuronInFlightCommand = record { command : opt Command_2; timestamp : nat64; }; + type NeuronInfo = record { dissolve_delay_seconds : nat64; recent_ballots : vec BallotInfo; @@ -464,6 +626,7 @@ type NeuronInfo = record { voting_power : nat64; age_seconds : nat64; }; + type NeuronStakeTransfer = record { to_subaccount : blob; neuron_stake_e8s : nat64; @@ -473,6 +636,7 @@ type NeuronStakeTransfer = record { transfer_timestamp : nat64; block_height : nat64; }; + type NeuronSubsetMetrics = record { total_maturity_e8s_equivalent : opt nat64; maturity_e8s_equivalent_buckets : vec record { nat64; nat64 }; @@ -485,27 +649,32 @@ type NeuronSubsetMetrics = record { total_voting_power : opt nat64; count_buckets : vec record { nat64; nat64 }; }; + type NeuronsFundAuditInfo = record { final_neurons_fund_participation : opt NeuronsFundParticipation; initial_neurons_fund_participation : opt NeuronsFundParticipation; neurons_fund_refunds : opt NeuronsFundSnapshot; }; + type NeuronsFundData = record { final_neurons_fund_participation : opt NeuronsFundParticipation; initial_neurons_fund_participation : opt NeuronsFundParticipation; neurons_fund_refunds : opt NeuronsFundSnapshot; }; + type NeuronsFundEconomics = record { maximum_icp_xdr_rate : opt Percentage; neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients; max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal; minimum_icp_xdr_rate : opt Percentage; }; + type NeuronsFundMatchedFundingCurveCoefficients = record { contribution_threshold_xdr : opt Decimal; one_third_participation_milestone_xdr : opt Decimal; full_participation_milestone_xdr : opt Decimal; }; + type NeuronsFundNeuron = record { controller : opt principal; hotkey_principal : opt text; @@ -514,6 +683,7 @@ type NeuronsFundNeuron = record { nns_neuron_id : opt nat64; amount_icp_e8s : opt nat64; }; + type NeuronsFundNeuronPortion = record { controller : opt principal; hotkey_principal : opt principal; @@ -523,6 +693,7 @@ type NeuronsFundNeuronPortion = record { nns_neuron_id : opt NeuronId; amount_icp_e8s : opt nat64; }; + type NeuronsFundParticipation = record { total_maturity_equivalent_icp_e8s : opt nat64; intended_neurons_fund_participation_icp_e8s : opt nat64; @@ -533,20 +704,30 @@ type NeuronsFundParticipation = record { ideal_matched_participation_function : opt IdealMatchedParticipationFunction; allocated_neurons_fund_participation_icp_e8s : opt nat64; }; + type NeuronsFundSnapshot = record { neurons_fund_neuron_portions : vec NeuronsFundNeuronPortion; }; + type NodeProvider = record { id : opt principal; reward_account : opt AccountIdentifier; }; -type Ok = record { neurons_fund_audit_info : opt NeuronsFundAuditInfo }; -type Ok_1 = record { neurons_fund_neuron_portions : vec NeuronsFundNeuron }; + +type Ok = record { + neurons_fund_audit_info : opt NeuronsFundAuditInfo; +}; + +type Ok_1 = record { + neurons_fund_neuron_portions : vec NeuronsFundNeuron; +}; + type OpenSnsTokenSwap = record { community_fund_investment_e8s : opt nat64; target_swap_canister_id : opt principal; params : opt Params; }; + type Operation = variant { RemoveHotKey : RemoveHotKey; AddHotKey : AddHotKey; @@ -559,6 +740,7 @@ type Operation = variant { LeaveCommunityFund : record {}; SetDissolveTimestamp : SetDissolveTimestamp; }; + type Params = record { min_participant_icp_e8s : nat64; neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters_1; @@ -572,15 +754,26 @@ type Params = record { min_icp_e8s : nat64; max_direct_participation_icp_e8s : opt nat64; }; -type Percentage = record { basis_points : opt nat64 }; -type Principals = record { principals : vec principal }; -type Progress = variant { LastNeuronId : NeuronId }; + +type Percentage = record { + basis_points : opt nat64; +}; + +type Principals = record { + principals : vec principal; +}; + +type Progress = variant { + LastNeuronId : NeuronId; +}; + type Proposal = record { url : text; title : opt text; action : opt Action; summary : text; }; + type ProposalActionRequest = variant { RegisterKnownNeuron : KnownNeuron; ManageNeuron : ManageNeuronRequest; @@ -599,10 +792,10 @@ type ProposalActionRequest = variant { AddOrRemoveNodeProvider : AddOrRemoveNodeProvider; Motion : Motion; }; + type ProposalData = record { id : opt NeuronId; failure_reason : opt GovernanceError; - cf_participants : vec CfParticipant; ballots : vec record { nat64; Ballot }; proposal_timestamp_seconds : nat64; reward_event_round : nat64; @@ -619,6 +812,7 @@ type ProposalData = record { executed_timestamp_seconds : nat64; original_total_community_fund_maturity_e8s_equivalent : opt nat64; }; + type ProposalInfo = record { id : opt NeuronId; status : int32; @@ -638,29 +832,81 @@ type ProposalInfo = record { proposer : opt NeuronId; executed_timestamp_seconds : nat64; }; -type RegisterVote = record { vote : int32; proposal : opt NeuronId }; -type RemoveHotKey = record { hot_key_to_remove : opt principal }; + +type RegisterVote = record { + vote : int32; + proposal : opt NeuronId; +}; + +type RemoveHotKey = record { + hot_key_to_remove : opt principal; +}; + type RestoreAgingNeuronGroup = record { count : opt nat64; previous_total_stake_e8s : opt nat64; current_total_stake_e8s : opt nat64; group_type : int32; }; + type RestoreAgingSummary = record { groups : vec RestoreAgingNeuronGroup; timestamp_seconds : opt nat64; }; -type Result = variant { Ok; Err : GovernanceError }; -type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId }; -type Result_10 = variant { Ok : Ok_1; Err : GovernanceError }; -type Result_2 = variant { Ok : Neuron; Err : GovernanceError }; -type Result_3 = variant { Ok : GovernanceCachedMetrics; Err : GovernanceError }; -type Result_4 = variant { Ok : RewardNodeProviders; Err : GovernanceError }; -type Result_5 = variant { Ok : NeuronInfo; Err : GovernanceError }; -type Result_6 = variant { Ok : Ok; Err : GovernanceError }; -type Result_7 = variant { Ok : NodeProvider; Err : GovernanceError }; -type Result_8 = variant { Committed : Committed; Aborted : record {} }; -type Result_9 = variant { Committed : Committed_1; Aborted : record {} }; + +type Result = variant { + Ok; + Err : GovernanceError; +}; + +type Result_1 = variant { + Error : GovernanceError; + NeuronId : NeuronId; +}; + +type Result_10 = variant { + Ok : Ok_1; + Err : GovernanceError; +}; + +type Result_2 = variant { + Ok : Neuron; + Err : GovernanceError; +}; + +type Result_3 = variant { + Ok : GovernanceCachedMetrics; + Err : GovernanceError; +}; + +type Result_4 = variant { + Ok : MonthlyNodeProviderRewards; + Err : GovernanceError; +}; + +type Result_5 = variant { + Ok : NeuronInfo; + Err : GovernanceError; +}; + +type Result_6 = variant { + Ok : Ok; + Err : GovernanceError; +}; + +type Result_7 = variant { + Ok : NodeProvider; + Err : GovernanceError; +}; + +type Result_8 = variant { + Committed : Committed; + Aborted : record {} }; + +type Result_9 = variant { + Committed : Committed_1; + Aborted : record {} }; + type RewardEvent = record { rounds_since_last_distribution : opt nat64; day_after_genesis : nat64; @@ -670,56 +916,94 @@ type RewardEvent = record { distributed_e8s_equivalent : nat64; settled_proposals : vec NeuronId; }; + type RewardMode = variant { RewardToNeuron : RewardToNeuron; RewardToAccount : RewardToAccount; }; + type RewardNodeProvider = record { node_provider : opt NodeProvider; reward_mode : opt RewardMode; amount_e8s : nat64; }; + type RewardNodeProviders = record { use_registry_derived_rewards : opt bool; rewards : vec RewardNodeProvider; }; -type RewardToAccount = record { to_account : opt AccountIdentifier }; -type RewardToNeuron = record { dissolve_delay_seconds : nat64 }; + +type RewardToAccount = record { + to_account : opt AccountIdentifier; +}; + +type RewardToNeuron = record { + dissolve_delay_seconds : nat64; +}; + type SetDefaultFollowees = record { default_followees : vec record { int32; Followees }; }; -type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 }; -type SetOpenTimeWindowRequest = record { open_time_window : opt TimeWindow }; + +type SetDissolveTimestamp = record { + dissolve_timestamp_seconds : nat64; +}; + +type SetOpenTimeWindowRequest = record { + open_time_window : opt TimeWindow; +}; + type SetSnsTokenSwapOpenTimeWindow = record { request : opt SetOpenTimeWindowRequest; swap_canister_id : opt principal; }; -type SetVisibility = record { visibility : opt int32 }; + +type SetVisibility = record { + visibility : opt int32; +}; + type SettleCommunityFundParticipation = record { result : opt Result_8; open_sns_token_swap_proposal_id : opt nat64; }; + type SettleNeuronsFundParticipationRequest = record { result : opt Result_9; nns_proposal_id : opt nat64; }; -type SettleNeuronsFundParticipationResponse = record { result : opt Result_10 }; + +type SettleNeuronsFundParticipationResponse = record { + result : opt Result_10; +}; + type Spawn = record { percentage_to_spawn : opt nat32; new_controller : opt principal; nonce : opt nat64; }; -type SpawnResponse = record { created_neuron_id : opt NeuronId }; -type Split = record { amount_e8s : nat64 }; -type StakeMaturity = record { percentage_to_stake : opt nat32 }; + +type SpawnResponse = record { + created_neuron_id : opt NeuronId; +}; + +type Split = record { + amount_e8s : nat64; +}; + +type StakeMaturity = record { + percentage_to_stake : opt nat32; +}; + type StakeMaturityResponse = record { maturity_e8s : nat64; staked_maturity_e8s : nat64; }; + type StopOrStartCanister = record { action : opt int32; canister_id : opt principal; }; + type SwapBackgroundInformation = record { ledger_index_canister_summary : opt CanisterSummary; fallback_controller_principal_ids : vec principal; @@ -730,7 +1014,11 @@ type SwapBackgroundInformation = record { root_canister_summary : opt CanisterSummary; dapp_canister_summaries : vec CanisterSummary; }; -type SwapDistribution = record { total : opt Tokens }; + +type SwapDistribution = record { + total : opt Tokens; +}; + type SwapParameters = record { minimum_participants : opt nat64; neurons_fund_participation : opt bool; @@ -747,38 +1035,54 @@ type SwapParameters = record { neurons_fund_investment_icp : opt Tokens; restricted_countries : opt Countries; }; + type SwapParticipationLimits = record { min_participant_icp_e8s : opt nat64; max_participant_icp_e8s : opt nat64; min_direct_participation_icp_e8s : opt nat64; max_direct_participation_icp_e8s : opt nat64; }; + type Tally = record { no : nat64; yes : nat64; total : nat64; timestamp_seconds : nat64; }; + type TimeWindow = record { start_timestamp_seconds : nat64; end_timestamp_seconds : nat64; }; -type Tokens = record { e8s : opt nat64 }; + +type Tokens = record { + e8s : opt nat64; +}; + type UpdateCanisterSettings = record { canister_id : opt principal; settings : opt CanisterSettings; }; -type UpdateNodeProvider = record { reward_account : opt AccountIdentifier }; + +type UpdateNodeProvider = record { + reward_account : opt AccountIdentifier; +}; + type VotingRewardParameters = record { reward_rate_transition_duration : opt Duration; initial_reward_rate : opt Percentage; final_reward_rate : opt Percentage; }; -type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 }; + +type WaitForQuietState = record { + current_deadline_timestamp_seconds : nat64; +}; + type XdrConversionRate = record { xdr_permyriad_per_icp : opt nat64; timestamp_seconds : opt nat64; }; + service : (Governance) -> { claim_gtc_neurons : (principal, vec NeuronId) -> (Result); claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> ( @@ -825,4 +1129,4 @@ service : (Governance) -> { simulate_manage_neuron : (ManageNeuronRequest) -> (ManageNeuronResponse); transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result); update_node_provider : (UpdateNodeProvider) -> (Result); -} \ No newline at end of file +} diff --git a/packages/nns/candid/governance.idl.js b/packages/nns/candid/governance.idl.js index f162cc85e..ddab20e26 100644 --- a/packages/nns/candid/governance.idl.js +++ b/packages/nns/candid/governance.idl.js @@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -564,7 +553,6 @@ export const idlFactory = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, @@ -672,7 +660,7 @@ export const idlFactory = ({ IDL }) => { 'Err' : GovernanceError, }); const Result_4 = IDL.Variant({ - 'Ok' : RewardNodeProviders, + 'Ok' : MonthlyNodeProviderRewards, 'Err' : GovernanceError, }); const NeuronInfo = IDL.Record({ @@ -1473,17 +1461,6 @@ export const init = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -1561,7 +1538,6 @@ export const init = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, diff --git a/packages/nns/candid/governance_test.certified.idl.js b/packages/nns/candid/governance_test.certified.idl.js index 522a0afa4..55265d672 100644 --- a/packages/nns/candid/governance_test.certified.idl.js +++ b/packages/nns/candid/governance_test.certified.idl.js @@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -564,7 +553,6 @@ export const idlFactory = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, @@ -672,7 +660,7 @@ export const idlFactory = ({ IDL }) => { 'Err' : GovernanceError, }); const Result_4 = IDL.Variant({ - 'Ok' : RewardNodeProviders, + 'Ok' : MonthlyNodeProviderRewards, 'Err' : GovernanceError, }); const NeuronInfo = IDL.Record({ @@ -1458,17 +1446,6 @@ export const init = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -1546,7 +1523,6 @@ export const init = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, diff --git a/packages/nns/candid/governance_test.d.ts b/packages/nns/candid/governance_test.d.ts index 032100fbf..9c1c3e473 100644 --- a/packages/nns/candid/governance_test.d.ts +++ b/packages/nns/candid/governance_test.d.ts @@ -70,17 +70,6 @@ export interface CanisterSummary { status: [] | [CanisterStatusResultV2]; canister_id: [] | [Principal]; } -export interface CfNeuron { - has_created_neuron_recipes: [] | [boolean]; - hotkeys: [] | [Principals]; - nns_neuron_id: bigint; - amount_icp_e8s: bigint; -} -export interface CfParticipant { - controller: [] | [Principal]; - hotkey_principal: string; - cf_neurons: Array; -} export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider }; export interface ChangeAutoStakeMaturity { requested_setting_for_auto_stake_maturity: boolean; @@ -690,7 +679,6 @@ export type ProposalActionRequest = export interface ProposalData { id: [] | [NeuronId]; failure_reason: [] | [GovernanceError]; - cf_participants: Array; ballots: Array<[bigint, Ballot]>; proposal_timestamp_seconds: bigint; reward_event_round: bigint; @@ -750,7 +738,9 @@ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError }; export type Result_3 = | { Ok: GovernanceCachedMetrics } | { Err: GovernanceError }; -export type Result_4 = { Ok: RewardNodeProviders } | { Err: GovernanceError }; +export type Result_4 = + | { Ok: MonthlyNodeProviderRewards } + | { Err: GovernanceError }; export type Result_5 = { Ok: NeuronInfo } | { Err: GovernanceError }; export type Result_6 = { Ok: Ok } | { Err: GovernanceError }; export type Result_7 = { Ok: NodeProvider } | { Err: GovernanceError }; diff --git a/packages/nns/candid/governance_test.did b/packages/nns/candid/governance_test.did index 69fec8f36..c6c88c893 100644 --- a/packages/nns/candid/governance_test.did +++ b/packages/nns/candid/governance_test.did @@ -1,5 +1,8 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/governance/canister/governance_test.did' by import-candid -type AccountIdentifier = record { hash : blob }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/governance/canister/governance_test.did' by import-candid +type AccountIdentifier = record { + hash : blob; +}; + type Action = variant { RegisterKnownNeuron : KnownNeuron; ManageNeuron : ManageNeuron; @@ -18,18 +21,43 @@ type Action = variant { AddOrRemoveNodeProvider : AddOrRemoveNodeProvider; Motion : Motion; }; -type AddHotKey = record { new_hot_key : opt principal }; -type AddOrRemoveNodeProvider = record { change : opt Change }; -type Amount = record { e8s : nat64 }; -type ApproveGenesisKyc = record { principals : vec principal }; -type Ballot = record { vote : int32; voting_power : nat64 }; -type BallotInfo = record { vote : int32; proposal_id : opt NeuronId }; + +type AddHotKey = record { + new_hot_key : opt principal; +}; + +type AddOrRemoveNodeProvider = record { + change : opt Change; +}; + +type Amount = record { + e8s : nat64; +}; + +type ApproveGenesisKyc = record { + principals : vec principal; +}; + +type Ballot = record { + vote : int32; + voting_power : nat64; +}; + +type BallotInfo = record { + vote : int32; + proposal_id : opt NeuronId; +}; + type By = variant { NeuronIdOrSubaccount : record {}; MemoAndController : ClaimOrRefreshNeuronFromAccount; Memo : nat64; }; -type Canister = record { id : opt principal }; + +type Canister = record { + id : opt principal; +}; + type CanisterSettings = record { freezing_threshold : opt nat64; controllers : opt Controllers; @@ -38,6 +66,7 @@ type CanisterSettings = record { memory_allocation : opt nat64; compute_allocation : opt nat64; }; + type CanisterStatusResultV2 = record { status : opt int32; freezing_threshold : opt nat64; @@ -47,32 +76,38 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : opt nat64; module_hash : blob; }; + type CanisterSummary = record { status : opt CanisterStatusResultV2; canister_id : opt principal; }; -type CfNeuron = record { - has_created_neuron_recipes : opt bool; - hotkeys : opt Principals; - nns_neuron_id : nat64; - amount_icp_e8s : nat64; -}; -type CfParticipant = record { - controller : opt principal; - hotkey_principal : text; - cf_neurons : vec CfNeuron; + +type Change = variant { + ToRemove : NodeProvider; + ToAdd : NodeProvider; }; -type Change = variant { ToRemove : NodeProvider; ToAdd : NodeProvider }; + type ChangeAutoStakeMaturity = record { requested_setting_for_auto_stake_maturity : bool; }; -type ClaimOrRefresh = record { by : opt By }; + +type ClaimOrRefresh = record { + by : opt By; +}; + type ClaimOrRefreshNeuronFromAccount = record { controller : opt principal; memo : nat64; }; -type ClaimOrRefreshNeuronFromAccountResponse = record { result : opt Result_1 }; -type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId }; + +type ClaimOrRefreshNeuronFromAccountResponse = record { + result : opt Result_1; +}; + +type ClaimOrRefreshResponse = record { + refreshed_neuron_id : opt NeuronId; +}; + type Command = variant { Spawn : Spawn; Split : Split; @@ -87,6 +122,7 @@ type Command = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Command_1 = variant { Error : GovernanceError; Spawn : SpawnResponse; @@ -102,6 +138,7 @@ type Command_1 = variant { MergeMaturity : MergeMaturityResponse; Disburse : DisburseResponse; }; + type Command_2 = variant { Spawn : NeuronId; Split : Split; @@ -113,19 +150,31 @@ type Command_2 = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Committed = record { total_direct_contribution_icp_e8s : opt nat64; total_neurons_fund_contribution_icp_e8s : opt nat64; sns_governance_canister_id : opt principal; }; + type Committed_1 = record { total_direct_participation_icp_e8s : opt nat64; total_neurons_fund_participation_icp_e8s : opt nat64; sns_governance_canister_id : opt principal; }; -type Configure = record { operation : opt Operation }; -type Controllers = record { controllers : vec principal }; -type Countries = record { iso_codes : vec text }; + +type Configure = record { + operation : opt Operation; +}; + +type Controllers = record { + controllers : vec principal; +}; + +type Countries = record { + iso_codes : vec text; +}; + type CreateServiceNervousSystem = record { url : opt text; governance_parameters : opt GovernanceParameters; @@ -138,22 +187,33 @@ type CreateServiceNervousSystem = record { swap_parameters : opt SwapParameters; initial_token_distribution : opt InitialTokenDistribution; }; + type DateRangeFilter = record { start_timestamp_seconds : opt nat64; end_timestamp_seconds : opt nat64; }; -type Decimal = record { human_readable : opt text }; + +type Decimal = record { + human_readable : opt text; +}; + type DerivedProposalInformation = record { swap_background_information : opt SwapBackgroundInformation; }; + type DeveloperDistribution = record { developer_neurons : vec NeuronDistribution; }; + type Disburse = record { to_account : opt AccountIdentifier; amount : opt Amount; }; -type DisburseResponse = record { transfer_block_height : nat64 }; + +type DisburseResponse = record { + transfer_block_height : nat64; +}; + type DisburseToNeuron = record { dissolve_delay_seconds : nat64; kyc_verified : bool; @@ -161,19 +221,52 @@ type DisburseToNeuron = record { new_controller : opt principal; nonce : nat64; }; + type DissolveState = variant { DissolveDelaySeconds : nat64; WhenDissolvedTimestampSeconds : nat64; }; -type Duration = record { seconds : opt nat64 }; -type ExecuteNnsFunction = record { nns_function : int32; payload : blob }; -type Follow = record { topic : int32; followees : vec NeuronId }; -type Followees = record { followees : vec NeuronId }; -type Followers = record { followers : vec NeuronId }; -type FollowersMap = record { followers_map : vec record { nat64; Followers } }; -type GetNeuronsFundAuditInfoRequest = record { nns_proposal_id : opt NeuronId }; -type GetNeuronsFundAuditInfoResponse = record { result : opt Result_6 }; -type GlobalTimeOfDay = record { seconds_after_utc_midnight : opt nat64 }; + +type Duration = record { + seconds : opt nat64; +}; + +type ExecuteNnsFunction = record { + nns_function : int32; + payload : blob; +}; + +type Follow = record { + topic : int32; + followees : vec NeuronId; +}; + +type Followees = record { + followees : vec NeuronId; +}; + +type Followers = record { + followers : vec NeuronId; +}; + +type FollowersMap = record { + followers_map : vec record { + nat64; + Followers; +} }; + +type GetNeuronsFundAuditInfoRequest = record { + nns_proposal_id : opt NeuronId; +}; + +type GetNeuronsFundAuditInfoResponse = record { + result : opt Result_6; +}; + +type GlobalTimeOfDay = record { + seconds_after_utc_midnight : opt nat64; +}; + type Governance = record { default_followees : vec record { int32; Followees }; making_sns_proposal : opt MakingSnsProposal; @@ -198,6 +291,7 @@ type Governance = record { neurons : vec record { nat64; Neuron }; genesis_timestamp_seconds : nat64; }; + type GovernanceCachedMetrics = record { total_maturity_e8s_equivalent : nat64; not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; @@ -245,7 +339,12 @@ type GovernanceCachedMetrics = record { timestamp_seconds : nat64; seed_neuron_count : nat64; }; -type GovernanceError = record { error_message : text; error_type : int32 }; + +type GovernanceError = record { + error_message : text; + error_type : int32; +}; + type GovernanceParameters = record { neuron_maximum_dissolve_delay_bonus : opt Percentage; neuron_maximum_age_for_age_bonus : opt Duration; @@ -258,18 +357,25 @@ type GovernanceParameters = record { proposal_rejection_fee : opt Tokens; voting_reward_parameters : opt VotingRewardParameters; }; + type IdealMatchedParticipationFunction = record { serialized_representation : opt text; }; -type Image = record { base64_encoding : opt text }; + +type Image = record { + base64_encoding : opt text; +}; + type IncreaseDissolveDelay = record { additional_dissolve_delay_seconds : nat32; }; + type InitialTokenDistribution = record { treasury_distribution : opt SwapDistribution; developer_distribution : opt DeveloperDistribution; swap_distribution : opt SwapDistribution; }; + type InstallCode = record { skip_stopping_before_installing : opt bool; wasm_module_hash : opt blob; @@ -277,6 +383,7 @@ type InstallCode = record { arg_hash : opt blob; install_mode : opt int32; }; + type InstallCodeRequest = record { arg : opt blob; wasm_module : opt blob; @@ -284,35 +391,52 @@ type InstallCodeRequest = record { canister_id : opt principal; install_mode : opt int32; }; + type KnownNeuron = record { id : opt NeuronId; known_neuron_data : opt KnownNeuronData; }; -type KnownNeuronData = record { name : text; description : opt text }; + +type KnownNeuronData = record { + name : text; + description : opt text; +}; + type LedgerParameters = record { transaction_fee : opt Tokens; token_symbol : opt text; token_logo : opt Image; token_name : opt text; }; -type ListKnownNeuronsResponse = record { known_neurons : vec KnownNeuron }; + +type ListKnownNeuronsResponse = record { + known_neurons : vec KnownNeuron; +}; + type ListNeurons = record { include_public_neurons_in_full_neurons : opt bool; neuron_ids : vec nat64; include_empty_neurons_readable_by_caller : opt bool; include_neurons_readable_by_caller : bool; }; + type ListNeuronsResponse = record { neuron_infos : vec record { nat64; NeuronInfo }; full_neurons : vec Neuron; }; + type ListNodeProviderRewardsRequest = record { date_filter : opt DateRangeFilter; }; + type ListNodeProviderRewardsResponse = record { rewards : vec MonthlyNodeProviderRewards; }; -type ListNodeProvidersResponse = record { node_providers : vec NodeProvider }; + +type ListNodeProvidersResponse = record { + node_providers : vec NodeProvider; +}; + type ListProposalInfo = record { include_reward_status : vec int32; omit_large_fields : opt bool; @@ -322,27 +446,35 @@ type ListProposalInfo = record { include_all_manage_neuron_proposals : opt bool; include_status : vec int32; }; -type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo }; + +type ListProposalInfoResponse = record { + proposal_info : vec ProposalInfo; +}; + type MakeProposalRequest = record { url : text; title : opt text; action : opt ProposalActionRequest; summary : text; }; + type MakeProposalResponse = record { message : opt text; proposal_id : opt NeuronId; }; + type MakingSnsProposal = record { proposal : opt Proposal; caller : opt principal; proposer_id : opt NeuronId; }; + type ManageNeuron = record { id : opt NeuronId; command : opt Command; neuron_id_or_subaccount : opt NeuronIdOrSubaccount; }; + type ManageNeuronCommandRequest = variant { Spawn : Spawn; Split : Split; @@ -357,33 +489,48 @@ type ManageNeuronCommandRequest = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type ManageNeuronRequest = record { id : opt NeuronId; command : opt ManageNeuronCommandRequest; neuron_id_or_subaccount : opt NeuronIdOrSubaccount; }; -type ManageNeuronResponse = record { command : opt Command_1 }; -type Merge = record { source_neuron_id : opt NeuronId }; -type MergeMaturity = record { percentage_to_merge : nat32 }; + +type ManageNeuronResponse = record { + command : opt Command_1; +}; + +type Merge = record { + source_neuron_id : opt NeuronId; +}; + +type MergeMaturity = record { + percentage_to_merge : nat32; +}; + type MergeMaturityResponse = record { merged_maturity_e8s : nat64; new_stake_e8s : nat64; }; + type MergeResponse = record { target_neuron : opt Neuron; source_neuron : opt Neuron; target_neuron_info : opt NeuronInfo; source_neuron_info : opt NeuronInfo; }; + type Migration = record { status : opt int32; failure_reason : opt text; progress : opt Progress; }; + type Migrations = record { neuron_indexes_migration : opt Migration; copy_inactive_neurons_to_stable_memory_migration : opt Migration; }; + type MonthlyNodeProviderRewards = record { minimum_xdr_permyriad_per_icp : opt nat64; registry_version : opt nat64; @@ -393,7 +540,11 @@ type MonthlyNodeProviderRewards = record { xdr_conversion_rate : opt XdrConversionRate; maximum_node_provider_rewards_e8s : opt nat64; }; -type Motion = record { motion_text : text }; + +type Motion = record { + motion_text : text; +}; + type NetworkEconomics = record { neuron_minimum_stake_e8s : nat64; max_proposals_to_keep_per_topic : nat32; @@ -405,6 +556,7 @@ type NetworkEconomics = record { maximum_node_provider_rewards_e8s : nat64; neurons_fund_economics : opt NeuronsFundEconomics; }; + type Neuron = record { id : opt NeuronId; staked_maturity_e8s_equivalent : opt nat64; @@ -429,14 +581,17 @@ type Neuron = record { known_neuron_data : opt KnownNeuronData; spawn_at_timestamp_seconds : opt nat64; }; + type NeuronBasketConstructionParameters = record { dissolve_delay_interval : opt Duration; count : opt nat64; }; + type NeuronBasketConstructionParameters_1 = record { dissolve_delay_interval_seconds : nat64; count : nat64; }; + type NeuronDistribution = record { controller : opt principal; dissolve_delay : opt Duration; @@ -444,12 +599,21 @@ type NeuronDistribution = record { vesting_period : opt Duration; stake : opt Tokens; }; -type NeuronId = record { id : nat64 }; -type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId }; + +type NeuronId = record { + id : nat64; +}; + +type NeuronIdOrSubaccount = variant { + Subaccount : blob; + NeuronId : NeuronId; +}; + type NeuronInFlightCommand = record { command : opt Command_2; timestamp : nat64; }; + type NeuronInfo = record { dissolve_delay_seconds : nat64; recent_ballots : vec BallotInfo; @@ -464,6 +628,7 @@ type NeuronInfo = record { voting_power : nat64; age_seconds : nat64; }; + type NeuronStakeTransfer = record { to_subaccount : blob; neuron_stake_e8s : nat64; @@ -473,6 +638,7 @@ type NeuronStakeTransfer = record { transfer_timestamp : nat64; block_height : nat64; }; + type NeuronSubsetMetrics = record { total_maturity_e8s_equivalent : opt nat64; maturity_e8s_equivalent_buckets : vec record { nat64; nat64 }; @@ -485,27 +651,32 @@ type NeuronSubsetMetrics = record { total_voting_power : opt nat64; count_buckets : vec record { nat64; nat64 }; }; + type NeuronsFundAuditInfo = record { final_neurons_fund_participation : opt NeuronsFundParticipation; initial_neurons_fund_participation : opt NeuronsFundParticipation; neurons_fund_refunds : opt NeuronsFundSnapshot; }; + type NeuronsFundData = record { final_neurons_fund_participation : opt NeuronsFundParticipation; initial_neurons_fund_participation : opt NeuronsFundParticipation; neurons_fund_refunds : opt NeuronsFundSnapshot; }; + type NeuronsFundEconomics = record { maximum_icp_xdr_rate : opt Percentage; neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients; max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal; minimum_icp_xdr_rate : opt Percentage; }; + type NeuronsFundMatchedFundingCurveCoefficients = record { contribution_threshold_xdr : opt Decimal; one_third_participation_milestone_xdr : opt Decimal; full_participation_milestone_xdr : opt Decimal; }; + type NeuronsFundNeuron = record { controller : opt principal; hotkey_principal : opt text; @@ -514,6 +685,7 @@ type NeuronsFundNeuron = record { nns_neuron_id : opt nat64; amount_icp_e8s : opt nat64; }; + type NeuronsFundNeuronPortion = record { controller : opt principal; hotkey_principal : opt principal; @@ -523,6 +695,7 @@ type NeuronsFundNeuronPortion = record { nns_neuron_id : opt NeuronId; amount_icp_e8s : opt nat64; }; + type NeuronsFundParticipation = record { total_maturity_equivalent_icp_e8s : opt nat64; intended_neurons_fund_participation_icp_e8s : opt nat64; @@ -533,20 +706,30 @@ type NeuronsFundParticipation = record { ideal_matched_participation_function : opt IdealMatchedParticipationFunction; allocated_neurons_fund_participation_icp_e8s : opt nat64; }; + type NeuronsFundSnapshot = record { neurons_fund_neuron_portions : vec NeuronsFundNeuronPortion; }; + type NodeProvider = record { id : opt principal; reward_account : opt AccountIdentifier; }; -type Ok = record { neurons_fund_audit_info : opt NeuronsFundAuditInfo }; -type Ok_1 = record { neurons_fund_neuron_portions : vec NeuronsFundNeuron }; + +type Ok = record { + neurons_fund_audit_info : opt NeuronsFundAuditInfo; +}; + +type Ok_1 = record { + neurons_fund_neuron_portions : vec NeuronsFundNeuron; +}; + type OpenSnsTokenSwap = record { community_fund_investment_e8s : opt nat64; target_swap_canister_id : opt principal; params : opt Params; }; + type Operation = variant { RemoveHotKey : RemoveHotKey; AddHotKey : AddHotKey; @@ -559,6 +742,7 @@ type Operation = variant { LeaveCommunityFund : record {}; SetDissolveTimestamp : SetDissolveTimestamp; }; + type Params = record { min_participant_icp_e8s : nat64; neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters_1; @@ -572,15 +756,26 @@ type Params = record { min_icp_e8s : nat64; max_direct_participation_icp_e8s : opt nat64; }; -type Percentage = record { basis_points : opt nat64 }; -type Principals = record { principals : vec principal }; -type Progress = variant { LastNeuronId : NeuronId }; + +type Percentage = record { + basis_points : opt nat64; +}; + +type Principals = record { + principals : vec principal; +}; + +type Progress = variant { + LastNeuronId : NeuronId; +}; + type Proposal = record { url : text; title : opt text; action : opt Action; summary : text; }; + type ProposalActionRequest = variant { RegisterKnownNeuron : KnownNeuron; ManageNeuron : ManageNeuronRequest; @@ -599,10 +794,10 @@ type ProposalActionRequest = variant { AddOrRemoveNodeProvider : AddOrRemoveNodeProvider; Motion : Motion; }; + type ProposalData = record { id : opt NeuronId; failure_reason : opt GovernanceError; - cf_participants : vec CfParticipant; ballots : vec record { nat64; Ballot }; proposal_timestamp_seconds : nat64; reward_event_round : nat64; @@ -619,6 +814,7 @@ type ProposalData = record { executed_timestamp_seconds : nat64; original_total_community_fund_maturity_e8s_equivalent : opt nat64; }; + type ProposalInfo = record { id : opt NeuronId; status : int32; @@ -638,29 +834,81 @@ type ProposalInfo = record { proposer : opt NeuronId; executed_timestamp_seconds : nat64; }; -type RegisterVote = record { vote : int32; proposal : opt NeuronId }; -type RemoveHotKey = record { hot_key_to_remove : opt principal }; + +type RegisterVote = record { + vote : int32; + proposal : opt NeuronId; +}; + +type RemoveHotKey = record { + hot_key_to_remove : opt principal; +}; + type RestoreAgingNeuronGroup = record { count : opt nat64; previous_total_stake_e8s : opt nat64; current_total_stake_e8s : opt nat64; group_type : int32; }; + type RestoreAgingSummary = record { groups : vec RestoreAgingNeuronGroup; timestamp_seconds : opt nat64; }; -type Result = variant { Ok; Err : GovernanceError }; -type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId }; -type Result_10 = variant { Ok : Ok_1; Err : GovernanceError }; -type Result_2 = variant { Ok : Neuron; Err : GovernanceError }; -type Result_3 = variant { Ok : GovernanceCachedMetrics; Err : GovernanceError }; -type Result_4 = variant { Ok : RewardNodeProviders; Err : GovernanceError }; -type Result_5 = variant { Ok : NeuronInfo; Err : GovernanceError }; -type Result_6 = variant { Ok : Ok; Err : GovernanceError }; -type Result_7 = variant { Ok : NodeProvider; Err : GovernanceError }; -type Result_8 = variant { Committed : Committed; Aborted : record {} }; -type Result_9 = variant { Committed : Committed_1; Aborted : record {} }; + +type Result = variant { + Ok; + Err : GovernanceError; +}; + +type Result_1 = variant { + Error : GovernanceError; + NeuronId : NeuronId; +}; + +type Result_10 = variant { + Ok : Ok_1; + Err : GovernanceError; +}; + +type Result_2 = variant { + Ok : Neuron; + Err : GovernanceError; +}; + +type Result_3 = variant { + Ok : GovernanceCachedMetrics; + Err : GovernanceError; +}; + +type Result_4 = variant { + Ok : MonthlyNodeProviderRewards; + Err : GovernanceError; +}; + +type Result_5 = variant { + Ok : NeuronInfo; + Err : GovernanceError; +}; + +type Result_6 = variant { + Ok : Ok; + Err : GovernanceError; +}; + +type Result_7 = variant { + Ok : NodeProvider; + Err : GovernanceError; +}; + +type Result_8 = variant { + Committed : Committed; + Aborted : record {} }; + +type Result_9 = variant { + Committed : Committed_1; + Aborted : record {} }; + type RewardEvent = record { rounds_since_last_distribution : opt nat64; day_after_genesis : nat64; @@ -670,56 +918,94 @@ type RewardEvent = record { distributed_e8s_equivalent : nat64; settled_proposals : vec NeuronId; }; + type RewardMode = variant { RewardToNeuron : RewardToNeuron; RewardToAccount : RewardToAccount; }; + type RewardNodeProvider = record { node_provider : opt NodeProvider; reward_mode : opt RewardMode; amount_e8s : nat64; }; + type RewardNodeProviders = record { use_registry_derived_rewards : opt bool; rewards : vec RewardNodeProvider; }; -type RewardToAccount = record { to_account : opt AccountIdentifier }; -type RewardToNeuron = record { dissolve_delay_seconds : nat64 }; + +type RewardToAccount = record { + to_account : opt AccountIdentifier; +}; + +type RewardToNeuron = record { + dissolve_delay_seconds : nat64; +}; + type SetDefaultFollowees = record { default_followees : vec record { int32; Followees }; }; -type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 }; -type SetOpenTimeWindowRequest = record { open_time_window : opt TimeWindow }; + +type SetDissolveTimestamp = record { + dissolve_timestamp_seconds : nat64; +}; + +type SetOpenTimeWindowRequest = record { + open_time_window : opt TimeWindow; +}; + type SetSnsTokenSwapOpenTimeWindow = record { request : opt SetOpenTimeWindowRequest; swap_canister_id : opt principal; }; -type SetVisibility = record { visibility : opt int32 }; + +type SetVisibility = record { + visibility : opt int32; +}; + type SettleCommunityFundParticipation = record { result : opt Result_8; open_sns_token_swap_proposal_id : opt nat64; }; + type SettleNeuronsFundParticipationRequest = record { result : opt Result_9; nns_proposal_id : opt nat64; }; -type SettleNeuronsFundParticipationResponse = record { result : opt Result_10 }; + +type SettleNeuronsFundParticipationResponse = record { + result : opt Result_10; +}; + type Spawn = record { percentage_to_spawn : opt nat32; new_controller : opt principal; nonce : opt nat64; }; -type SpawnResponse = record { created_neuron_id : opt NeuronId }; -type Split = record { amount_e8s : nat64 }; -type StakeMaturity = record { percentage_to_stake : opt nat32 }; + +type SpawnResponse = record { + created_neuron_id : opt NeuronId; +}; + +type Split = record { + amount_e8s : nat64; +}; + +type StakeMaturity = record { + percentage_to_stake : opt nat32; +}; + type StakeMaturityResponse = record { maturity_e8s : nat64; staked_maturity_e8s : nat64; }; + type StopOrStartCanister = record { action : opt int32; canister_id : opt principal; }; + type SwapBackgroundInformation = record { ledger_index_canister_summary : opt CanisterSummary; fallback_controller_principal_ids : vec principal; @@ -730,7 +1016,11 @@ type SwapBackgroundInformation = record { root_canister_summary : opt CanisterSummary; dapp_canister_summaries : vec CanisterSummary; }; -type SwapDistribution = record { total : opt Tokens }; + +type SwapDistribution = record { + total : opt Tokens; +}; + type SwapParameters = record { minimum_participants : opt nat64; neurons_fund_participation : opt bool; @@ -747,38 +1037,54 @@ type SwapParameters = record { neurons_fund_investment_icp : opt Tokens; restricted_countries : opt Countries; }; + type SwapParticipationLimits = record { min_participant_icp_e8s : opt nat64; max_participant_icp_e8s : opt nat64; min_direct_participation_icp_e8s : opt nat64; max_direct_participation_icp_e8s : opt nat64; }; + type Tally = record { no : nat64; yes : nat64; total : nat64; timestamp_seconds : nat64; }; + type TimeWindow = record { start_timestamp_seconds : nat64; end_timestamp_seconds : nat64; }; -type Tokens = record { e8s : opt nat64 }; + +type Tokens = record { + e8s : opt nat64; +}; + type UpdateCanisterSettings = record { canister_id : opt principal; settings : opt CanisterSettings; }; -type UpdateNodeProvider = record { reward_account : opt AccountIdentifier }; + +type UpdateNodeProvider = record { + reward_account : opt AccountIdentifier; +}; + type VotingRewardParameters = record { reward_rate_transition_duration : opt Duration; initial_reward_rate : opt Percentage; final_reward_rate : opt Percentage; }; -type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 }; + +type WaitForQuietState = record { + current_deadline_timestamp_seconds : nat64; +}; + type XdrConversionRate = record { xdr_permyriad_per_icp : opt nat64; timestamp_seconds : opt nat64; }; + service : (Governance) -> { claim_gtc_neurons : (principal, vec NeuronId) -> (Result); claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> ( @@ -826,4 +1132,4 @@ service : (Governance) -> { transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result); update_neuron : (Neuron) -> (opt GovernanceError); update_node_provider : (UpdateNodeProvider) -> (Result); -} \ No newline at end of file +} diff --git a/packages/nns/candid/governance_test.idl.js b/packages/nns/candid/governance_test.idl.js index 483e7d891..af8352d85 100644 --- a/packages/nns/candid/governance_test.idl.js +++ b/packages/nns/candid/governance_test.idl.js @@ -476,17 +476,6 @@ export const idlFactory = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -564,7 +553,6 @@ export const idlFactory = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, @@ -672,7 +660,7 @@ export const idlFactory = ({ IDL }) => { 'Err' : GovernanceError, }); const Result_4 = IDL.Variant({ - 'Ok' : RewardNodeProviders, + 'Ok' : MonthlyNodeProviderRewards, 'Err' : GovernanceError, }); const NeuronInfo = IDL.Record({ @@ -1474,17 +1462,6 @@ export const init = ({ IDL }) => { 'error_message' : IDL.Text, 'error_type' : IDL.Int32, }); - const CfNeuron = IDL.Record({ - 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool), - 'hotkeys' : IDL.Opt(Principals), - 'nns_neuron_id' : IDL.Nat64, - 'amount_icp_e8s' : IDL.Nat64, - }); - const CfParticipant = IDL.Record({ - 'controller' : IDL.Opt(IDL.Principal), - 'hotkey_principal' : IDL.Text, - 'cf_neurons' : IDL.Vec(CfNeuron), - }); const Ballot = IDL.Record({ 'vote' : IDL.Int32, 'voting_power' : IDL.Nat64 }); const SwapParticipationLimits = IDL.Record({ 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64), @@ -1562,7 +1539,6 @@ export const init = ({ IDL }) => { const ProposalData = IDL.Record({ 'id' : IDL.Opt(NeuronId), 'failure_reason' : IDL.Opt(GovernanceError), - 'cf_participants' : IDL.Vec(CfParticipant), 'ballots' : IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)), 'proposal_timestamp_seconds' : IDL.Nat64, 'reward_event_round' : IDL.Nat64, diff --git a/packages/nns/candid/sns_wasm.did b/packages/nns/candid/sns_wasm.did index 6f1f3bf12..851f8b0ca 100644 --- a/packages/nns/candid/sns_wasm.did +++ b/packages/nns/candid/sns_wasm.did @@ -1,22 +1,46 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid -type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm }; -type AddWasmResponse = record { result : opt Result }; -type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution }; -type Canister = record { id : opt principal }; -type Countries = record { iso_codes : vec text }; -type DappCanisters = record { canisters : vec Canister }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid +type AddWasmRequest = record { + hash : blob; + wasm : opt SnsWasm; +}; + +type AddWasmResponse = record { + result : opt Result; +}; + +type AirdropDistribution = record { + airdrop_neurons : vec NeuronDistribution; +}; + +type Canister = record { + id : opt principal; +}; + +type Countries = record { + iso_codes : vec text; +}; + +type DappCanisters = record { + canisters : vec Canister; +}; + type DappCanistersTransferResult = record { restored_dapp_canisters : vec Canister; nns_controlled_dapp_canisters : vec Canister; sns_controlled_dapp_canisters : vec Canister; }; -type DeployNewSnsRequest = record { sns_init_payload : opt SnsInitPayload }; + +type DeployNewSnsRequest = record { + sns_init_payload : opt SnsInitPayload; +}; + type DeployNewSnsResponse = record { dapp_canisters_transfer_result : opt DappCanistersTransferResult; subnet_id : opt principal; error : opt SnsWasmError; canisters : opt SnsCanisterIds; }; + type DeployedSns = record { root_canister_id : opt principal; governance_canister_id : opt principal; @@ -24,49 +48,89 @@ type DeployedSns = record { swap_canister_id : opt principal; ledger_canister_id : opt principal; }; + type DeveloperDistribution = record { developer_neurons : vec NeuronDistribution; }; + type FractionalDeveloperVotingPower = record { treasury_distribution : opt TreasuryDistribution; developer_distribution : opt DeveloperDistribution; airdrop_distribution : opt AirdropDistribution; swap_distribution : opt SwapDistribution; }; + type GetAllowedPrincipalsResponse = record { allowed_principals : vec principal; }; -type GetDeployedSnsByProposalIdRequest = record { proposal_id : nat64 }; + +type GetDeployedSnsByProposalIdRequest = record { + proposal_id : nat64; +}; + type GetDeployedSnsByProposalIdResponse = record { get_deployed_sns_by_proposal_id_result : opt GetDeployedSnsByProposalIdResult; }; + type GetDeployedSnsByProposalIdResult = variant { Error : SnsWasmError; DeployedSns : DeployedSns; }; + type GetNextSnsVersionRequest = record { governance_canister_id : opt principal; current_version : opt SnsVersion; }; -type GetNextSnsVersionResponse = record { next_version : opt SnsVersion }; -type GetProposalIdThatAddedWasmRequest = record { hash : blob }; -type GetProposalIdThatAddedWasmResponse = record { proposal_id : opt nat64 }; -type GetSnsSubnetIdsResponse = record { sns_subnet_ids : vec principal }; -type GetWasmMetadataRequest = record { hash : opt blob }; -type GetWasmMetadataResponse = record { result : opt Result_1 }; -type GetWasmRequest = record { hash : blob }; -type GetWasmResponse = record { wasm : opt SnsWasm }; + +type GetNextSnsVersionResponse = record { + next_version : opt SnsVersion; +}; + +type GetProposalIdThatAddedWasmRequest = record { + hash : blob; +}; + +type GetProposalIdThatAddedWasmResponse = record { + proposal_id : opt nat64; +}; + +type GetSnsSubnetIdsResponse = record { + sns_subnet_ids : vec principal; +}; + +type GetWasmMetadataRequest = record { + hash : opt blob; +}; + +type GetWasmMetadataResponse = record { + result : opt Result_1; +}; + +type GetWasmRequest = record { + hash : blob; +}; + +type GetWasmResponse = record { + wasm : opt SnsWasm; +}; + type IdealMatchedParticipationFunction = record { serialized_representation : opt text; }; + type InitialTokenDistribution = variant { FractionalDeveloperVotingPower : FractionalDeveloperVotingPower; }; + type InsertUpgradePathEntriesRequest = record { upgrade_path : vec SnsUpgrade; sns_governance_canister_id : opt principal; }; -type InsertUpgradePathEntriesResponse = record { error : opt SnsWasmError }; + +type InsertUpgradePathEntriesResponse = record { + error : opt SnsWasmError; +}; + type LinearScalingCoefficient = record { slope_numerator : opt nat64; intercept_icp_e8s : opt nat64; @@ -74,26 +138,37 @@ type LinearScalingCoefficient = record { slope_denominator : opt nat64; to_direct_participation_icp_e8s : opt nat64; }; -type ListDeployedSnsesResponse = record { instances : vec DeployedSns }; + +type ListDeployedSnsesResponse = record { + instances : vec DeployedSns; +}; + type ListUpgradeStep = record { pretty_version : opt PrettySnsVersion; version : opt SnsVersion; }; + type ListUpgradeStepsRequest = record { limit : nat32; starting_at : opt SnsVersion; sns_governance_canister_id : opt principal; }; -type ListUpgradeStepsResponse = record { steps : vec ListUpgradeStep }; + +type ListUpgradeStepsResponse = record { + steps : vec ListUpgradeStep; +}; + type MetadataSection = record { contents : opt blob; name : opt text; visibility : opt text; }; + type NeuronBasketConstructionParameters = record { dissolve_delay_interval_seconds : nat64; count : nat64; }; + type NeuronDistribution = record { controller : opt principal; dissolve_delay_seconds : nat64; @@ -101,13 +176,18 @@ type NeuronDistribution = record { stake_e8s : nat64; vesting_period_seconds : opt nat64; }; + type NeuronsFundParticipationConstraints = record { coefficient_intervals : vec LinearScalingCoefficient; max_neurons_fund_participation_icp_e8s : opt nat64; min_direct_participation_threshold_icp_e8s : opt nat64; ideal_matched_participation_function : opt IdealMatchedParticipationFunction; }; -type Ok = record { sections : vec MetadataSection }; + +type Ok = record { + sections : vec MetadataSection; +}; + type PrettySnsVersion = record { archive_wasm_hash : text; root_wasm_hash : text; @@ -116,8 +196,17 @@ type PrettySnsVersion = record { governance_wasm_hash : text; index_wasm_hash : text; }; -type Result = variant { Error : SnsWasmError; Hash : blob }; -type Result_1 = variant { Ok : Ok; Error : SnsWasmError }; + +type Result = variant { + Error : SnsWasmError; + Hash : blob; +}; + +type Result_1 = variant { + Ok : Ok; + Error : SnsWasmError; +}; + type SnsCanisterIds = record { root : opt principal; swap : opt principal; @@ -125,6 +214,7 @@ type SnsCanisterIds = record { index : opt principal; governance : opt principal; }; + type SnsInitPayload = record { url : opt text; max_dissolve_delay_seconds : opt nat64; @@ -165,10 +255,12 @@ type SnsInitPayload = record { min_icp_e8s : opt nat64; max_direct_participation_icp_e8s : opt nat64; }; + type SnsUpgrade = record { next_version : opt SnsVersion; current_version : opt SnsVersion; }; + type SnsVersion = record { archive_wasm_hash : blob; root_wasm_hash : blob; @@ -177,38 +269,55 @@ type SnsVersion = record { governance_wasm_hash : blob; index_wasm_hash : blob; }; + type SnsWasm = record { wasm : blob; proposal_id : opt nat64; canister_type : int32; }; + type SnsWasmCanisterInitPayload = record { allowed_principals : vec principal; access_controls_enabled : bool; sns_subnet_ids : vec principal; }; -type SnsWasmError = record { message : text }; + +type SnsWasmError = record { + message : text; +}; + type SwapDistribution = record { total_e8s : nat64; initial_swap_amount_e8s : nat64; }; -type TreasuryDistribution = record { total_e8s : nat64 }; + +type TreasuryDistribution = record { + total_e8s : nat64; +}; + type UpdateAllowedPrincipalsRequest = record { added_principals : vec principal; removed_principals : vec principal; }; + type UpdateAllowedPrincipalsResponse = record { update_allowed_principals_result : opt UpdateAllowedPrincipalsResult; }; + type UpdateAllowedPrincipalsResult = variant { Error : SnsWasmError; AllowedPrincipals : GetAllowedPrincipalsResponse; }; + type UpdateSnsSubnetListRequest = record { sns_subnet_ids_to_add : vec principal; sns_subnet_ids_to_remove : vec principal; }; -type UpdateSnsSubnetListResponse = record { error : opt SnsWasmError }; + +type UpdateSnsSubnetListResponse = record { + error : opt SnsWasmError; +}; + service : (SnsWasmCanisterInitPayload) -> { add_wasm : (AddWasmRequest) -> (AddWasmResponse); deploy_new_sns : (DeployNewSnsRequest) -> (DeployNewSnsResponse); @@ -241,4 +350,4 @@ service : (SnsWasmCanisterInitPayload) -> { update_sns_subnet_list : (UpdateSnsSubnetListRequest) -> ( UpdateSnsSubnetListResponse, ); -} \ No newline at end of file +} diff --git a/packages/sns/candid/sns_governance.certified.idl.js b/packages/sns/candid/sns_governance.certified.idl.js index 5b7263881..270a45c5c 100644 --- a/packages/sns/candid/sns_governance.certified.idl.js +++ b/packages/sns/candid/sns_governance.certified.idl.js @@ -453,6 +453,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_governance.d.ts b/packages/sns/candid/sns_governance.d.ts index e473f2362..16d4b2180 100644 --- a/packages/sns/candid/sns_governance.d.ts +++ b/packages/sns/candid/sns_governance.d.ts @@ -131,6 +131,7 @@ export interface DefaultFollowees { export interface DefiniteCanisterSettingsArgs { freezing_threshold: bigint; controllers: Array; + wasm_memory_limit: [] | [bigint]; memory_allocation: bigint; compute_allocation: bigint; } diff --git a/packages/sns/candid/sns_governance.did b/packages/sns/candid/sns_governance.did index 6b7e3c4f5..1ac67c322 100644 --- a/packages/sns/candid/sns_governance.did +++ b/packages/sns/candid/sns_governance.did @@ -1,5 +1,9 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/sns/governance/canister/governance.did' by import-candid -type Account = record { owner : opt principal; subaccount : opt Subaccount }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/sns/governance/canister/governance.did' by import-candid +type Account = record { + owner : opt principal; + subaccount : opt Subaccount; +}; + type Action = variant { ManageNervousSystemParameters : NervousSystemParameters; AddGenericNervousSystemFunction : NervousSystemFunction; @@ -17,24 +21,32 @@ type Action = variant { ManageLedgerParameters : ManageLedgerParameters; Motion : Motion; }; + type ActionAuxiliary = variant { TransferSnsTreasuryFunds : MintSnsTokensActionAuxiliary; MintSnsTokens : MintSnsTokensActionAuxiliary; }; + type AddNeuronPermissions = record { permissions_to_add : opt NeuronPermissionList; principal_id : opt principal; }; -type Amount = record { e8s : nat64 }; + +type Amount = record { + e8s : nat64; +}; + type Ballot = record { vote : int32; cast_timestamp_seconds : nat64; voting_power : nat64; }; + type By = variant { MemoAndController : MemoAndController; NeuronId : record {}; }; + type CanisterStatusResultV2 = record { status : CanisterStatusType; memory_size : nat; @@ -43,21 +55,43 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : nat; module_hash : opt blob; }; -type CanisterStatusType = variant { stopped; stopping; running }; + +type CanisterStatusType = variant { + stopped; + stopping; + running; +}; + type ChangeAutoStakeMaturity = record { requested_setting_for_auto_stake_maturity : bool; }; -type ClaimOrRefresh = record { by : opt By }; -type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId }; + +type ClaimOrRefresh = record { + by : opt By; +}; + +type ClaimOrRefreshResponse = record { + refreshed_neuron_id : opt NeuronId; +}; + type ClaimSwapNeuronsRequest = record { neuron_recipes : opt NeuronRecipes; neuron_parameters : vec NeuronParameters; }; + type ClaimSwapNeuronsResponse = record { claim_swap_neurons_result : opt ClaimSwapNeuronsResult; }; -type ClaimSwapNeuronsResult = variant { Ok : ClaimedSwapNeurons; Err : int32 }; -type ClaimedSwapNeurons = record { swap_neurons : vec SwapNeuron }; + +type ClaimSwapNeuronsResult = variant { + Ok : ClaimedSwapNeurons; + Err : int32; +}; + +type ClaimedSwapNeurons = record { + swap_neurons : vec SwapNeuron; +}; + type Command = variant { Split : Split; Follow : Follow; @@ -72,6 +106,7 @@ type Command = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Command_1 = variant { Error : GovernanceError; Split : SplitResponse; @@ -87,6 +122,7 @@ type Command_1 = variant { Disburse : DisburseResponse; AddNeuronPermission : record {}; }; + type Command_2 = variant { Split : Split; Follow : Follow; @@ -102,80 +138,134 @@ type Command_2 = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; -type Configure = record { operation : opt Operation }; -type Decimal = record { human_readable : opt text }; -type DefaultFollowees = record { followees : vec record { nat64; Followees } }; + +type Configure = record { + operation : opt Operation; +}; + +type Decimal = record { + human_readable : opt text; +}; + +type DefaultFollowees = record { + followees : vec record { nat64; Followees }; +}; + type DefiniteCanisterSettingsArgs = record { freezing_threshold : nat; controllers : vec principal; + wasm_memory_limit : opt nat; memory_allocation : nat; compute_allocation : nat; }; + type DeregisterDappCanisters = record { canister_ids : vec principal; new_controllers : vec principal; }; -type Disburse = record { to_account : opt Account; amount : opt Amount }; + +type Disburse = record { + to_account : opt Account; + amount : opt Amount; +}; + type DisburseMaturity = record { to_account : opt Account; percentage_to_disburse : nat32; }; + type DisburseMaturityInProgress = record { timestamp_of_disbursement_seconds : nat64; amount_e8s : nat64; account_to_disburse_to : opt Account; finalize_disbursement_timestamp_seconds : opt nat64; }; + type DisburseMaturityResponse = record { amount_disbursed_e8s : nat64; amount_deducted_e8s : opt nat64; }; -type DisburseResponse = record { transfer_block_height : nat64 }; + +type DisburseResponse = record { + transfer_block_height : nat64; +}; + type DissolveState = variant { DissolveDelaySeconds : nat64; WhenDissolvedTimestampSeconds : nat64; }; + type ExecuteGenericNervousSystemFunction = record { function_id : nat64; payload : blob; }; + type FinalizeDisburseMaturity = record { amount_to_be_disbursed_e8s : nat64; to_account : opt Account; }; -type Follow = record { function_id : nat64; followees : vec NeuronId }; -type Followees = record { followees : vec NeuronId }; + +type Follow = record { + function_id : nat64; + followees : vec NeuronId; +}; + +type Followees = record { + followees : vec NeuronId; +}; + type FunctionType = variant { NativeNervousSystemFunction : record {}; GenericNervousSystemFunction : GenericNervousSystemFunction; }; + type GenericNervousSystemFunction = record { validator_canister_id : opt principal; target_canister_id : opt principal; validator_method_name : opt text; target_method_name : opt text; }; + type GetMaturityModulationResponse = record { maturity_modulation : opt MaturityModulation; }; + type GetMetadataResponse = record { url : opt text; logo : opt text; name : opt text; description : opt text; }; -type GetModeResponse = record { mode : opt int32 }; -type GetNeuron = record { neuron_id : opt NeuronId }; -type GetNeuronResponse = record { result : opt Result }; -type GetProposal = record { proposal_id : opt ProposalId }; -type GetProposalResponse = record { result : opt Result_1 }; + +type GetModeResponse = record { + mode : opt int32; +}; + +type GetNeuron = record { + neuron_id : opt NeuronId; +}; + +type GetNeuronResponse = record { + result : opt Result; +}; + +type GetProposal = record { + proposal_id : opt ProposalId; +}; + +type GetProposalResponse = record { + result : opt Result_1; +}; + type GetRunningSnsVersionResponse = record { deployed_version : opt Version; pending_version : opt UpgradeInProgress; }; + type GetSnsInitializationParametersResponse = record { sns_initialization_parameters : text; }; + type Governance = record { root_canister_id : opt principal; id_to_nervous_system_functions : vec record { nat64; NervousSystemFunction }; @@ -196,6 +286,7 @@ type Governance = record { neurons : vec record { text; Neuron }; genesis_timestamp_seconds : nat64; }; + type GovernanceCachedMetrics = record { not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; garbage_collectable_neurons_count : nat64; @@ -213,20 +304,31 @@ type GovernanceCachedMetrics = record { dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; timestamp_seconds : nat64; }; -type GovernanceError = record { error_message : text; error_type : int32 }; + +type GovernanceError = record { + error_message : text; + error_type : int32; +}; + type IncreaseDissolveDelay = record { additional_dissolve_delay_seconds : nat32; }; + type ListNervousSystemFunctionsResponse = record { reserved_ids : vec nat64; functions : vec NervousSystemFunction; }; + type ListNeurons = record { of_principal : opt principal; limit : nat32; start_page_at : opt NeuronId; }; -type ListNeuronsResponse = record { neurons : vec Neuron }; + +type ListNeuronsResponse = record { + neurons : vec Neuron; +}; + type ListProposals = record { include_reward_status : vec int32; before_proposal : opt ProposalId; @@ -234,10 +336,12 @@ type ListProposals = record { exclude_type : vec nat64; include_status : vec int32; }; + type ListProposalsResponse = record { include_ballots_by_caller : opt bool; proposals : vec ProposalData; }; + type ManageDappCanisterSettings = record { freezing_threshold : opt nat64; canister_ids : vec principal; @@ -247,44 +351,71 @@ type ManageDappCanisterSettings = record { memory_allocation : opt nat64; compute_allocation : opt nat64; }; + type ManageLedgerParameters = record { token_symbol : opt text; transfer_fee : opt nat64; token_logo : opt text; token_name : opt text; }; -type ManageNeuron = record { subaccount : blob; command : opt Command }; -type ManageNeuronResponse = record { command : opt Command_1 }; + +type ManageNeuron = record { + subaccount : blob; + command : opt Command; +}; + +type ManageNeuronResponse = record { + command : opt Command_1; +}; + type ManageSnsMetadata = record { url : opt text; logo : opt text; name : opt text; description : opt text; }; + type MaturityModulation = record { current_basis_points : opt int32; updated_at_timestamp_seconds : opt nat64; }; -type MemoAndController = record { controller : opt principal; memo : nat64 }; -type MergeMaturity = record { percentage_to_merge : nat32 }; + +type MemoAndController = record { + controller : opt principal; + memo : nat64; +}; + +type MergeMaturity = record { + percentage_to_merge : nat32; +}; + type MergeMaturityResponse = record { merged_maturity_e8s : nat64; new_stake_e8s : nat64; }; + type MintSnsTokens = record { to_principal : opt principal; to_subaccount : opt Subaccount; memo : opt nat64; amount_e8s : opt nat64; }; -type MintSnsTokensActionAuxiliary = record { valuation : opt Valuation }; -type Motion = record { motion_text : text }; + +type MintSnsTokensActionAuxiliary = record { + valuation : opt Valuation; +}; + +type Motion = record { + motion_text : text; +}; + type NervousSystemFunction = record { id : nat64; name : text; description : opt text; function_type : opt FunctionType; }; + type NervousSystemParameters = record { default_followees : opt DefaultFollowees; max_dissolve_delay_seconds : opt nat64; @@ -307,6 +438,7 @@ type NervousSystemParameters = record { maturity_modulation_disabled : opt bool; max_number_of_principals_per_neuron : opt nat64; }; + type Neuron = record { id : opt NeuronId; staked_maturity_e8s_equivalent : opt nat64; @@ -324,12 +456,20 @@ type Neuron = record { followees : vec record { nat64; Followees }; neuron_fees_e8s : nat64; }; -type NeuronId = record { id : blob }; -type NeuronIds = record { neuron_ids : vec NeuronId }; + +type NeuronId = record { + id : blob; +}; + +type NeuronIds = record { + neuron_ids : vec NeuronId; +}; + type NeuronInFlightCommand = record { command : opt Command_2; timestamp : nat64; }; + type NeuronParameters = record { controller : opt principal; dissolve_delay_seconds : opt nat64; @@ -339,11 +479,16 @@ type NeuronParameters = record { hotkey : opt principal; neuron_id : opt NeuronId; }; + type NeuronPermission = record { "principal" : opt principal; permission_type : vec int32; }; -type NeuronPermissionList = record { permissions : vec int32 }; + +type NeuronPermissionList = record { + permissions : vec int32; +}; + type NeuronRecipe = record { controller : opt principal; dissolve_delay_seconds : opt nat64; @@ -352,12 +497,17 @@ type NeuronRecipe = record { followees : opt NeuronIds; neuron_id : opt NeuronId; }; -type NeuronRecipes = record { neuron_recipes : vec NeuronRecipe }; + +type NeuronRecipes = record { + neuron_recipes : vec NeuronRecipe; +}; + type NeuronsFund = record { nns_neuron_hotkeys : opt Principals; nns_neuron_controller : opt principal; nns_neuron_id : opt nat64; }; + type Operation = variant { ChangeAutoStakeMaturity : ChangeAutoStakeMaturity; StopDissolving : record {}; @@ -365,15 +515,27 @@ type Operation = variant { IncreaseDissolveDelay : IncreaseDissolveDelay; SetDissolveTimestamp : SetDissolveTimestamp; }; -type Participant = variant { NeuronsFund : NeuronsFund; Direct : record {} }; -type Percentage = record { basis_points : opt nat64 }; -type Principals = record { principals : vec principal }; + +type Participant = variant { + NeuronsFund : NeuronsFund; + Direct : record {}; +}; + +type Percentage = record { + basis_points : opt nat64; +}; + +type Principals = record { + principals : vec principal; +}; + type Proposal = record { url : text; title : text; action : opt Action; summary : text; }; + type ProposalData = record { id : opt ProposalId; payload_text_rendering : opt text; @@ -398,15 +560,35 @@ type ProposalData = record { is_eligible_for_rewards : bool; executed_timestamp_seconds : nat64; }; -type ProposalId = record { id : nat64 }; -type RegisterDappCanisters = record { canister_ids : vec principal }; -type RegisterVote = record { vote : int32; proposal : opt ProposalId }; + +type ProposalId = record { + id : nat64; +}; + +type RegisterDappCanisters = record { + canister_ids : vec principal; +}; + +type RegisterVote = record { + vote : int32; + proposal : opt ProposalId; +}; + type RemoveNeuronPermissions = record { permissions_to_remove : opt NeuronPermissionList; principal_id : opt principal; }; -type Result = variant { Error : GovernanceError; Neuron : Neuron }; -type Result_1 = variant { Error : GovernanceError; Proposal : ProposalData }; + +type Result = variant { + Error : GovernanceError; + Neuron : Neuron; +}; + +type Result_1 = variant { + Error : GovernanceError; + Proposal : ProposalData; +}; + type RewardEvent = record { rounds_since_last_distribution : opt nat64; actual_timestamp_seconds : nat64; @@ -416,24 +598,53 @@ type RewardEvent = record { round : nat64; settled_proposals : vec ProposalId; }; -type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 }; -type SetMode = record { mode : int32 }; -type Split = record { memo : nat64; amount_e8s : nat64 }; -type SplitResponse = record { created_neuron_id : opt NeuronId }; -type StakeMaturity = record { percentage_to_stake : opt nat32 }; + +type SetDissolveTimestamp = record { + dissolve_timestamp_seconds : nat64; +}; + +type SetMode = record { + mode : int32; +}; + +type Split = record { + memo : nat64; + amount_e8s : nat64; +}; + +type SplitResponse = record { + created_neuron_id : opt NeuronId; +}; + +type StakeMaturity = record { + percentage_to_stake : opt nat32; +}; + type StakeMaturityResponse = record { maturity_e8s : nat64; staked_maturity_e8s : nat64; }; -type Subaccount = record { subaccount : blob }; -type SwapNeuron = record { id : opt NeuronId; status : int32 }; + +type Subaccount = record { + subaccount : blob; +}; + +type SwapNeuron = record { + id : opt NeuronId; + status : int32; +}; + type Tally = record { no : nat64; yes : nat64; total : nat64; timestamp_seconds : nat64; }; -type Tokens = record { e8s : opt nat64 }; + +type Tokens = record { + e8s : opt nat64; +}; + type TransferSnsTreasuryFunds = record { from_treasury : int32; to_principal : opt principal; @@ -441,29 +652,34 @@ type TransferSnsTreasuryFunds = record { memo : opt nat64; amount_e8s : nat64; }; + type UpgradeInProgress = record { mark_failed_at_seconds : nat64; checking_upgrade_lock : nat64; proposal_id : nat64; target_version : opt Version; }; + type UpgradeSnsControlledCanister = record { new_canister_wasm : blob; mode : opt int32; canister_id : opt principal; canister_upgrade_arg : opt blob; }; + type Valuation = record { token : opt int32; account : opt Account; valuation_factors : opt ValuationFactors; timestamp_seconds : opt nat64; }; + type ValuationFactors = record { xdrs_per_icp : opt Decimal; icps_per_token : opt Decimal; tokens : opt Tokens; }; + type Version = record { archive_wasm_hash : blob; root_wasm_hash : blob; @@ -472,13 +688,18 @@ type Version = record { governance_wasm_hash : blob; index_wasm_hash : blob; }; + type VotingRewardsParameters = record { final_reward_rate_basis_points : opt nat64; initial_reward_rate_basis_points : opt nat64; reward_rate_transition_duration_seconds : opt nat64; round_duration_seconds : opt nat64; }; -type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 }; + +type WaitForQuietState = record { + current_deadline_timestamp_seconds : nat64; +}; + service : (Governance) -> { claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse); fail_stuck_upgrade_in_progress : (record {}) -> (record {}); @@ -502,4 +723,4 @@ service : (Governance) -> { list_proposals : (ListProposals) -> (ListProposalsResponse) query; manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); set_mode : (SetMode) -> (record {}); -} \ No newline at end of file +} diff --git a/packages/sns/candid/sns_governance.idl.js b/packages/sns/candid/sns_governance.idl.js index b498fa947..b1a835e55 100644 --- a/packages/sns/candid/sns_governance.idl.js +++ b/packages/sns/candid/sns_governance.idl.js @@ -453,6 +453,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_governance_test.certified.idl.js b/packages/sns/candid/sns_governance_test.certified.idl.js index eb2a94fed..fc97c11ce 100644 --- a/packages/sns/candid/sns_governance_test.certified.idl.js +++ b/packages/sns/candid/sns_governance_test.certified.idl.js @@ -460,6 +460,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_governance_test.d.ts b/packages/sns/candid/sns_governance_test.d.ts index f459e8173..cb3b5f504 100644 --- a/packages/sns/candid/sns_governance_test.d.ts +++ b/packages/sns/candid/sns_governance_test.d.ts @@ -138,6 +138,7 @@ export interface DefaultFollowees { export interface DefiniteCanisterSettingsArgs { freezing_threshold: bigint; controllers: Array; + wasm_memory_limit: [] | [bigint]; memory_allocation: bigint; compute_allocation: bigint; } diff --git a/packages/sns/candid/sns_governance_test.did b/packages/sns/candid/sns_governance_test.did index 54cf1a74f..9ed94cdf9 100644 --- a/packages/sns/candid/sns_governance_test.did +++ b/packages/sns/candid/sns_governance_test.did @@ -1,5 +1,9 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/sns/governance/canister/governance_test.did' by import-candid -type Account = record { owner : opt principal; subaccount : opt Subaccount }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/sns/governance/canister/governance_test.did' by import-candid +type Account = record { + owner : opt principal; + subaccount : opt Subaccount; +}; + type Action = variant { ManageNervousSystemParameters : NervousSystemParameters; AddGenericNervousSystemFunction : NervousSystemFunction; @@ -17,26 +21,41 @@ type Action = variant { ManageLedgerParameters : ManageLedgerParameters; Motion : Motion; }; + type ActionAuxiliary = variant { TransferSnsTreasuryFunds : MintSnsTokensActionAuxiliary; MintSnsTokens : MintSnsTokensActionAuxiliary; }; -type AddMaturityRequest = record { id : opt NeuronId; amount_e8s : opt nat64 }; -type AddMaturityResponse = record { new_maturity_e8s : opt nat64 }; + +type AddMaturityRequest = record { + id : opt NeuronId; + amount_e8s : opt nat64; +}; + +type AddMaturityResponse = record { + new_maturity_e8s : opt nat64; +}; + type AddNeuronPermissions = record { permissions_to_add : opt NeuronPermissionList; principal_id : opt principal; }; -type Amount = record { e8s : nat64 }; + +type Amount = record { + e8s : nat64; +}; + type Ballot = record { vote : int32; cast_timestamp_seconds : nat64; voting_power : nat64; }; + type By = variant { MemoAndController : MemoAndController; NeuronId : record {}; }; + type CanisterStatusResultV2 = record { status : CanisterStatusType; memory_size : nat; @@ -45,21 +64,43 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : nat; module_hash : opt blob; }; -type CanisterStatusType = variant { stopped; stopping; running }; + +type CanisterStatusType = variant { + stopped; + stopping; + running; +}; + type ChangeAutoStakeMaturity = record { requested_setting_for_auto_stake_maturity : bool; }; -type ClaimOrRefresh = record { by : opt By }; -type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId }; + +type ClaimOrRefresh = record { + by : opt By; +}; + +type ClaimOrRefreshResponse = record { + refreshed_neuron_id : opt NeuronId; +}; + type ClaimSwapNeuronsRequest = record { neuron_recipes : opt NeuronRecipes; neuron_parameters : vec NeuronParameters; }; + type ClaimSwapNeuronsResponse = record { claim_swap_neurons_result : opt ClaimSwapNeuronsResult; }; -type ClaimSwapNeuronsResult = variant { Ok : ClaimedSwapNeurons; Err : int32 }; -type ClaimedSwapNeurons = record { swap_neurons : vec SwapNeuron }; + +type ClaimSwapNeuronsResult = variant { + Ok : ClaimedSwapNeurons; + Err : int32; +}; + +type ClaimedSwapNeurons = record { + swap_neurons : vec SwapNeuron; +}; + type Command = variant { Split : Split; Follow : Follow; @@ -74,6 +115,7 @@ type Command = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; + type Command_1 = variant { Error : GovernanceError; Split : SplitResponse; @@ -89,6 +131,7 @@ type Command_1 = variant { Disburse : DisburseResponse; AddNeuronPermission : record {}; }; + type Command_2 = variant { Split : Split; Follow : Follow; @@ -104,80 +147,134 @@ type Command_2 = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; -type Configure = record { operation : opt Operation }; -type Decimal = record { human_readable : opt text }; -type DefaultFollowees = record { followees : vec record { nat64; Followees } }; + +type Configure = record { + operation : opt Operation; +}; + +type Decimal = record { + human_readable : opt text; +}; + +type DefaultFollowees = record { + followees : vec record { nat64; Followees }; +}; + type DefiniteCanisterSettingsArgs = record { freezing_threshold : nat; controllers : vec principal; + wasm_memory_limit : opt nat; memory_allocation : nat; compute_allocation : nat; }; + type DeregisterDappCanisters = record { canister_ids : vec principal; new_controllers : vec principal; }; -type Disburse = record { to_account : opt Account; amount : opt Amount }; + +type Disburse = record { + to_account : opt Account; + amount : opt Amount; +}; + type DisburseMaturity = record { to_account : opt Account; percentage_to_disburse : nat32; }; + type DisburseMaturityInProgress = record { timestamp_of_disbursement_seconds : nat64; amount_e8s : nat64; account_to_disburse_to : opt Account; finalize_disbursement_timestamp_seconds : opt nat64; }; + type DisburseMaturityResponse = record { amount_disbursed_e8s : nat64; amount_deducted_e8s : opt nat64; }; -type DisburseResponse = record { transfer_block_height : nat64 }; + +type DisburseResponse = record { + transfer_block_height : nat64; +}; + type DissolveState = variant { DissolveDelaySeconds : nat64; WhenDissolvedTimestampSeconds : nat64; }; + type ExecuteGenericNervousSystemFunction = record { function_id : nat64; payload : blob; }; + type FinalizeDisburseMaturity = record { amount_to_be_disbursed_e8s : nat64; to_account : opt Account; }; -type Follow = record { function_id : nat64; followees : vec NeuronId }; -type Followees = record { followees : vec NeuronId }; + +type Follow = record { + function_id : nat64; + followees : vec NeuronId; +}; + +type Followees = record { + followees : vec NeuronId; +}; + type FunctionType = variant { NativeNervousSystemFunction : record {}; GenericNervousSystemFunction : GenericNervousSystemFunction; }; + type GenericNervousSystemFunction = record { validator_canister_id : opt principal; target_canister_id : opt principal; validator_method_name : opt text; target_method_name : opt text; }; + type GetMaturityModulationResponse = record { maturity_modulation : opt MaturityModulation; }; + type GetMetadataResponse = record { url : opt text; logo : opt text; name : opt text; description : opt text; }; -type GetModeResponse = record { mode : opt int32 }; -type GetNeuron = record { neuron_id : opt NeuronId }; -type GetNeuronResponse = record { result : opt Result }; -type GetProposal = record { proposal_id : opt ProposalId }; -type GetProposalResponse = record { result : opt Result_1 }; + +type GetModeResponse = record { + mode : opt int32; +}; + +type GetNeuron = record { + neuron_id : opt NeuronId; +}; + +type GetNeuronResponse = record { + result : opt Result; +}; + +type GetProposal = record { + proposal_id : opt ProposalId; +}; + +type GetProposalResponse = record { + result : opt Result_1; +}; + type GetRunningSnsVersionResponse = record { deployed_version : opt Version; pending_version : opt UpgradeInProgress; }; + type GetSnsInitializationParametersResponse = record { sns_initialization_parameters : text; }; + type Governance = record { root_canister_id : opt principal; id_to_nervous_system_functions : vec record { nat64; NervousSystemFunction }; @@ -198,6 +295,7 @@ type Governance = record { neurons : vec record { text; Neuron }; genesis_timestamp_seconds : nat64; }; + type GovernanceCachedMetrics = record { not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; garbage_collectable_neurons_count : nat64; @@ -215,20 +313,31 @@ type GovernanceCachedMetrics = record { dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; timestamp_seconds : nat64; }; -type GovernanceError = record { error_message : text; error_type : int32 }; + +type GovernanceError = record { + error_message : text; + error_type : int32; +}; + type IncreaseDissolveDelay = record { additional_dissolve_delay_seconds : nat32; }; + type ListNervousSystemFunctionsResponse = record { reserved_ids : vec nat64; functions : vec NervousSystemFunction; }; + type ListNeurons = record { of_principal : opt principal; limit : nat32; start_page_at : opt NeuronId; }; -type ListNeuronsResponse = record { neurons : vec Neuron }; + +type ListNeuronsResponse = record { + neurons : vec Neuron; +}; + type ListProposals = record { include_reward_status : vec int32; before_proposal : opt ProposalId; @@ -236,10 +345,12 @@ type ListProposals = record { exclude_type : vec nat64; include_status : vec int32; }; + type ListProposalsResponse = record { include_ballots_by_caller : opt bool; proposals : vec ProposalData; }; + type ManageDappCanisterSettings = record { freezing_threshold : opt nat64; canister_ids : vec principal; @@ -249,48 +360,76 @@ type ManageDappCanisterSettings = record { memory_allocation : opt nat64; compute_allocation : opt nat64; }; + type ManageLedgerParameters = record { token_symbol : opt text; transfer_fee : opt nat64; token_logo : opt text; token_name : opt text; }; -type ManageNeuron = record { subaccount : blob; command : opt Command }; -type ManageNeuronResponse = record { command : opt Command_1 }; + +type ManageNeuron = record { + subaccount : blob; + command : opt Command; +}; + +type ManageNeuronResponse = record { + command : opt Command_1; +}; + type ManageSnsMetadata = record { url : opt text; logo : opt text; name : opt text; description : opt text; }; + type MaturityModulation = record { current_basis_points : opt int32; updated_at_timestamp_seconds : opt nat64; }; -type MemoAndController = record { controller : opt principal; memo : nat64 }; -type MergeMaturity = record { percentage_to_merge : nat32 }; + +type MemoAndController = record { + controller : opt principal; + memo : nat64; +}; + +type MergeMaturity = record { + percentage_to_merge : nat32; +}; + type MergeMaturityResponse = record { merged_maturity_e8s : nat64; new_stake_e8s : nat64; }; + type MintSnsTokens = record { to_principal : opt principal; to_subaccount : opt Subaccount; memo : opt nat64; amount_e8s : opt nat64; }; -type MintSnsTokensActionAuxiliary = record { valuation : opt Valuation }; + +type MintSnsTokensActionAuxiliary = record { + valuation : opt Valuation; +}; + type MintTokensRequest = record { recipient : opt Account; amount_e8s : opt nat64; }; -type Motion = record { motion_text : text }; + +type Motion = record { + motion_text : text; +}; + type NervousSystemFunction = record { id : nat64; name : text; description : opt text; function_type : opt FunctionType; }; + type NervousSystemParameters = record { default_followees : opt DefaultFollowees; max_dissolve_delay_seconds : opt nat64; @@ -313,6 +452,7 @@ type NervousSystemParameters = record { maturity_modulation_disabled : opt bool; max_number_of_principals_per_neuron : opt nat64; }; + type Neuron = record { id : opt NeuronId; staked_maturity_e8s_equivalent : opt nat64; @@ -330,12 +470,20 @@ type Neuron = record { followees : vec record { nat64; Followees }; neuron_fees_e8s : nat64; }; -type NeuronId = record { id : blob }; -type NeuronIds = record { neuron_ids : vec NeuronId }; + +type NeuronId = record { + id : blob; +}; + +type NeuronIds = record { + neuron_ids : vec NeuronId; +}; + type NeuronInFlightCommand = record { command : opt Command_2; timestamp : nat64; }; + type NeuronParameters = record { controller : opt principal; dissolve_delay_seconds : opt nat64; @@ -345,11 +493,16 @@ type NeuronParameters = record { hotkey : opt principal; neuron_id : opt NeuronId; }; + type NeuronPermission = record { "principal" : opt principal; permission_type : vec int32; }; -type NeuronPermissionList = record { permissions : vec int32 }; + +type NeuronPermissionList = record { + permissions : vec int32; +}; + type NeuronRecipe = record { controller : opt principal; dissolve_delay_seconds : opt nat64; @@ -358,12 +511,17 @@ type NeuronRecipe = record { followees : opt NeuronIds; neuron_id : opt NeuronId; }; -type NeuronRecipes = record { neuron_recipes : vec NeuronRecipe }; + +type NeuronRecipes = record { + neuron_recipes : vec NeuronRecipe; +}; + type NeuronsFund = record { nns_neuron_hotkeys : opt Principals; nns_neuron_controller : opt principal; nns_neuron_id : opt nat64; }; + type Operation = variant { ChangeAutoStakeMaturity : ChangeAutoStakeMaturity; StopDissolving : record {}; @@ -371,15 +529,27 @@ type Operation = variant { IncreaseDissolveDelay : IncreaseDissolveDelay; SetDissolveTimestamp : SetDissolveTimestamp; }; -type Participant = variant { NeuronsFund : NeuronsFund; Direct : record {} }; -type Percentage = record { basis_points : opt nat64 }; -type Principals = record { principals : vec principal }; + +type Participant = variant { + NeuronsFund : NeuronsFund; + Direct : record {}; +}; + +type Percentage = record { + basis_points : opt nat64; +}; + +type Principals = record { + principals : vec principal; +}; + type Proposal = record { url : text; title : text; action : opt Action; summary : text; }; + type ProposalData = record { id : opt ProposalId; payload_text_rendering : opt text; @@ -404,15 +574,35 @@ type ProposalData = record { is_eligible_for_rewards : bool; executed_timestamp_seconds : nat64; }; -type ProposalId = record { id : nat64 }; -type RegisterDappCanisters = record { canister_ids : vec principal }; -type RegisterVote = record { vote : int32; proposal : opt ProposalId }; + +type ProposalId = record { + id : nat64; +}; + +type RegisterDappCanisters = record { + canister_ids : vec principal; +}; + +type RegisterVote = record { + vote : int32; + proposal : opt ProposalId; +}; + type RemoveNeuronPermissions = record { permissions_to_remove : opt NeuronPermissionList; principal_id : opt principal; }; -type Result = variant { Error : GovernanceError; Neuron : Neuron }; -type Result_1 = variant { Error : GovernanceError; Proposal : ProposalData }; + +type Result = variant { + Error : GovernanceError; + Neuron : Neuron; +}; + +type Result_1 = variant { + Error : GovernanceError; + Proposal : ProposalData; +}; + type RewardEvent = record { rounds_since_last_distribution : opt nat64; actual_timestamp_seconds : nat64; @@ -422,24 +612,53 @@ type RewardEvent = record { round : nat64; settled_proposals : vec ProposalId; }; -type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 }; -type SetMode = record { mode : int32 }; -type Split = record { memo : nat64; amount_e8s : nat64 }; -type SplitResponse = record { created_neuron_id : opt NeuronId }; -type StakeMaturity = record { percentage_to_stake : opt nat32 }; + +type SetDissolveTimestamp = record { + dissolve_timestamp_seconds : nat64; +}; + +type SetMode = record { + mode : int32; +}; + +type Split = record { + memo : nat64; + amount_e8s : nat64; +}; + +type SplitResponse = record { + created_neuron_id : opt NeuronId; +}; + +type StakeMaturity = record { + percentage_to_stake : opt nat32; +}; + type StakeMaturityResponse = record { maturity_e8s : nat64; staked_maturity_e8s : nat64; }; -type Subaccount = record { subaccount : blob }; -type SwapNeuron = record { id : opt NeuronId; status : int32 }; + +type Subaccount = record { + subaccount : blob; +}; + +type SwapNeuron = record { + id : opt NeuronId; + status : int32; +}; + type Tally = record { no : nat64; yes : nat64; total : nat64; timestamp_seconds : nat64; }; -type Tokens = record { e8s : opt nat64 }; + +type Tokens = record { + e8s : opt nat64; +}; + type TransferSnsTreasuryFunds = record { from_treasury : int32; to_principal : opt principal; @@ -447,29 +666,34 @@ type TransferSnsTreasuryFunds = record { memo : opt nat64; amount_e8s : nat64; }; + type UpgradeInProgress = record { mark_failed_at_seconds : nat64; checking_upgrade_lock : nat64; proposal_id : nat64; target_version : opt Version; }; + type UpgradeSnsControlledCanister = record { new_canister_wasm : blob; mode : opt int32; canister_id : opt principal; canister_upgrade_arg : opt blob; }; + type Valuation = record { token : opt int32; account : opt Account; valuation_factors : opt ValuationFactors; timestamp_seconds : opt nat64; }; + type ValuationFactors = record { xdrs_per_icp : opt Decimal; icps_per_token : opt Decimal; tokens : opt Tokens; }; + type Version = record { archive_wasm_hash : blob; root_wasm_hash : blob; @@ -478,13 +702,18 @@ type Version = record { governance_wasm_hash : blob; index_wasm_hash : blob; }; + type VotingRewardsParameters = record { final_reward_rate_basis_points : opt nat64; initial_reward_rate_basis_points : opt nat64; reward_rate_transition_duration_seconds : opt nat64; round_duration_seconds : opt nat64; }; -type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 }; + +type WaitForQuietState = record { + current_deadline_timestamp_seconds : nat64; +}; + service : (Governance) -> { add_maturity : (AddMaturityRequest) -> (AddMaturityResponse); claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse); @@ -511,4 +740,4 @@ service : (Governance) -> { mint_tokens : (MintTokensRequest) -> (record {}); set_mode : (SetMode) -> (record {}); update_neuron : (Neuron) -> (opt GovernanceError); -} \ No newline at end of file +} diff --git a/packages/sns/candid/sns_governance_test.idl.js b/packages/sns/candid/sns_governance_test.idl.js index 2ff3e9e38..2114249c4 100644 --- a/packages/sns/candid/sns_governance_test.idl.js +++ b/packages/sns/candid/sns_governance_test.idl.js @@ -460,6 +460,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_root.certified.idl.js b/packages/sns/candid/sns_root.certified.idl.js index 2ecd76d48..cc7d682ab 100644 --- a/packages/sns/candid/sns_root.certified.idl.js +++ b/packages/sns/candid/sns_root.certified.idl.js @@ -58,6 +58,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_root.d.ts b/packages/sns/candid/sns_root.d.ts index 727d2dad9..60d93feeb 100644 --- a/packages/sns/candid/sns_root.d.ts +++ b/packages/sns/candid/sns_root.d.ts @@ -59,6 +59,7 @@ export interface DefiniteCanisterSettings { export interface DefiniteCanisterSettingsArgs { freezing_threshold: bigint; controllers: Array; + wasm_memory_limit: [] | [bigint]; memory_allocation: bigint; compute_allocation: bigint; } diff --git a/packages/sns/candid/sns_root.did b/packages/sns/candid/sns_root.did index 877d10d89..efd414a05 100644 --- a/packages/sns/candid/sns_root.did +++ b/packages/sns/candid/sns_root.did @@ -1,7 +1,19 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/sns/root/canister/root.did' by import-candid -type CanisterCallError = record { code : opt int32; description : text }; -type CanisterIdRecord = record { canister_id : principal }; -type CanisterInstallMode = variant { reinstall; upgrade; install }; +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/sns/root/canister/root.did' by import-candid +type CanisterCallError = record { + code : opt int32; + description : text; +}; + +type CanisterIdRecord = record { + canister_id : principal; +}; + +type CanisterInstallMode = variant { + reinstall; + upgrade; + install; +}; + type CanisterStatusResult = record { status : CanisterStatusType; memory_size : nat; @@ -11,6 +23,7 @@ type CanisterStatusResult = record { module_hash : opt blob; reserved_cycles : opt nat; }; + type CanisterStatusResultV2 = record { status : CanisterStatusType; memory_size : nat; @@ -19,11 +32,18 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : nat; module_hash : opt blob; }; -type CanisterStatusType = variant { stopped; stopping; running }; + +type CanisterStatusType = variant { + stopped; + stopping; + running; +}; + type CanisterSummary = record { status : opt CanisterStatusResultV2; canister_id : opt principal; }; + type ChangeCanisterRequest = record { arg : blob; wasm_module : blob; @@ -33,6 +53,7 @@ type ChangeCanisterRequest = record { memory_allocation : opt nat; compute_allocation : opt nat; }; + type DefiniteCanisterSettings = record { freezing_threshold : opt nat; controllers : vec principal; @@ -42,17 +63,24 @@ type DefiniteCanisterSettings = record { memory_allocation : opt nat; compute_allocation : opt nat; }; + type DefiniteCanisterSettingsArgs = record { freezing_threshold : nat; controllers : vec principal; + wasm_memory_limit : opt nat; memory_allocation : nat; compute_allocation : nat; }; + type FailedUpdate = record { err : opt CanisterCallError; dapp_canister_id : opt principal; }; -type GetSnsCanistersSummaryRequest = record { update_canister_list : opt bool }; + +type GetSnsCanistersSummaryRequest = record { + update_canister_list : opt bool; +}; + type GetSnsCanistersSummaryResponse = record { root : opt CanisterSummary; swap : opt CanisterSummary; @@ -62,6 +90,7 @@ type GetSnsCanistersSummaryResponse = record { dapps : vec CanisterSummary; archives : vec CanisterSummary; }; + type ListSnsCanistersResponse = record { root : opt principal; swap : opt principal; @@ -71,7 +100,12 @@ type ListSnsCanistersResponse = record { dapps : vec principal; archives : vec principal; }; -type LogVisibility = variant { controllers; public }; + +type LogVisibility = variant { + controllers; + public; +}; + type ManageDappCanisterSettingsRequest = record { freezing_threshold : opt nat64; canister_ids : vec principal; @@ -81,14 +115,28 @@ type ManageDappCanisterSettingsRequest = record { memory_allocation : opt nat64; compute_allocation : opt nat64; }; -type ManageDappCanisterSettingsResponse = record { failure_reason : opt text }; -type RegisterDappCanisterRequest = record { canister_id : opt principal }; -type RegisterDappCanistersRequest = record { canister_ids : vec principal }; + +type ManageDappCanisterSettingsResponse = record { + failure_reason : opt text; +}; + +type RegisterDappCanisterRequest = record { + canister_id : opt principal; +}; + +type RegisterDappCanistersRequest = record { + canister_ids : vec principal; +}; + type SetDappControllersRequest = record { canister_ids : opt RegisterDappCanistersRequest; controller_principal_ids : vec principal; }; -type SetDappControllersResponse = record { failed_updates : vec FailedUpdate }; + +type SetDappControllersResponse = record { + failed_updates : vec FailedUpdate; +}; + type SnsRootCanister = record { dapp_canister_ids : vec principal; testflight : bool; @@ -99,6 +147,7 @@ type SnsRootCanister = record { swap_canister_id : opt principal; ledger_canister_id : opt principal; }; + service : (SnsRootCanister) -> { canister_status : (CanisterIdRecord) -> (CanisterStatusResult); change_canister : (ChangeCanisterRequest) -> (); @@ -115,4 +164,4 @@ service : (SnsRootCanister) -> { set_dapp_controllers : (SetDappControllersRequest) -> ( SetDappControllersResponse, ); -} \ No newline at end of file +} diff --git a/packages/sns/candid/sns_root.idl.js b/packages/sns/candid/sns_root.idl.js index 38599e262..616b979aa 100644 --- a/packages/sns/candid/sns_root.idl.js +++ b/packages/sns/candid/sns_root.idl.js @@ -58,6 +58,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_swap.certified.idl.js b/packages/sns/candid/sns_swap.certified.idl.js index dfc2e79cb..b7e40fb30 100644 --- a/packages/sns/candid/sns_swap.certified.idl.js +++ b/packages/sns/candid/sns_swap.certified.idl.js @@ -165,6 +165,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, }); diff --git a/packages/sns/candid/sns_swap.d.ts b/packages/sns/candid/sns_swap.d.ts index 50c611d23..928159b2c 100644 --- a/packages/sns/candid/sns_swap.d.ts +++ b/packages/sns/candid/sns_swap.d.ts @@ -45,6 +45,7 @@ export interface Countries { export interface DefiniteCanisterSettingsArgs { freezing_threshold: bigint; controllers: Array; + wasm_memory_limit: [] | [bigint]; memory_allocation: bigint; compute_allocation: bigint; } diff --git a/packages/sns/candid/sns_swap.did b/packages/sns/candid/sns_swap.did index c13e02f50..cb2e22ac3 100644 --- a/packages/sns/candid/sns_swap.did +++ b/packages/sns/candid/sns_swap.did @@ -1,9 +1,14 @@ -// Generated from IC repo commit 3d6a76e (2024-08-14 tags: release-2024-08-21_15-36-canister-snapshots) 'rs/sns/swap/canister/swap.did' by import-candid +// Generated from IC repo commit 35bfcad (2024-08-29 tags: release-2024-08-29_01-30-base) 'rs/sns/swap/canister/swap.did' by import-candid type BuyerState = record { icp : opt TransferableAmount; has_created_neuron_recipes : opt bool; }; -type CanisterCallError = record { code : opt int32; description : text }; + +type CanisterCallError = record { + code : opt int32; + description : text; +}; + type CanisterStatusResultV2 = record { status : CanisterStatusType; memory_size : nat; @@ -12,31 +17,45 @@ type CanisterStatusResultV2 = record { idle_cycles_burned_per_day : nat; module_hash : opt blob; }; -type CanisterStatusType = variant { stopped; stopping; running }; + +type CanisterStatusType = variant { + stopped; + stopping; + running; +}; + type CfInvestment = record { controller : opt principal; hotkey_principal : text; hotkeys : opt Principals; nns_neuron_id : nat64; }; + type CfNeuron = record { has_created_neuron_recipes : opt bool; hotkeys : opt Principals; nns_neuron_id : nat64; amount_icp_e8s : nat64; }; + type CfParticipant = record { controller : opt principal; hotkey_principal : text; cf_neurons : vec CfNeuron; }; -type Countries = record { iso_codes : vec text }; + +type Countries = record { + iso_codes : vec text; +}; + type DefiniteCanisterSettingsArgs = record { freezing_threshold : nat; controllers : vec principal; + wasm_memory_limit : opt nat; memory_allocation : nat; compute_allocation : nat; }; + type DerivedState = record { sns_tokens_per_icp : float32; buyer_total_icp_e8s : nat64; @@ -46,21 +65,43 @@ type DerivedState = record { direct_participant_count : opt nat64; cf_neuron_count : opt nat64; }; -type DirectInvestment = record { buyer_principal : text }; -type Err = record { description : opt text; error_type : opt int32 }; -type Err_1 = record { error_type : opt int32 }; + +type DirectInvestment = record { + buyer_principal : text; +}; + +type Err = record { + description : opt text; + error_type : opt int32; +}; + +type Err_1 = record { + error_type : opt int32; +}; + type Err_2 = record { invalid_user_amount : opt InvalidUserAmount; existing_ticket : opt Ticket; error_type : int32; }; -type Error = record { message : opt text }; -type ErrorRefundIcpRequest = record { source_principal_id : opt principal }; -type ErrorRefundIcpResponse = record { result : opt Result }; + +type Error = record { + message : opt text; +}; + +type ErrorRefundIcpRequest = record { + source_principal_id : opt principal; +}; + +type ErrorRefundIcpResponse = record { + result : opt Result; +}; + type FailedUpdate = record { err : opt CanisterCallError; dapp_canister_id : opt principal; }; + type FinalizeSwapResponse = record { set_dapp_controllers_call_result : opt SetDappControllersCallResult; create_sns_neuron_recipes_result : opt SweepResult; @@ -72,14 +113,25 @@ type FinalizeSwapResponse = record { claim_neuron_result : opt SweepResult; sweep_sns_result : opt SweepResult; }; + type GetAutoFinalizationStatusResponse = record { auto_finalize_swap_response : opt FinalizeSwapResponse; has_auto_finalize_been_attempted : opt bool; is_auto_finalize_enabled : opt bool; }; -type GetBuyerStateRequest = record { principal_id : opt principal }; -type GetBuyerStateResponse = record { buyer_state : opt BuyerState }; -type GetBuyersTotalResponse = record { buyers_total : nat64 }; + +type GetBuyerStateRequest = record { + principal_id : opt principal; +}; + +type GetBuyerStateResponse = record { + buyer_state : opt BuyerState; +}; + +type GetBuyersTotalResponse = record { + buyers_total : nat64; +}; + type GetDerivedStateResponse = record { sns_tokens_per_icp : opt float64; buyer_total_icp_e8s : opt nat64; @@ -89,20 +141,44 @@ type GetDerivedStateResponse = record { direct_participant_count : opt nat64; cf_neuron_count : opt nat64; }; -type GetInitResponse = record { init : opt Init }; + +type GetInitResponse = record { + init : opt Init; +}; + type GetLifecycleResponse = record { decentralization_sale_open_timestamp_seconds : opt nat64; lifecycle : opt int32; decentralization_swap_termination_timestamp_seconds : opt nat64; }; -type GetOpenTicketResponse = record { result : opt Result_1 }; -type GetSaleParametersResponse = record { params : opt Params }; -type GetStateResponse = record { swap : opt Swap; derived : opt DerivedState }; -type GovernanceError = record { error_message : text; error_type : int32 }; -type Icrc1Account = record { owner : opt principal; subaccount : opt blob }; + +type GetOpenTicketResponse = record { + result : opt Result_1; +}; + +type GetSaleParametersResponse = record { + params : opt Params; +}; + +type GetStateResponse = record { + swap : opt Swap; + derived : opt DerivedState; +}; + +type GovernanceError = record { + error_message : text; + error_type : int32; +}; + +type Icrc1Account = record { + owner : opt principal; + subaccount : opt blob; +}; + type IdealMatchedParticipationFunction = record { serialized_representation : opt text; }; + type Init = record { nns_proposal_id : opt nat64; sns_root_canister_id : text; @@ -130,14 +206,17 @@ type Init = record { min_icp_e8s : opt nat64; max_direct_participation_icp_e8s : opt nat64; }; + type InvalidUserAmount = record { min_amount_icp_e8s_included : nat64; max_amount_icp_e8s_included : nat64; }; + type Investor = variant { CommunityFund : CfInvestment; Direct : DirectInvestment; }; + type LinearScalingCoefficient = record { slope_numerator : opt nat64; intercept_icp_e8s : opt nat64; @@ -145,52 +224,78 @@ type LinearScalingCoefficient = record { slope_denominator : opt nat64; to_direct_participation_icp_e8s : opt nat64; }; + type ListCommunityFundParticipantsRequest = record { offset : opt nat64; limit : opt nat32; }; + type ListCommunityFundParticipantsResponse = record { cf_participants : vec CfParticipant; }; + type ListDirectParticipantsRequest = record { offset : opt nat32; limit : opt nat32; }; -type ListDirectParticipantsResponse = record { participants : vec Participant }; + +type ListDirectParticipantsResponse = record { + participants : vec Participant; +}; + type ListSnsNeuronRecipesRequest = record { offset : opt nat64; limit : opt nat32; }; + type ListSnsNeuronRecipesResponse = record { sns_neuron_recipes : vec SnsNeuronRecipe; }; + type NeuronAttributes = record { dissolve_delay_seconds : nat64; memo : nat64; followees : vec NeuronId; }; + type NeuronBasketConstructionParameters = record { dissolve_delay_interval_seconds : nat64; count : nat64; }; -type NeuronId = record { id : blob }; + +type NeuronId = record { + id : blob; +}; + type NeuronsFundParticipationConstraints = record { coefficient_intervals : vec LinearScalingCoefficient; max_neurons_fund_participation_icp_e8s : opt nat64; min_direct_participation_threshold_icp_e8s : opt nat64; ideal_matched_participation_function : opt IdealMatchedParticipationFunction; }; + type NewSaleTicketRequest = record { subaccount : opt blob; amount_icp_e8s : nat64; }; -type NewSaleTicketResponse = record { result : opt Result_2 }; -type Ok = record { block_height : opt nat64 }; + +type NewSaleTicketResponse = record { + result : opt Result_2; +}; + +type Ok = record { + block_height : opt nat64; +}; + type Ok_1 = record { neurons_fund_participation_icp_e8s : opt nat64; neurons_fund_neurons_count : opt nat64; }; -type Ok_2 = record { ticket : opt Ticket }; + +type Ok_2 = record { + ticket : opt Ticket; +}; + type Params = record { min_participant_icp_e8s : nat64; neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters; @@ -204,45 +309,92 @@ type Params = record { min_icp_e8s : nat64; max_direct_participation_icp_e8s : opt nat64; }; + type Participant = record { participation : opt BuyerState; participant_id : opt principal; }; + type Possibility = variant { Ok : SetDappControllersResponse; Err : CanisterCallError; }; -type Possibility_1 = variant { Ok : Response; Err : CanisterCallError }; -type Possibility_2 = variant { Ok : Ok_1; Err : Error }; -type Possibility_3 = variant { Ok : record {}; Err : CanisterCallError }; -type Principals = record { principals : vec principal }; + +type Possibility_1 = variant { + Ok : Response; + Err : CanisterCallError; +}; + +type Possibility_2 = variant { + Ok : Ok_1; + Err : Error; +}; + +type Possibility_3 = variant { + Ok : record {}; + Err : CanisterCallError; +}; + +type Principals = record { + principals : vec principal; +}; + type RefreshBuyerTokensRequest = record { confirmation_text : opt text; buyer : text; }; + type RefreshBuyerTokensResponse = record { icp_accepted_participation_e8s : nat64; icp_ledger_account_balance_e8s : nat64; }; -type Response = record { governance_error : opt GovernanceError }; -type Result = variant { Ok : Ok; Err : Err }; -type Result_1 = variant { Ok : Ok_2; Err : Err_1 }; -type Result_2 = variant { Ok : Ok_2; Err : Err_2 }; -type SetDappControllersCallResult = record { possibility : opt Possibility }; -type SetDappControllersResponse = record { failed_updates : vec FailedUpdate }; -type SetModeCallResult = record { possibility : opt Possibility_3 }; + +type Response = record { + governance_error : opt GovernanceError; +}; + +type Result = variant { + Ok : Ok; + Err : Err; +}; + +type Result_1 = variant { + Ok : Ok_2; + Err : Err_1; +}; + +type Result_2 = variant { + Ok : Ok_2; + Err : Err_2; +}; + +type SetDappControllersCallResult = record { + possibility : opt Possibility; +}; + +type SetDappControllersResponse = record { + failed_updates : vec FailedUpdate; +}; + +type SetModeCallResult = record { + possibility : opt Possibility_3; +}; + type SettleCommunityFundParticipationResult = record { possibility : opt Possibility_1; }; + type SettleNeuronsFundParticipationResult = record { possibility : opt Possibility_2; }; + type SnsNeuronRecipe = record { sns : opt TransferableAmount; claimed_status : opt int32; neuron_attributes : opt NeuronAttributes; investor : opt Investor; }; + type Swap = record { auto_finalize_swap_response : opt FinalizeSwapResponse; neuron_recipes : vec SnsNeuronRecipe; @@ -262,6 +414,7 @@ type Swap = record { params : opt Params; open_sns_token_swap_proposal_id : opt nat64; }; + type SweepResult = record { failure : nat32; skipped : nat32; @@ -269,12 +422,14 @@ type SweepResult = record { success : nat32; global_failures : nat32; }; + type Ticket = record { creation_time : nat64; ticket_id : nat64; account : opt Icrc1Account; amount_icp_e8s : nat64; }; + type TransferableAmount = record { transfer_fee_paid_e8s : opt nat64; transfer_start_timestamp_seconds : nat64; @@ -282,6 +437,7 @@ type TransferableAmount = record { amount_transferred_e8s : opt nat64; transfer_success_timestamp_seconds : nat64; }; + service : (Init) -> { error_refund_icp : (ErrorRefundIcpRequest) -> (ErrorRefundIcpResponse); finalize_swap : (record {}) -> (FinalizeSwapResponse); @@ -311,4 +467,4 @@ service : (Init) -> { refresh_buyer_tokens : (RefreshBuyerTokensRequest) -> ( RefreshBuyerTokensResponse, ); -} \ No newline at end of file +} diff --git a/packages/sns/candid/sns_swap.idl.js b/packages/sns/candid/sns_swap.idl.js index 79a89edaa..245b4c647 100644 --- a/packages/sns/candid/sns_swap.idl.js +++ b/packages/sns/candid/sns_swap.idl.js @@ -165,6 +165,7 @@ export const idlFactory = ({ IDL }) => { const DefiniteCanisterSettingsArgs = IDL.Record({ 'freezing_threshold' : IDL.Nat, 'controllers' : IDL.Vec(IDL.Principal), + 'wasm_memory_limit' : IDL.Opt(IDL.Nat), 'memory_allocation' : IDL.Nat, 'compute_allocation' : IDL.Nat, });