Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update candid #207

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update candid definitions
anchpop committed Jan 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9a48f924a7227d16bcd092de2f80db5866e35ecf
160 changes: 152 additions & 8 deletions candid/governance.did
Original file line number Diff line number Diff line change
@@ -39,7 +39,11 @@ type CanisterSummary = record {
status : opt CanisterStatusResultV2;
canister_id : opt principal;
};
type CfNeuron = record { nns_neuron_id : nat64; amount_icp_e8s : nat64 };
type CfNeuron = record {
has_created_neuron_recipes : opt bool;
nns_neuron_id : nat64;
amount_icp_e8s : nat64;
};
type CfParticipant = record {
hotkey_principal : text;
cf_neurons : vec CfNeuron;
@@ -77,7 +81,7 @@ type Command_1 = variant {
ClaimOrRefresh : ClaimOrRefreshResponse;
Configure : record {};
RegisterVote : record {};
Merge : record {};
Merge : MergeResponse;
DisburseToNeuron : SpawnResponse;
MakeProposal : MakeProposalResponse;
StakeMaturity : StakeMaturityResponse;
@@ -95,8 +99,18 @@ type Command_2 = variant {
MergeMaturity : MergeMaturity;
Disburse : Disburse;
};
type Committed = record { sns_governance_canister_id : opt principal };
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 Countries = record { iso_codes : vec text };
type CreateServiceNervousSystem = record {
url : opt text;
governance_parameters : opt GovernanceParameters;
@@ -135,43 +149,75 @@ type Duration = record { seconds : opt nat64 };
type ExecuteNnsFunction = record { nns_function : int32; payload : vec nat8 };
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;
most_recent_monthly_node_provider_rewards : opt MostRecentMonthlyNodeProviderRewards;
maturity_modulation_last_updated_at_timestamp_seconds : opt nat64;
wait_for_quiet_threshold_seconds : nat64;
metrics : opt GovernanceCachedMetrics;
neuron_management_voting_period_seconds : opt nat64;
node_providers : vec NodeProvider;
cached_daily_maturity_modulation_basis_points : opt int32;
economics : opt NetworkEconomics;
spawning_neurons : opt bool;
latest_reward_event : opt RewardEvent;
to_claim_transfers : vec NeuronStakeTransfer;
short_voting_period_seconds : nat64;
topic_followee_index : vec record { int32; FollowersMap };
migrations : opt Migrations;
proposals : vec record { nat64; ProposalData };
in_flight_commands : vec record { nat64; NeuronInFlightCommand };
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 };
dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64;
garbage_collectable_neurons_count : nat64;
dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record {
nat64;
float64;
};
neurons_with_invalid_stake_count : nat64;
not_dissolving_neurons_count_buckets : vec record { nat64; nat64 };
ect_neuron_count : nat64;
total_supply_icp : nat64;
neurons_with_less_than_6_months_dissolve_delay_count : nat64;
dissolved_neurons_count : nat64;
community_fund_total_maturity_e8s_equivalent : nat64;
total_staked_e8s_seed : nat64;
total_staked_maturity_e8s_equivalent_ect : nat64;
total_staked_e8s : nat64;
not_dissolving_neurons_count : nat64;
total_locked_e8s : nat64;
neurons_fund_total_active_neurons : nat64;
total_staked_maturity_e8s_equivalent : nat64;
not_dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 };
total_staked_e8s_ect : nat64;
not_dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64;
dissolved_neurons_e8s : nat64;
dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
neurons_with_less_than_6_months_dissolve_delay_e8s : nat64;
not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record {
nat64;
float64;
};
dissolving_neurons_count_buckets : vec record { nat64; nat64 };
dissolving_neurons_e8s_buckets_ect : vec record { nat64; float64 };
dissolving_neurons_count : nat64;
dissolving_neurons_e8s_buckets : vec record { nat64; float64 };
total_staked_maturity_e8s_equivalent_seed : nat64;
community_fund_total_staked_e8s : nat64;
not_dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
timestamp_seconds : nat64;
seed_neuron_count : nat64;
};
type GovernanceError = record { error_message : text; error_type : int32 };
type GovernanceParameters = record {
@@ -186,6 +232,9 @@ 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 IncreaseDissolveDelay = record {
additional_dissolve_delay_seconds : nat32;
@@ -218,13 +267,20 @@ type ListNeuronsResponse = record {
type ListNodeProvidersResponse = record { node_providers : vec NodeProvider };
type ListProposalInfo = record {
include_reward_status : vec int32;
omit_large_fields : opt bool;
before_proposal : opt NeuronId;
limit : nat32;
exclude_topic : vec int32;
include_all_manage_neuron_proposals : opt bool;
include_status : vec int32;
};
type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
type MakeProposalResponse = record { 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;
@@ -237,6 +293,21 @@ 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 MostRecentMonthlyNodeProviderRewards = record {
timestamp : nat64;
rewards : vec RewardNodeProvider;
@@ -258,6 +329,7 @@ type Neuron = record {
controller : opt principal;
recent_ballots : vec BallotInfo;
kyc_verified : bool;
neuron_type : opt int32;
not_for_profit : bool;
maturity_e8s_equivalent : nat64;
cached_neuron_stake_e8s : nat64;
@@ -301,6 +373,7 @@ type NeuronInFlightCommand = record {
type NeuronInfo = record {
dissolve_delay_seconds : nat64;
recent_ballots : vec BallotInfo;
neuron_type : opt int32;
created_timestamp_seconds : nat64;
state : int32;
stake_e8s : nat64;
@@ -319,10 +392,48 @@ type NeuronStakeTransfer = record {
transfer_timestamp : nat64;
block_height : 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 NeuronsFundNeuron = record {
hotkey_principal : opt text;
is_capped : opt bool;
nns_neuron_id : opt nat64;
amount_icp_e8s : opt nat64;
};
type NeuronsFundNeuronPortion = record {
hotkey_principal : opt principal;
is_capped : opt bool;
maturity_equivalent_icp_e8s : opt nat64;
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;
direct_participation_icp_e8s : opt nat64;
swap_participation_limits : opt SwapParticipationLimits;
max_neurons_fund_swap_participation_icp_e8s : opt nat64;
neurons_fund_reserves : opt NeuronsFundSnapshot;
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 OpenSnsTokenSwap = record {
community_fund_investment_e8s : opt nat64;
target_swap_canister_id : opt principal;
@@ -348,9 +459,12 @@ type Params = record {
sns_token_e8s : nat64;
sale_delay_seconds : opt nat64;
max_participant_icp_e8s : nat64;
min_direct_participation_icp_e8s : opt nat64;
min_icp_e8s : nat64;
max_direct_participation_icp_e8s : opt nat64;
};
type Percentage = record { basis_points : opt nat64 };
type Progress = variant { LastNeuronId : NeuronId };
type Proposal = record {
url : text;
title : opt text;
@@ -365,6 +479,7 @@ type ProposalData = record {
proposal_timestamp_seconds : nat64;
reward_event_round : nat64;
failed_timestamp_seconds : nat64;
neurons_fund_data : opt NeuronsFundData;
reject_cost_e8s : nat64;
derived_proposal_information : opt DerivedProposalInformation;
latest_tally : opt Tally;
@@ -399,12 +514,15 @@ type RegisterVote = record { vote : int32; proposal : opt NeuronId };
type RemoveHotKey = record { hot_key_to_remove : opt principal };
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 : NodeProvider; Err : GovernanceError };
type Result_7 = variant { Committed : Committed; Aborted : record {} };
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;
@@ -439,9 +557,14 @@ type SetSnsTokenSwapOpenTimeWindow = record {
swap_canister_id : opt principal;
};
type SettleCommunityFundParticipation = record {
result : opt Result_7;
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 Spawn = record {
percentage_to_spawn : opt nat32;
new_controller : opt principal;
@@ -467,11 +590,25 @@ type SwapBackgroundInformation = record {
type SwapDistribution = record { total : opt Tokens };
type SwapParameters = record {
minimum_participants : opt nat64;
neurons_fund_participation : opt bool;
duration : opt Duration;
neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters;
confirmation_text : opt text;
maximum_participant_icp : opt Tokens;
minimum_icp : opt Tokens;
minimum_direct_participation_icp : opt Tokens;
minimum_participant_icp : opt Tokens;
start_time : opt GlobalTimeOfDay;
maximum_direct_participation_icp : opt Tokens;
maximum_icp : opt Tokens;
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;
@@ -513,7 +650,10 @@ service : (Governance) -> {
get_neuron_info_by_id_or_subaccount : (NeuronIdOrSubaccount) -> (
Result_5,
) query;
get_node_provider_by_caller : (null) -> (Result_6) query;
get_neurons_fund_audit_info : (GetNeuronsFundAuditInfoRequest) -> (
GetNeuronsFundAuditInfoResponse,
) query;
get_node_provider_by_caller : (null) -> (Result_7) query;
get_pending_proposals : () -> (vec ProposalInfo) query;
get_proposal_info : (nat64) -> (opt ProposalInfo) query;
list_known_neurons : () -> (ListKnownNeuronsResponse) query;
@@ -524,6 +664,10 @@ service : (Governance) -> {
settle_community_fund_participation : (SettleCommunityFundParticipation) -> (
Result,
);
settle_neurons_fund_participation : (
SettleNeuronsFundParticipationRequest,
) -> (SettleNeuronsFundParticipationResponse);
simulate_manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
update_node_provider : (UpdateNodeProvider) -> (Result);
}
}
Loading