mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Use explicit call indices (#12891)
* frame-system: explicit call index Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use explicit call indices Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * pallet-template: explicit call index Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * DNM: Temporarily require call_index Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "DNM: Temporarily require call_index" This reverts commit c4934e312e12af72ca05a8029d7da753a9c99346. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
6e0453a298
commit
31f5119ecd
@@ -311,6 +311,7 @@ pub mod pallet {
|
||||
///
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the transactor in the `Pool`.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(0)]
|
||||
pub fn submit_candidacy(origin: OriginFor<T>) -> DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
@@ -340,6 +341,7 @@ pub mod pallet {
|
||||
///
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the transactor in the `Pool`.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(0)]
|
||||
pub fn withdraw_candidacy(origin: OriginFor<T>, index: u32) -> DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
@@ -358,6 +360,7 @@ pub mod pallet {
|
||||
///
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of `dest` in the `Pool`.
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(0)]
|
||||
pub fn kick(
|
||||
origin: OriginFor<T>,
|
||||
@@ -382,6 +385,7 @@ pub mod pallet {
|
||||
///
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the `dest` in the `Pool`.
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(0)]
|
||||
pub fn score(
|
||||
origin: OriginFor<T>,
|
||||
@@ -421,6 +425,7 @@ pub mod pallet {
|
||||
/// (this happens each `Period`).
|
||||
///
|
||||
/// May only be called from root.
|
||||
#[pallet::call_index(4)]
|
||||
#[pallet::weight(0)]
|
||||
pub fn change_member_count(origin: OriginFor<T>, count: u32) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
|
||||
Reference in New Issue
Block a user