@@ -11,6 +11,11 @@ type AddPrizeInputV2 = record {
1111 quantity : nat16;
1212 expire : nat16;
1313};
14+ type Airdrop = record {
15+ weight : nat64;
16+ subaccount : opt text;
17+ neuron_id : opt text;
18+ };
1419type AirdropClaimInput = record {
1520 recaptcha : opt text;
1621 challenge : text;
@@ -40,6 +45,21 @@ type AirdropStateOutput = record {
4045 claimed : nat;
4146 claimable : nat;
4247};
48+ type Airdrops108Output = record {
49+ status : int8;
50+ ledger_updated_at : nat64;
51+ airdrops : vec Airdrop;
52+ ledger_weight_total : nat64;
53+ tokens_per_weight : float64;
54+ error : opt text;
55+ neurons_hash : text;
56+ neurons_airdropped : bool;
57+ ledger_hash : text;
58+ tokens_distributed : nat64;
59+ neurons_weight_total : nat64;
60+ neurons_updated_at : nat64;
61+ ledger_airdropped : bool;
62+ };
4363type CaptchaOutput = record { challenge : text; img_base64 : text };
4464type ClaimPrizeInput = record { challenge : blob; code : text };
4565type ClaimPrizeOutput = record {
@@ -102,18 +122,21 @@ type PrizeOutput = record {
102122};
103123type Result = variant { Ok : PrizeOutput; Err : text };
104124type Result_1 = variant { Ok; Err : text };
105- type Result_10 = variant { Ok : NameOutput; Err : text };
106- type Result_11 = variant { Ok : State; Err };
107- type Result_12 = variant { Ok : nat; Err : text };
108- type Result_13 = variant { Ok : principal; Err };
125+ type Result_10 = variant { Ok : nat64; Err : text };
126+ type Result_11 = variant { Ok : opt NameOutput; Err };
127+ type Result_12 = variant { Ok : principal; Err : text };
128+ type Result_13 = variant { Ok : NameOutput; Err : text };
129+ type Result_14 = variant { Ok : State; Err };
130+ type Result_15 = variant { Ok : nat; Err : text };
131+ type Result_16 = variant { Ok : principal; Err };
109132type Result_2 = variant { Ok : AirdropStateOutput; Err : text };
110133type Result_3 = variant { Ok : AirdropStateOutput; Err };
111- type Result_4 = variant { Ok : CaptchaOutput ; Err : text };
112- type Result_5 = variant { Ok : ClaimPrizeOutput ; Err : text };
113- type Result_6 = variant { Ok : LuckyDrawOutput ; Err : text };
114- type Result_7 = variant { Ok : text ; Err : text };
115- type Result_8 = variant { Ok : opt NameOutput ; Err };
116- type Result_9 = variant { Ok : principal ; Err : text };
134+ type Result_4 = variant { Ok : Airdrops108Output ; Err };
135+ type Result_5 = variant { Ok : CaptchaOutput ; Err : text };
136+ type Result_6 = variant { Ok : ClaimPrizeOutput ; Err : text };
137+ type Result_7 = variant { Ok : LuckyDrawOutput ; Err : text };
138+ type Result_8 = variant { Ok : text ; Err : text };
139+ type Result_9 = variant { Ok : bool ; Err : text };
117140type State = record {
118141 latest_luckydraw_logs : vec LuckyDrawLog;
119142 total_luckydraw : nat64;
@@ -135,34 +158,39 @@ type State = record {
135158service : () -> {
136159 add_prize : (AddPrizeInputV2) -> (Result);
137160 admin_collect_icp : (nat) -> (Result_1);
161+ admin_collect_tokens : (nat) -> (Result_1);
138162 admin_set_managers : (vec principal) -> (Result_1);
139163 airdrop : (AirdropClaimInput) -> (Result_2);
140164 airdrop_codes_of : (principal) -> (vec AirdropCodeOutput) query;
141165 airdrop_logs : (opt nat, opt nat) -> (vec AirdropLog) query;
142166 airdrop_state_of : (opt principal) -> (Result_3) query;
167+ airdrops108_of : (opt principal) -> (Result_4) query;
143168 api_version : () -> (nat16) query;
144- captcha : () -> (Result_4 );
145- claim_prize : (ClaimPrizeInput) -> (Result_5 );
169+ captcha : () -> (Result_5 );
170+ claim_prize : (ClaimPrizeInput) -> (Result_6 );
146171 harvest : (AirdropHarvestInput) -> (Result_2);
147- luckydraw : (LuckyDrawInput) -> (Result_6 );
172+ luckydraw : (LuckyDrawInput) -> (Result_7 );
148173 luckydraw_logs : (opt nat, opt nat) -> (vec LuckyDrawLog) query;
149174 manager_add_notification : (Notification) -> (Result_1);
150- manager_add_prize : (AddPrizeInput) -> (Result_7 );
151- manager_add_prize_v2 : (AddPrizeInputV2) -> (Result_7 );
175+ manager_add_prize : (AddPrizeInput) -> (Result_8 );
176+ manager_add_prize_v2 : (AddPrizeInputV2) -> (Result_8 );
152177 manager_ban_users : (vec principal) -> (Result_1);
153- manager_get_airdrop_key : () -> (Result_7 ) query;
178+ manager_get_airdrop_key : () -> (Result_8 ) query;
154179 manager_remove_notifications : (blob) -> (Result_1);
155180 manager_set_challenge_pub_key : (text) -> (Result_1);
181+ manager_start_airdrops108 : () -> (Result_9);
156182 manager_update_airdrop_amount : (nat64) -> (Result_1);
157183 manager_update_airdrop_balance : (nat64) -> (Result_1);
184+ manager_update_airdrops108_ledger_list : (blob) -> (Result_10);
185+ manager_update_airdrops108_neurons_list : (blob) -> (Result_10);
158186 manager_update_prize_subsidy : (
159187 opt record { nat64; nat16; nat32; nat8; nat32; nat16 },
160188 ) -> (Result_1);
161189 my_luckydraw_logs : (opt nat, opt nat) -> (vec LuckyDrawLog) query;
162- name_lookup : (text) -> (Result_8 ) query;
163- name_of : (opt principal) -> (Result_8 ) query;
190+ name_lookup : (text) -> (Result_11 ) query;
191+ name_of : (opt principal) -> (Result_11 ) query;
164192 notifications : () -> (vec Notification) query;
165- principal_by_luckycode : (text) -> (Result_9 ) query;
193+ principal_by_luckycode : (text) -> (Result_12 ) query;
166194 prize : (text) -> (Result_2);
167195 prize_claim_logs : (principal, opt nat, opt nat) -> (vec PrizeClaimLog) query;
168196 prize_info : (text, opt principal) -> (Result) query;
@@ -171,13 +199,14 @@ service : () -> {
171199 prizes_of : (opt principal) -> (
172200 vec record { nat32; nat32; nat16; nat32; nat16; nat16 },
173201 ) query;
174- register_name : (NameInput) -> (Result_10 );
175- state : () -> (Result_11 ) query;
176- unregister_name : (NameInput) -> (Result_12 );
177- update_name : (NameInput) -> (Result_10 );
178- validate2_admin_collect_icp : (nat) -> (Result_7 );
179- validate2_admin_set_managers : (vec principal) -> (Result_7 );
202+ register_name : (NameInput) -> (Result_13 );
203+ state : () -> (Result_14 ) query;
204+ unregister_name : (NameInput) -> (Result_15 );
205+ update_name : (NameInput) -> (Result_13 );
206+ validate2_admin_collect_icp : (nat) -> (Result_8 );
207+ validate2_admin_set_managers : (vec principal) -> (Result_8 );
180208 validate_admin_collect_icp : (nat) -> (Result_1);
209+ validate_admin_collect_tokens : (nat) -> (Result_8);
181210 validate_admin_set_managers : (vec principal) -> (Result_1);
182- whoami : () -> (Result_13 ) query;
211+ whoami : () -> (Result_16 ) query;
183212}
0 commit comments