@dfinity/sns 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/candid/sns_governance.certified.idl.js +121 -6
- package/dist/candid/sns_governance.d.ts +62 -1
- package/dist/candid/sns_governance.did +69 -9
- package/dist/candid/sns_governance.idl.js +121 -6
- package/dist/candid/sns_governance_test.certified.idl.js +121 -6
- package/dist/candid/sns_governance_test.d.ts +62 -1
- package/dist/candid/sns_governance_test.did +66 -2
- package/dist/candid/sns_governance_test.idl.js +121 -6
- package/dist/candid/sns_root.certified.idl.js +15 -0
- package/dist/candid/sns_root.d.ts +11 -0
- package/dist/candid/sns_root.did +14 -1
- package/dist/candid/sns_root.idl.js +15 -0
- package/dist/candid/sns_swap.certified.idl.js +2 -0
- package/dist/candid/sns_swap.d.ts +4 -0
- package/dist/candid/sns_swap.did +6 -1
- package/dist/candid/sns_swap.idl.js +2 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-BNILACKH.js +2 -0
- package/dist/esm/chunk-BNILACKH.js.map +7 -0
- package/dist/esm/chunk-LCH6N5XY.js +2 -0
- package/dist/esm/chunk-LCH6N5XY.js.map +7 -0
- package/dist/esm/{chunk-UV6BDZNF.js → chunk-X7UB3EAO.js} +2 -2
- package/dist/esm/chunk-XKKPAZAY.js +2 -0
- package/dist/esm/chunk-XKKPAZAY.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/root.canister.js +1 -1
- package/dist/esm/sns.js +1 -1
- package/dist/esm/swap.canister.js +1 -1
- package/package.json +3 -3
- package/dist/esm/chunk-4I3PWDTO.js +0 -2
- package/dist/esm/chunk-4I3PWDTO.js.map +0 -7
- package/dist/esm/chunk-5YPS4ZYR.js +0 -2
- package/dist/esm/chunk-5YPS4ZYR.js.map +0 -7
- package/dist/esm/chunk-I6XQKGWZ.js +0 -2
- package/dist/esm/chunk-I6XQKGWZ.js.map +0 -7
- /package/dist/esm/{chunk-UV6BDZNF.js.map → chunk-X7UB3EAO.js.map} +0 -0
|
@@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
3
3
|
const Timers = IDL.Record({
|
|
4
4
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
5
5
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
6
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
6
7
|
});
|
|
7
8
|
const Version = IDL.Record({
|
|
8
9
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -63,6 +64,59 @@ export const idlFactory = ({ IDL }) => {
|
|
|
63
64
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
64
65
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
65
66
|
});
|
|
67
|
+
const TargetVersionSet = IDL.Record({
|
|
68
|
+
'old_target_version' : IDL.Opt(Version),
|
|
69
|
+
'new_target_version' : IDL.Opt(Version),
|
|
70
|
+
});
|
|
71
|
+
const UpgradeStepsReset = IDL.Record({
|
|
72
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
73
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
74
|
+
});
|
|
75
|
+
const UpgradeOutcome = IDL.Record({
|
|
76
|
+
'status' : IDL.Opt(
|
|
77
|
+
IDL.Variant({
|
|
78
|
+
'Success' : IDL.Record({}),
|
|
79
|
+
'Timeout' : IDL.Record({}),
|
|
80
|
+
'ExternalFailure' : IDL.Record({}),
|
|
81
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
82
|
+
})
|
|
83
|
+
),
|
|
84
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
85
|
+
});
|
|
86
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
87
|
+
const UpgradeStarted = IDL.Record({
|
|
88
|
+
'current_version' : IDL.Opt(Version),
|
|
89
|
+
'expected_version' : IDL.Opt(Version),
|
|
90
|
+
'reason' : IDL.Opt(
|
|
91
|
+
IDL.Variant({
|
|
92
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
93
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
});
|
|
97
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
98
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
99
|
+
});
|
|
100
|
+
const TargetVersionReset = IDL.Record({
|
|
101
|
+
'old_target_version' : IDL.Opt(Version),
|
|
102
|
+
'new_target_version' : IDL.Opt(Version),
|
|
103
|
+
});
|
|
104
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
105
|
+
'event' : IDL.Opt(
|
|
106
|
+
IDL.Variant({
|
|
107
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
108
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
109
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
110
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
111
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
112
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
113
|
+
})
|
|
114
|
+
),
|
|
115
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
116
|
+
});
|
|
117
|
+
const UpgradeJournal = IDL.Record({
|
|
118
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
119
|
+
});
|
|
66
120
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
67
121
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
68
122
|
const DefaultFollowees = IDL.Record({
|
|
@@ -99,7 +153,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
99
153
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
100
154
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
101
155
|
});
|
|
102
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
103
156
|
const RewardEvent = IDL.Record({
|
|
104
157
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
105
158
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -109,7 +162,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
109
162
|
'round' : IDL.Nat64,
|
|
110
163
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
111
164
|
});
|
|
112
|
-
const
|
|
165
|
+
const PendingVersion = IDL.Record({
|
|
113
166
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
114
167
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
115
168
|
'proposal_id' : IDL.Nat64,
|
|
@@ -374,13 +427,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
374
427
|
),
|
|
375
428
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
376
429
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
430
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
377
431
|
'mode' : IDL.Int32,
|
|
378
432
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
379
433
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
380
434
|
'deployed_version' : IDL.Opt(Version),
|
|
381
435
|
'sns_initialization_parameters' : IDL.Text,
|
|
382
436
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
383
|
-
'pending_version' : IDL.Opt(
|
|
437
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
384
438
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
385
439
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
386
440
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -479,6 +533,12 @@ export const idlFactory = ({ IDL }) => {
|
|
|
479
533
|
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
480
534
|
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
481
535
|
});
|
|
536
|
+
const UpgradeInProgress = IDL.Record({
|
|
537
|
+
'mark_failed_at_seconds' : IDL.Nat64,
|
|
538
|
+
'checking_upgrade_lock' : IDL.Nat64,
|
|
539
|
+
'proposal_id' : IDL.Nat64,
|
|
540
|
+
'target_version' : IDL.Opt(Version),
|
|
541
|
+
});
|
|
482
542
|
const GetRunningSnsVersionResponse = IDL.Record({
|
|
483
543
|
'deployed_version' : IDL.Opt(Version),
|
|
484
544
|
'pending_version' : IDL.Opt(UpgradeInProgress),
|
|
@@ -489,6 +549,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
489
549
|
const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
|
|
490
550
|
const GetUpgradeJournalRequest = IDL.Record({});
|
|
491
551
|
const GetUpgradeJournalResponse = IDL.Record({
|
|
552
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
492
553
|
'upgrade_steps' : IDL.Opt(Versions),
|
|
493
554
|
'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
494
555
|
'target_version' : IDL.Opt(Version),
|
|
@@ -645,6 +706,7 @@ export const init = ({ IDL }) => {
|
|
|
645
706
|
const Timers = IDL.Record({
|
|
646
707
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
647
708
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
709
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
648
710
|
});
|
|
649
711
|
const Version = IDL.Record({
|
|
650
712
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -705,6 +767,59 @@ export const init = ({ IDL }) => {
|
|
|
705
767
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
706
768
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
707
769
|
});
|
|
770
|
+
const TargetVersionSet = IDL.Record({
|
|
771
|
+
'old_target_version' : IDL.Opt(Version),
|
|
772
|
+
'new_target_version' : IDL.Opt(Version),
|
|
773
|
+
});
|
|
774
|
+
const UpgradeStepsReset = IDL.Record({
|
|
775
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
776
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
777
|
+
});
|
|
778
|
+
const UpgradeOutcome = IDL.Record({
|
|
779
|
+
'status' : IDL.Opt(
|
|
780
|
+
IDL.Variant({
|
|
781
|
+
'Success' : IDL.Record({}),
|
|
782
|
+
'Timeout' : IDL.Record({}),
|
|
783
|
+
'ExternalFailure' : IDL.Record({}),
|
|
784
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
785
|
+
})
|
|
786
|
+
),
|
|
787
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
788
|
+
});
|
|
789
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
790
|
+
const UpgradeStarted = IDL.Record({
|
|
791
|
+
'current_version' : IDL.Opt(Version),
|
|
792
|
+
'expected_version' : IDL.Opt(Version),
|
|
793
|
+
'reason' : IDL.Opt(
|
|
794
|
+
IDL.Variant({
|
|
795
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
796
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
797
|
+
})
|
|
798
|
+
),
|
|
799
|
+
});
|
|
800
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
801
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
802
|
+
});
|
|
803
|
+
const TargetVersionReset = IDL.Record({
|
|
804
|
+
'old_target_version' : IDL.Opt(Version),
|
|
805
|
+
'new_target_version' : IDL.Opt(Version),
|
|
806
|
+
});
|
|
807
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
808
|
+
'event' : IDL.Opt(
|
|
809
|
+
IDL.Variant({
|
|
810
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
811
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
812
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
813
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
814
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
815
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
816
|
+
})
|
|
817
|
+
),
|
|
818
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
819
|
+
});
|
|
820
|
+
const UpgradeJournal = IDL.Record({
|
|
821
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
822
|
+
});
|
|
708
823
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
709
824
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
710
825
|
const DefaultFollowees = IDL.Record({
|
|
@@ -741,7 +856,6 @@ export const init = ({ IDL }) => {
|
|
|
741
856
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
742
857
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
743
858
|
});
|
|
744
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
745
859
|
const RewardEvent = IDL.Record({
|
|
746
860
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
747
861
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -751,7 +865,7 @@ export const init = ({ IDL }) => {
|
|
|
751
865
|
'round' : IDL.Nat64,
|
|
752
866
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
753
867
|
});
|
|
754
|
-
const
|
|
868
|
+
const PendingVersion = IDL.Record({
|
|
755
869
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
756
870
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
757
871
|
'proposal_id' : IDL.Nat64,
|
|
@@ -1016,13 +1130,14 @@ export const init = ({ IDL }) => {
|
|
|
1016
1130
|
),
|
|
1017
1131
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
1018
1132
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
1133
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
1019
1134
|
'mode' : IDL.Int32,
|
|
1020
1135
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
1021
1136
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
1022
1137
|
'deployed_version' : IDL.Opt(Version),
|
|
1023
1138
|
'sns_initialization_parameters' : IDL.Text,
|
|
1024
1139
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1025
|
-
'pending_version' : IDL.Opt(
|
|
1140
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
1026
1141
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
1027
1142
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
1028
1143
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -238,6 +238,7 @@ export interface GetTimersResponse {
|
|
|
238
238
|
}
|
|
239
239
|
export type GetUpgradeJournalRequest = {};
|
|
240
240
|
export interface GetUpgradeJournalResponse {
|
|
241
|
+
upgrade_journal: [] | [UpgradeJournal];
|
|
241
242
|
upgrade_steps: [] | [Versions];
|
|
242
243
|
response_timestamp_seconds: [] | [bigint];
|
|
243
244
|
target_version: [] | [Version];
|
|
@@ -249,13 +250,14 @@ export interface Governance {
|
|
|
249
250
|
id_to_nervous_system_functions: Array<[bigint, NervousSystemFunction]>;
|
|
250
251
|
metrics: [] | [GovernanceCachedMetrics];
|
|
251
252
|
maturity_modulation: [] | [MaturityModulation];
|
|
253
|
+
upgrade_journal: [] | [UpgradeJournal];
|
|
252
254
|
mode: number;
|
|
253
255
|
parameters: [] | [NervousSystemParameters];
|
|
254
256
|
is_finalizing_disburse_maturity: [] | [boolean];
|
|
255
257
|
deployed_version: [] | [Version];
|
|
256
258
|
sns_initialization_parameters: string;
|
|
257
259
|
latest_reward_event: [] | [RewardEvent];
|
|
258
|
-
pending_version: [] | [
|
|
260
|
+
pending_version: [] | [PendingVersion];
|
|
259
261
|
swap_canister_id: [] | [Principal];
|
|
260
262
|
ledger_canister_id: [] | [Principal];
|
|
261
263
|
proposals: Array<[bigint, ProposalData]>;
|
|
@@ -467,6 +469,12 @@ export type Operation =
|
|
|
467
469
|
| { IncreaseDissolveDelay: IncreaseDissolveDelay }
|
|
468
470
|
| { SetDissolveTimestamp: SetDissolveTimestamp };
|
|
469
471
|
export type Participant = { NeuronsFund: NeuronsFund } | { Direct: {} };
|
|
472
|
+
export interface PendingVersion {
|
|
473
|
+
mark_failed_at_seconds: bigint;
|
|
474
|
+
checking_upgrade_lock: bigint;
|
|
475
|
+
proposal_id: bigint;
|
|
476
|
+
target_version: [] | [Version];
|
|
477
|
+
}
|
|
470
478
|
export interface Percentage {
|
|
471
479
|
basis_points: [] | [bigint];
|
|
472
480
|
}
|
|
@@ -561,9 +569,18 @@ export interface Tally {
|
|
|
561
569
|
total: bigint;
|
|
562
570
|
timestamp_seconds: bigint;
|
|
563
571
|
}
|
|
572
|
+
export interface TargetVersionReset {
|
|
573
|
+
old_target_version: [] | [Version];
|
|
574
|
+
new_target_version: [] | [Version];
|
|
575
|
+
}
|
|
576
|
+
export interface TargetVersionSet {
|
|
577
|
+
old_target_version: [] | [Version];
|
|
578
|
+
new_target_version: [] | [Version];
|
|
579
|
+
}
|
|
564
580
|
export interface Timers {
|
|
565
581
|
last_spawned_timestamp_seconds: [] | [bigint];
|
|
566
582
|
last_reset_timestamp_seconds: [] | [bigint];
|
|
583
|
+
requires_periodic_tasks: [] | [boolean];
|
|
567
584
|
}
|
|
568
585
|
export interface Tokens {
|
|
569
586
|
e8s: [] | [bigint];
|
|
@@ -581,12 +598,56 @@ export interface UpgradeInProgress {
|
|
|
581
598
|
proposal_id: bigint;
|
|
582
599
|
target_version: [] | [Version];
|
|
583
600
|
}
|
|
601
|
+
export interface UpgradeJournal {
|
|
602
|
+
entries: Array<UpgradeJournalEntry>;
|
|
603
|
+
}
|
|
604
|
+
export interface UpgradeJournalEntry {
|
|
605
|
+
event:
|
|
606
|
+
| []
|
|
607
|
+
| [
|
|
608
|
+
| { TargetVersionSet: TargetVersionSet }
|
|
609
|
+
| { UpgradeStepsReset: UpgradeStepsReset }
|
|
610
|
+
| { UpgradeOutcome: UpgradeOutcome }
|
|
611
|
+
| { UpgradeStarted: UpgradeStarted }
|
|
612
|
+
| { UpgradeStepsRefreshed: UpgradeStepsRefreshed }
|
|
613
|
+
| { TargetVersionReset: TargetVersionReset },
|
|
614
|
+
];
|
|
615
|
+
timestamp_seconds: [] | [bigint];
|
|
616
|
+
}
|
|
617
|
+
export interface UpgradeOutcome {
|
|
618
|
+
status:
|
|
619
|
+
| []
|
|
620
|
+
| [
|
|
621
|
+
| { Success: {} }
|
|
622
|
+
| { Timeout: {} }
|
|
623
|
+
| { ExternalFailure: {} }
|
|
624
|
+
| { InvalidState: { version: [] | [Version] } },
|
|
625
|
+
];
|
|
626
|
+
human_readable: [] | [string];
|
|
627
|
+
}
|
|
584
628
|
export interface UpgradeSnsControlledCanister {
|
|
585
629
|
new_canister_wasm: Uint8Array | number[];
|
|
586
630
|
mode: [] | [number];
|
|
587
631
|
canister_id: [] | [Principal];
|
|
588
632
|
canister_upgrade_arg: [] | [Uint8Array | number[]];
|
|
589
633
|
}
|
|
634
|
+
export interface UpgradeStarted {
|
|
635
|
+
current_version: [] | [Version];
|
|
636
|
+
expected_version: [] | [Version];
|
|
637
|
+
reason:
|
|
638
|
+
| []
|
|
639
|
+
| [
|
|
640
|
+
| { UpgradeSnsToNextVersionProposal: ProposalId }
|
|
641
|
+
| { BehindTargetVersion: {} },
|
|
642
|
+
];
|
|
643
|
+
}
|
|
644
|
+
export interface UpgradeStepsRefreshed {
|
|
645
|
+
upgrade_steps: [] | [Versions];
|
|
646
|
+
}
|
|
647
|
+
export interface UpgradeStepsReset {
|
|
648
|
+
human_readable: [] | [string];
|
|
649
|
+
upgrade_steps: [] | [Versions];
|
|
650
|
+
}
|
|
590
651
|
export interface Valuation {
|
|
591
652
|
token: [] | [number];
|
|
592
653
|
account: [] | [Account];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/sns/governance/canister/governance_test.did' by import-candid
|
|
2
2
|
type Account = record {
|
|
3
3
|
owner : opt principal;
|
|
4
4
|
subaccount : opt Subaccount;
|
|
@@ -292,7 +292,7 @@ type Governance = record {
|
|
|
292
292
|
cached_upgrade_steps : opt CachedUpgradeSteps;
|
|
293
293
|
sns_initialization_parameters : text;
|
|
294
294
|
latest_reward_event : opt RewardEvent;
|
|
295
|
-
pending_version : opt
|
|
295
|
+
pending_version : opt PendingVersion;
|
|
296
296
|
swap_canister_id : opt principal;
|
|
297
297
|
ledger_canister_id : opt principal;
|
|
298
298
|
proposals : vec record { nat64; ProposalData };
|
|
@@ -302,9 +302,11 @@ type Governance = record {
|
|
|
302
302
|
genesis_timestamp_seconds : nat64;
|
|
303
303
|
target_version: opt Version;
|
|
304
304
|
timers : opt Timers;
|
|
305
|
+
upgrade_journal : opt UpgradeJournal;
|
|
305
306
|
};
|
|
306
307
|
|
|
307
308
|
type Timers = record {
|
|
309
|
+
requires_periodic_tasks : opt bool;
|
|
308
310
|
last_reset_timestamp_seconds : opt nat64;
|
|
309
311
|
last_spawned_timestamp_seconds : opt nat64;
|
|
310
312
|
};
|
|
@@ -691,6 +693,13 @@ type UpgradeInProgress = record {
|
|
|
691
693
|
target_version : opt Version;
|
|
692
694
|
};
|
|
693
695
|
|
|
696
|
+
type PendingVersion = record {
|
|
697
|
+
mark_failed_at_seconds : nat64;
|
|
698
|
+
checking_upgrade_lock : nat64;
|
|
699
|
+
proposal_id : nat64;
|
|
700
|
+
target_version : opt Version;
|
|
701
|
+
};
|
|
702
|
+
|
|
694
703
|
type UpgradeSnsControlledCanister = record {
|
|
695
704
|
new_canister_wasm : blob;
|
|
696
705
|
mode : opt int32;
|
|
@@ -733,12 +742,67 @@ type WaitForQuietState = record {
|
|
|
733
742
|
current_deadline_timestamp_seconds : nat64;
|
|
734
743
|
};
|
|
735
744
|
|
|
745
|
+
type UpgradeJournalEntry = record {
|
|
746
|
+
event : opt variant {
|
|
747
|
+
UpgradeStepsRefreshed : UpgradeStepsRefreshed;
|
|
748
|
+
UpgradeStepsReset : UpgradeStepsReset;
|
|
749
|
+
TargetVersionSet : TargetVersionSet;
|
|
750
|
+
TargetVersionReset : TargetVersionReset;
|
|
751
|
+
UpgradeStarted : UpgradeStarted;
|
|
752
|
+
UpgradeOutcome : UpgradeOutcome;
|
|
753
|
+
};
|
|
754
|
+
timestamp_seconds : opt nat64;
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
type UpgradeStepsRefreshed = record {
|
|
758
|
+
upgrade_steps : opt Versions;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
type UpgradeStepsReset = record {
|
|
762
|
+
human_readable : opt text;
|
|
763
|
+
upgrade_steps : opt Versions;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
type TargetVersionSet = record {
|
|
767
|
+
new_target_version : opt Version;
|
|
768
|
+
old_target_version : opt Version;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
type TargetVersionReset = record {
|
|
772
|
+
new_target_version : opt Version;
|
|
773
|
+
old_target_version : opt Version;
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
type UpgradeStarted = record {
|
|
777
|
+
current_version : opt Version;
|
|
778
|
+
expected_version : opt Version;
|
|
779
|
+
reason : opt variant {
|
|
780
|
+
UpgradeSnsToNextVersionProposal : ProposalId;
|
|
781
|
+
BehindTargetVersion : record {};
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
type UpgradeOutcome = record {
|
|
786
|
+
human_readable : opt text;
|
|
787
|
+
status : opt variant {
|
|
788
|
+
Success : record {};
|
|
789
|
+
Timeout : record {};
|
|
790
|
+
InvalidState : record { version : opt Version };
|
|
791
|
+
ExternalFailure : record {};
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
type UpgradeJournal = record {
|
|
796
|
+
entries : vec UpgradeJournalEntry;
|
|
797
|
+
};
|
|
798
|
+
|
|
736
799
|
type GetUpgradeJournalRequest = record {};
|
|
737
800
|
|
|
738
801
|
type GetUpgradeJournalResponse = record {
|
|
739
802
|
upgrade_steps : opt Versions;
|
|
740
803
|
response_timestamp_seconds : opt nat64;
|
|
741
804
|
target_version : opt Version;
|
|
805
|
+
upgrade_journal : opt UpgradeJournal;
|
|
742
806
|
};
|
|
743
807
|
|
|
744
808
|
type AdvanceTargetVersionRequest = record { target_version : opt Version; };
|
|
@@ -3,6 +3,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
3
3
|
const Timers = IDL.Record({
|
|
4
4
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
5
5
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
6
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
6
7
|
});
|
|
7
8
|
const Version = IDL.Record({
|
|
8
9
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -63,6 +64,59 @@ export const idlFactory = ({ IDL }) => {
|
|
|
63
64
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
64
65
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
65
66
|
});
|
|
67
|
+
const TargetVersionSet = IDL.Record({
|
|
68
|
+
'old_target_version' : IDL.Opt(Version),
|
|
69
|
+
'new_target_version' : IDL.Opt(Version),
|
|
70
|
+
});
|
|
71
|
+
const UpgradeStepsReset = IDL.Record({
|
|
72
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
73
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
74
|
+
});
|
|
75
|
+
const UpgradeOutcome = IDL.Record({
|
|
76
|
+
'status' : IDL.Opt(
|
|
77
|
+
IDL.Variant({
|
|
78
|
+
'Success' : IDL.Record({}),
|
|
79
|
+
'Timeout' : IDL.Record({}),
|
|
80
|
+
'ExternalFailure' : IDL.Record({}),
|
|
81
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
82
|
+
})
|
|
83
|
+
),
|
|
84
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
85
|
+
});
|
|
86
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
87
|
+
const UpgradeStarted = IDL.Record({
|
|
88
|
+
'current_version' : IDL.Opt(Version),
|
|
89
|
+
'expected_version' : IDL.Opt(Version),
|
|
90
|
+
'reason' : IDL.Opt(
|
|
91
|
+
IDL.Variant({
|
|
92
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
93
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
});
|
|
97
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
98
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
99
|
+
});
|
|
100
|
+
const TargetVersionReset = IDL.Record({
|
|
101
|
+
'old_target_version' : IDL.Opt(Version),
|
|
102
|
+
'new_target_version' : IDL.Opt(Version),
|
|
103
|
+
});
|
|
104
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
105
|
+
'event' : IDL.Opt(
|
|
106
|
+
IDL.Variant({
|
|
107
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
108
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
109
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
110
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
111
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
112
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
113
|
+
})
|
|
114
|
+
),
|
|
115
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
116
|
+
});
|
|
117
|
+
const UpgradeJournal = IDL.Record({
|
|
118
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
119
|
+
});
|
|
66
120
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
67
121
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
68
122
|
const DefaultFollowees = IDL.Record({
|
|
@@ -99,7 +153,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
99
153
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
100
154
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
101
155
|
});
|
|
102
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
103
156
|
const RewardEvent = IDL.Record({
|
|
104
157
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
105
158
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -109,7 +162,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
109
162
|
'round' : IDL.Nat64,
|
|
110
163
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
111
164
|
});
|
|
112
|
-
const
|
|
165
|
+
const PendingVersion = IDL.Record({
|
|
113
166
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
114
167
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
115
168
|
'proposal_id' : IDL.Nat64,
|
|
@@ -374,13 +427,14 @@ export const idlFactory = ({ IDL }) => {
|
|
|
374
427
|
),
|
|
375
428
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
376
429
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
430
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
377
431
|
'mode' : IDL.Int32,
|
|
378
432
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
379
433
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
380
434
|
'deployed_version' : IDL.Opt(Version),
|
|
381
435
|
'sns_initialization_parameters' : IDL.Text,
|
|
382
436
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
383
|
-
'pending_version' : IDL.Opt(
|
|
437
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
384
438
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
385
439
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
386
440
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
@@ -479,6 +533,12 @@ export const idlFactory = ({ IDL }) => {
|
|
|
479
533
|
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
480
534
|
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
481
535
|
});
|
|
536
|
+
const UpgradeInProgress = IDL.Record({
|
|
537
|
+
'mark_failed_at_seconds' : IDL.Nat64,
|
|
538
|
+
'checking_upgrade_lock' : IDL.Nat64,
|
|
539
|
+
'proposal_id' : IDL.Nat64,
|
|
540
|
+
'target_version' : IDL.Opt(Version),
|
|
541
|
+
});
|
|
482
542
|
const GetRunningSnsVersionResponse = IDL.Record({
|
|
483
543
|
'deployed_version' : IDL.Opt(Version),
|
|
484
544
|
'pending_version' : IDL.Opt(UpgradeInProgress),
|
|
@@ -489,6 +549,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
489
549
|
const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
|
|
490
550
|
const GetUpgradeJournalRequest = IDL.Record({});
|
|
491
551
|
const GetUpgradeJournalResponse = IDL.Record({
|
|
552
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
492
553
|
'upgrade_steps' : IDL.Opt(Versions),
|
|
493
554
|
'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
494
555
|
'target_version' : IDL.Opt(Version),
|
|
@@ -653,6 +714,7 @@ export const init = ({ IDL }) => {
|
|
|
653
714
|
const Timers = IDL.Record({
|
|
654
715
|
'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
655
716
|
'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
717
|
+
'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
|
|
656
718
|
});
|
|
657
719
|
const Version = IDL.Record({
|
|
658
720
|
'archive_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
@@ -713,6 +775,59 @@ export const init = ({ IDL }) => {
|
|
|
713
775
|
'current_basis_points' : IDL.Opt(IDL.Int32),
|
|
714
776
|
'updated_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
715
777
|
});
|
|
778
|
+
const TargetVersionSet = IDL.Record({
|
|
779
|
+
'old_target_version' : IDL.Opt(Version),
|
|
780
|
+
'new_target_version' : IDL.Opt(Version),
|
|
781
|
+
});
|
|
782
|
+
const UpgradeStepsReset = IDL.Record({
|
|
783
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
784
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
785
|
+
});
|
|
786
|
+
const UpgradeOutcome = IDL.Record({
|
|
787
|
+
'status' : IDL.Opt(
|
|
788
|
+
IDL.Variant({
|
|
789
|
+
'Success' : IDL.Record({}),
|
|
790
|
+
'Timeout' : IDL.Record({}),
|
|
791
|
+
'ExternalFailure' : IDL.Record({}),
|
|
792
|
+
'InvalidState' : IDL.Record({ 'version' : IDL.Opt(Version) }),
|
|
793
|
+
})
|
|
794
|
+
),
|
|
795
|
+
'human_readable' : IDL.Opt(IDL.Text),
|
|
796
|
+
});
|
|
797
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
798
|
+
const UpgradeStarted = IDL.Record({
|
|
799
|
+
'current_version' : IDL.Opt(Version),
|
|
800
|
+
'expected_version' : IDL.Opt(Version),
|
|
801
|
+
'reason' : IDL.Opt(
|
|
802
|
+
IDL.Variant({
|
|
803
|
+
'UpgradeSnsToNextVersionProposal' : ProposalId,
|
|
804
|
+
'BehindTargetVersion' : IDL.Record({}),
|
|
805
|
+
})
|
|
806
|
+
),
|
|
807
|
+
});
|
|
808
|
+
const UpgradeStepsRefreshed = IDL.Record({
|
|
809
|
+
'upgrade_steps' : IDL.Opt(Versions),
|
|
810
|
+
});
|
|
811
|
+
const TargetVersionReset = IDL.Record({
|
|
812
|
+
'old_target_version' : IDL.Opt(Version),
|
|
813
|
+
'new_target_version' : IDL.Opt(Version),
|
|
814
|
+
});
|
|
815
|
+
const UpgradeJournalEntry = IDL.Record({
|
|
816
|
+
'event' : IDL.Opt(
|
|
817
|
+
IDL.Variant({
|
|
818
|
+
'TargetVersionSet' : TargetVersionSet,
|
|
819
|
+
'UpgradeStepsReset' : UpgradeStepsReset,
|
|
820
|
+
'UpgradeOutcome' : UpgradeOutcome,
|
|
821
|
+
'UpgradeStarted' : UpgradeStarted,
|
|
822
|
+
'UpgradeStepsRefreshed' : UpgradeStepsRefreshed,
|
|
823
|
+
'TargetVersionReset' : TargetVersionReset,
|
|
824
|
+
})
|
|
825
|
+
),
|
|
826
|
+
'timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
827
|
+
});
|
|
828
|
+
const UpgradeJournal = IDL.Record({
|
|
829
|
+
'entries' : IDL.Vec(UpgradeJournalEntry),
|
|
830
|
+
});
|
|
716
831
|
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
717
832
|
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
718
833
|
const DefaultFollowees = IDL.Record({
|
|
@@ -749,7 +864,6 @@ export const init = ({ IDL }) => {
|
|
|
749
864
|
'maturity_modulation_disabled' : IDL.Opt(IDL.Bool),
|
|
750
865
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
751
866
|
});
|
|
752
|
-
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
753
867
|
const RewardEvent = IDL.Record({
|
|
754
868
|
'rounds_since_last_distribution' : IDL.Opt(IDL.Nat64),
|
|
755
869
|
'actual_timestamp_seconds' : IDL.Nat64,
|
|
@@ -759,7 +873,7 @@ export const init = ({ IDL }) => {
|
|
|
759
873
|
'round' : IDL.Nat64,
|
|
760
874
|
'settled_proposals' : IDL.Vec(ProposalId),
|
|
761
875
|
});
|
|
762
|
-
const
|
|
876
|
+
const PendingVersion = IDL.Record({
|
|
763
877
|
'mark_failed_at_seconds' : IDL.Nat64,
|
|
764
878
|
'checking_upgrade_lock' : IDL.Nat64,
|
|
765
879
|
'proposal_id' : IDL.Nat64,
|
|
@@ -1024,13 +1138,14 @@ export const init = ({ IDL }) => {
|
|
|
1024
1138
|
),
|
|
1025
1139
|
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
1026
1140
|
'maturity_modulation' : IDL.Opt(MaturityModulation),
|
|
1141
|
+
'upgrade_journal' : IDL.Opt(UpgradeJournal),
|
|
1027
1142
|
'mode' : IDL.Int32,
|
|
1028
1143
|
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
1029
1144
|
'is_finalizing_disburse_maturity' : IDL.Opt(IDL.Bool),
|
|
1030
1145
|
'deployed_version' : IDL.Opt(Version),
|
|
1031
1146
|
'sns_initialization_parameters' : IDL.Text,
|
|
1032
1147
|
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
1033
|
-
'pending_version' : IDL.Opt(
|
|
1148
|
+
'pending_version' : IDL.Opt(PendingVersion),
|
|
1034
1149
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
1035
1150
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
1036
1151
|
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|