Skip to content

Commit

Permalink
Merge branch 'main' into build/publish-npm
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Oct 2, 2023
2 parents 8bd6e22 + 1a11bfb commit ad02b3c
Show file tree
Hide file tree
Showing 14 changed files with 180 additions and 6 deletions.
15 changes: 15 additions & 0 deletions packages/nns/candid/sns_wasm.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ export const idlFactory = ({ IDL }) => {
});
const Canister = IDL.Record({ 'id' : IDL.Opt(IDL.Principal) });
const DappCanisters = IDL.Record({ 'canisters' : IDL.Vec(Canister) });
const LinearScalingCoefficient = IDL.Record({
'slope_numerator' : IDL.Opt(IDL.Nat64),
'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'slope_denominator' : IDL.Opt(IDL.Nat64),
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const NeuronsFundParticipationConstraints = IDL.Record({
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const CfNeuron = IDL.Record({
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
Expand Down Expand Up @@ -92,6 +104,9 @@ export const idlFactory = ({ IDL }) => {
'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
'dapp_canisters' : IDL.Opt(DappCanisters),
'neurons_fund_participation_constraints' : IDL.Opt(
NeuronsFundParticipationConstraints
),
'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
Expand Down
15 changes: 15 additions & 0 deletions packages/nns/candid/sns_wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ export interface InsertUpgradePathEntriesRequest {
export interface InsertUpgradePathEntriesResponse {
error: [] | [SnsWasmError];
}
export interface LinearScalingCoefficient {
slope_numerator: [] | [bigint];
intercept_icp_e8s: [] | [bigint];
from_direct_participation_icp_e8s: [] | [bigint];
slope_denominator: [] | [bigint];
to_direct_participation_icp_e8s: [] | [bigint];
}
export interface ListDeployedSnsesResponse {
instances: Array<DeployedSns>;
}
Expand Down Expand Up @@ -116,6 +123,11 @@ export interface NeuronDistribution {
export interface NeuronsFundParticipants {
participants: Array<CfParticipant>;
}
export interface NeuronsFundParticipationConstraints {
coefficient_intervals: Array<LinearScalingCoefficient>;
max_neurons_fund_participation_icp_e8s: [] | [bigint];
min_direct_participation_threshold_icp_e8s: [] | [bigint];
}
export interface PrettySnsVersion {
archive_wasm_hash: string;
root_wasm_hash: string;
Expand Down Expand Up @@ -160,6 +172,9 @@ export interface SnsInitPayload {
wait_for_quiet_deadline_increase_seconds: [] | [bigint];
transaction_fee_e8s: [] | [bigint];
dapp_canisters: [] | [DappCanisters];
neurons_fund_participation_constraints:
| []
| [NeuronsFundParticipationConstraints];
neurons_fund_participants: [] | [NeuronsFundParticipants];
max_age_bonus_percentage: [] | [bigint];
initial_token_distribution: [] | [InitialTokenDistribution];
Expand Down
15 changes: 14 additions & 1 deletion packages/nns/candid/sns_wasm.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 72b42535224bc01c89266be2e9ec067cadf10515 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
// Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
type AddWasmRequest = record { hash : vec nat8; wasm : opt SnsWasm };
type AddWasmResponse = record { result : opt Result };
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
Expand Down Expand Up @@ -57,6 +57,13 @@ type InsertUpgradePathEntriesRequest = record {
sns_governance_canister_id : opt principal;
};
type InsertUpgradePathEntriesResponse = record { error : opt SnsWasmError };
type LinearScalingCoefficient = record {
slope_numerator : opt nat64;
intercept_icp_e8s : opt nat64;
from_direct_participation_icp_e8s : opt nat64;
slope_denominator : opt nat64;
to_direct_participation_icp_e8s : opt nat64;
};
type ListDeployedSnsesResponse = record { instances : vec DeployedSns };
type ListUpgradeStep = record {
pretty_version : opt PrettySnsVersion;
Expand All @@ -80,6 +87,11 @@ type NeuronDistribution = record {
vesting_period_seconds : opt nat64;
};
type NeuronsFundParticipants = record { participants : vec CfParticipant };
type NeuronsFundParticipationConstraints = record {
coefficient_intervals : vec LinearScalingCoefficient;
max_neurons_fund_participation_icp_e8s : opt nat64;
min_direct_participation_threshold_icp_e8s : opt nat64;
};
type PrettySnsVersion = record {
archive_wasm_hash : text;
root_wasm_hash : text;
Expand Down Expand Up @@ -122,6 +134,7 @@ type SnsInitPayload = record {
wait_for_quiet_deadline_increase_seconds : opt nat64;
transaction_fee_e8s : opt nat64;
dapp_canisters : opt DappCanisters;
neurons_fund_participation_constraints : opt NeuronsFundParticipationConstraints;
neurons_fund_participants : opt NeuronsFundParticipants;
max_age_bonus_percentage : opt nat64;
initial_token_distribution : opt InitialTokenDistribution;
Expand Down
15 changes: 15 additions & 0 deletions packages/nns/candid/sns_wasm.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ export const idlFactory = ({ IDL }) => {
});
const Canister = IDL.Record({ 'id' : IDL.Opt(IDL.Principal) });
const DappCanisters = IDL.Record({ 'canisters' : IDL.Vec(Canister) });
const LinearScalingCoefficient = IDL.Record({
'slope_numerator' : IDL.Opt(IDL.Nat64),
'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'slope_denominator' : IDL.Opt(IDL.Nat64),
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const NeuronsFundParticipationConstraints = IDL.Record({
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const CfNeuron = IDL.Record({
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
Expand Down Expand Up @@ -92,6 +104,9 @@ export const idlFactory = ({ IDL }) => {
'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
'dapp_canisters' : IDL.Opt(DappCanisters),
'neurons_fund_participation_constraints' : IDL.Opt(
NeuronsFundParticipationConstraints
),
'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),
Expand Down
2 changes: 1 addition & 1 deletion packages/sns/candid/sns_governance.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 4fbe776aeea08222b8b47f5f2902fe77b58b7150 'rs/sns/governance/canister/governance.did' by import-candid
// Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/sns/governance/canister/governance.did' by import-candid
type Account = record { owner : opt principal; subaccount : opt Subaccount };
type Action = variant {
ManageNervousSystemParameters : NervousSystemParameters;
Expand Down
2 changes: 1 addition & 1 deletion packages/sns/candid/sns_governance_test.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 4fbe776aeea08222b8b47f5f2902fe77b58b7150 'rs/sns/governance/canister/governance_test.did' by import-candid
// Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/sns/governance/canister/governance_test.did' by import-candid
type Account = record { owner : opt principal; subaccount : opt Subaccount };
type Action = variant {
ManageNervousSystemParameters : NervousSystemParameters;
Expand Down
2 changes: 1 addition & 1 deletion packages/sns/candid/sns_root.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 726b1529fd34a47fcf0627a72301d62a282c788d 'rs/sns/root/canister/root.did' by import-candid
// Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/sns/root/canister/root.did' by import-candid
type AuthzChangeOp = variant {
Authorize : record { add_self : bool };
Deauthorize;
Expand Down
36 changes: 36 additions & 0 deletions packages/sns/candid/sns_swap.certified.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ export const idlFactory = ({ IDL }) => {
'dissolve_delay_interval_seconds' : IDL.Nat64,
'count' : IDL.Nat64,
});
const LinearScalingCoefficient = IDL.Record({
'slope_numerator' : IDL.Opt(IDL.Nat64),
'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'slope_denominator' : IDL.Opt(IDL.Nat64),
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const NeuronsFundParticipationConstraints = IDL.Record({
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const CfNeuron = IDL.Record({
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
Expand Down Expand Up @@ -35,6 +47,9 @@ export const idlFactory = ({ IDL }) => {
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
'icp_ledger_canister_id' : IDL.Text,
'sns_ledger_canister_id' : IDL.Text,
'neurons_fund_participation_constraints' : IDL.Opt(
NeuronsFundParticipationConstraints
),
'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),
'should_auto_finalize' : IDL.Opt(IDL.Bool),
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
Expand Down Expand Up @@ -152,6 +167,8 @@ export const idlFactory = ({ IDL }) => {
'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),
'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),
'cf_participant_count' : IDL.Opt(IDL.Nat64),
'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'direct_participant_count' : IDL.Opt(IDL.Nat64),
'cf_neuron_count' : IDL.Opt(IDL.Nat64),
});
Expand Down Expand Up @@ -218,9 +235,11 @@ export const idlFactory = ({ IDL }) => {
'cf_participants' : IDL.Vec(CfParticipant),
'init' : IDL.Opt(Init),
'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),
'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(
IDL.Nat64
),
'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'lifecycle' : IDL.Int32,
'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),
'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),
Expand All @@ -231,6 +250,8 @@ export const idlFactory = ({ IDL }) => {
'sns_tokens_per_icp' : IDL.Float32,
'buyer_total_icp_e8s' : IDL.Nat64,
'cf_participant_count' : IDL.Opt(IDL.Nat64),
'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'direct_participant_count' : IDL.Opt(IDL.Nat64),
'cf_neuron_count' : IDL.Opt(IDL.Nat64),
});
Expand Down Expand Up @@ -368,6 +389,18 @@ export const init = ({ IDL }) => {
'dissolve_delay_interval_seconds' : IDL.Nat64,
'count' : IDL.Nat64,
});
const LinearScalingCoefficient = IDL.Record({
'slope_numerator' : IDL.Opt(IDL.Nat64),
'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'slope_denominator' : IDL.Opt(IDL.Nat64),
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const NeuronsFundParticipationConstraints = IDL.Record({
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
});
const CfNeuron = IDL.Record({
'nns_neuron_id' : IDL.Nat64,
'amount_icp_e8s' : IDL.Nat64,
Expand Down Expand Up @@ -399,6 +432,9 @@ export const init = ({ IDL }) => {
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
'icp_ledger_canister_id' : IDL.Text,
'sns_ledger_canister_id' : IDL.Text,
'neurons_fund_participation_constraints' : IDL.Opt(
NeuronsFundParticipationConstraints
),
'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),
'should_auto_finalize' : IDL.Opt(IDL.Bool),
'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
Expand Down
21 changes: 21 additions & 0 deletions packages/sns/candid/sns_swap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export interface DerivedState {
sns_tokens_per_icp: number;
buyer_total_icp_e8s: bigint;
cf_participant_count: [] | [bigint];
neurons_fund_participation_icp_e8s: [] | [bigint];
direct_participation_icp_e8s: [] | [bigint];
direct_participant_count: [] | [bigint];
cf_neuron_count: [] | [bigint];
}
Expand Down Expand Up @@ -102,6 +104,8 @@ export interface GetDerivedStateResponse {
sns_tokens_per_icp: [] | [number];
buyer_total_icp_e8s: [] | [bigint];
cf_participant_count: [] | [bigint];
neurons_fund_participation_icp_e8s: [] | [bigint];
direct_participation_icp_e8s: [] | [bigint];
direct_participant_count: [] | [bigint];
cf_neuron_count: [] | [bigint];
}
Expand Down Expand Up @@ -149,6 +153,9 @@ export interface Init {
transaction_fee_e8s: [] | [bigint];
icp_ledger_canister_id: string;
sns_ledger_canister_id: string;
neurons_fund_participation_constraints:
| []
| [NeuronsFundParticipationConstraints];
neurons_fund_participants: [] | [NeuronsFundParticipants];
should_auto_finalize: [] | [boolean];
max_participant_icp_e8s: [] | [bigint];
Expand All @@ -163,6 +170,13 @@ export interface InvalidUserAmount {
export type Investor =
| { CommunityFund: CfInvestment }
| { Direct: DirectInvestment };
export interface LinearScalingCoefficient {
slope_numerator: [] | [bigint];
intercept_icp_e8s: [] | [bigint];
from_direct_participation_icp_e8s: [] | [bigint];
slope_denominator: [] | [bigint];
to_direct_participation_icp_e8s: [] | [bigint];
}
export interface ListCommunityFundParticipantsRequest {
offset: [] | [bigint];
limit: [] | [number];
Expand Down Expand Up @@ -196,6 +210,11 @@ export interface NeuronId {
export interface NeuronsFundParticipants {
cf_participants: Array<CfParticipant>;
}
export interface NeuronsFundParticipationConstraints {
coefficient_intervals: Array<LinearScalingCoefficient>;
max_neurons_fund_participation_icp_e8s: [] | [bigint];
min_direct_participation_threshold_icp_e8s: [] | [bigint];
}
export interface NewSaleTicketRequest {
subaccount: [] | [Uint8Array];
amount_icp_e8s: bigint;
Expand Down Expand Up @@ -277,7 +296,9 @@ export interface Swap {
cf_participants: Array<CfParticipant>;
init: [] | [Init];
already_tried_to_auto_finalize: [] | [boolean];
neurons_fund_participation_icp_e8s: [] | [bigint];
purge_old_tickets_last_completion_timestamp_nanoseconds: [] | [bigint];
direct_participation_icp_e8s: [] | [bigint];
lifecycle: number;
purge_old_tickets_next_principal: [] | [Uint8Array];
buyers: Array<[string, BuyerState]>;
Expand Down
21 changes: 20 additions & 1 deletion packages/sns/candid/sns_swap.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from IC repo commit 726b1529fd34a47fcf0627a72301d62a282c788d 'rs/sns/swap/canister/swap.did' by import-candid
// Generated from IC repo commit 557b532805beb8d63c5ab65146d4e338849a50e1 'rs/sns/swap/canister/swap.did' by import-candid
type BuyerState = record { icp : opt TransferableAmount };
type CanisterCallError = record { code : opt int32; description : text };
type CanisterStatusResultV2 = record {
Expand Down Expand Up @@ -27,6 +27,8 @@ type DerivedState = record {
sns_tokens_per_icp : float32;
buyer_total_icp_e8s : nat64;
cf_participant_count : opt nat64;
neurons_fund_participation_icp_e8s : opt nat64;
direct_participation_icp_e8s : opt nat64;
direct_participant_count : opt nat64;
cf_neuron_count : opt nat64;
};
Expand Down Expand Up @@ -65,6 +67,8 @@ type GetDerivedStateResponse = record {
sns_tokens_per_icp : opt float64;
buyer_total_icp_e8s : opt nat64;
cf_participant_count : opt nat64;
neurons_fund_participation_icp_e8s : opt nat64;
direct_participation_icp_e8s : opt nat64;
direct_participant_count : opt nat64;
cf_neuron_count : opt nat64;
};
Expand Down Expand Up @@ -95,6 +99,7 @@ type Init = record {
transaction_fee_e8s : opt nat64;
icp_ledger_canister_id : text;
sns_ledger_canister_id : text;
neurons_fund_participation_constraints : opt NeuronsFundParticipationConstraints;
neurons_fund_participants : opt NeuronsFundParticipants;
should_auto_finalize : opt bool;
max_participant_icp_e8s : opt nat64;
Expand All @@ -110,6 +115,13 @@ type Investor = variant {
CommunityFund : CfInvestment;
Direct : DirectInvestment;
};
type LinearScalingCoefficient = record {
slope_numerator : opt nat64;
intercept_icp_e8s : opt nat64;
from_direct_participation_icp_e8s : opt nat64;
slope_denominator : opt nat64;
to_direct_participation_icp_e8s : opt nat64;
};
type ListCommunityFundParticipantsRequest = record {
offset : opt nat64;
limit : opt nat32;
Expand Down Expand Up @@ -137,6 +149,11 @@ type NeuronBasketConstructionParameters = record {
};
type NeuronId = record { id : vec nat8 };
type NeuronsFundParticipants = record { cf_participants : vec CfParticipant };
type NeuronsFundParticipationConstraints = record {
coefficient_intervals : vec LinearScalingCoefficient;
max_neurons_fund_participation_icp_e8s : opt nat64;
min_direct_participation_threshold_icp_e8s : opt nat64;
};
type NewSaleTicketRequest = record {
subaccount : opt vec nat8;
amount_icp_e8s : nat64;
Expand Down Expand Up @@ -203,7 +220,9 @@ type Swap = record {
cf_participants : vec CfParticipant;
init : opt Init;
already_tried_to_auto_finalize : opt bool;
neurons_fund_participation_icp_e8s : opt nat64;
purge_old_tickets_last_completion_timestamp_nanoseconds : opt nat64;
direct_participation_icp_e8s : opt nat64;
lifecycle : int32;
purge_old_tickets_next_principal : opt vec nat8;
buyers : vec record { text; BuyerState };
Expand Down
Loading

0 comments on commit ad02b3c

Please sign in to comment.