@@ -159,6 +159,7 @@ mod pallet {
159
159
impl < T : Config > Pallet < T > {
160
160
/// Register the origin account as an executor.
161
161
// TODO: proper weight
162
+ #[ pallet:: call_index( 0 ) ]
162
163
#[ pallet:: weight( 10_000 ) ]
163
164
pub fn register (
164
165
origin : OriginFor < T > ,
@@ -207,6 +208,7 @@ mod pallet {
207
208
208
209
/// Declare no desire to be an executor and remove the registration.
209
210
// TODO: proper weight
211
+ #[ pallet:: call_index( 1 ) ]
210
212
#[ pallet:: weight( 10_000 ) ]
211
213
pub fn deregister ( origin : OriginFor < T > ) -> DispatchResult {
212
214
let _who = ensure_signed ( origin) ?;
@@ -223,6 +225,7 @@ mod pallet {
223
225
224
226
/// Increase the executor's stake by locking some more balance.
225
227
// TODO: proper weight
228
+ #[ pallet:: call_index( 2 ) ]
226
229
#[ pallet:: weight( 10_000 ) ]
227
230
pub fn increase_stake ( origin : OriginFor < T > , amount : BalanceOf < T > ) -> DispatchResult {
228
231
let who = ensure_signed ( origin) ?;
@@ -271,6 +274,7 @@ mod pallet {
271
274
/// The reduced stake will be held locked for a while until it
272
275
/// can be withdrawn to be transferrable.
273
276
// TODO: proper weight
277
+ #[ pallet:: call_index( 3 ) ]
274
278
#[ pallet:: weight( 10_000 ) ]
275
279
pub fn decrease_stake ( origin : OriginFor < T > , amount : BalanceOf < T > ) -> DispatchResult {
276
280
let who = ensure_signed ( origin) ?;
@@ -325,6 +329,7 @@ mod pallet {
325
329
///
326
330
/// The balance being locked will become free on success.
327
331
// TODO: proper weight
332
+ #[ pallet:: call_index( 4 ) ]
328
333
#[ pallet:: weight( 10_000 ) ]
329
334
pub fn withdraw_decreased_stake (
330
335
origin : OriginFor < T > ,
@@ -374,6 +379,7 @@ mod pallet {
374
379
375
380
/// Stop participating in the bundle election temporarily.
376
381
// TODO: proper weight
382
+ #[ pallet:: call_index( 5 ) ]
377
383
#[ pallet:: weight( 10_000 ) ]
378
384
pub fn pause_execution ( origin : OriginFor < T > ) -> DispatchResult {
379
385
let who = ensure_signed ( origin) ?;
@@ -409,6 +415,7 @@ mod pallet {
409
415
410
416
/// Participate in the bundle election again.
411
417
// TODO: proper weight
418
+ #[ pallet:: call_index( 6 ) ]
412
419
#[ pallet:: weight( 10_000 ) ]
413
420
pub fn resume_execution ( origin : OriginFor < T > ) -> DispatchResult {
414
421
let who = ensure_signed ( origin) ?;
@@ -439,6 +446,7 @@ mod pallet {
439
446
///
440
447
/// It won't take effect until next epoch.
441
448
// TODO: proper weight
449
+ #[ pallet:: call_index( 7 ) ]
442
450
#[ pallet:: weight( 10_000 ) ]
443
451
pub fn update_public_key (
444
452
origin : OriginFor < T > ,
@@ -463,6 +471,7 @@ mod pallet {
463
471
464
472
/// Set a new reward address.
465
473
// TODO: proper weight
474
+ #[ pallet:: call_index( 8 ) ]
466
475
#[ pallet:: weight( 10_000 ) ]
467
476
pub fn update_reward_address ( origin : OriginFor < T > , new : T :: AccountId ) -> DispatchResult {
468
477
let who = ensure_signed ( origin) ?;
0 commit comments