mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51: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
@@ -166,6 +166,7 @@ pub mod pallet {
|
||||
/// Add a member `who` to the set.
|
||||
///
|
||||
/// May only be called from `T::AddOrigin`.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn add_member(origin: OriginFor<T>, who: AccountIdLookupOf<T>) -> DispatchResult {
|
||||
T::AddOrigin::ensure_origin(origin)?;
|
||||
@@ -188,6 +189,7 @@ pub mod pallet {
|
||||
/// Remove a member `who` from the set.
|
||||
///
|
||||
/// May only be called from `T::RemoveOrigin`.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn remove_member(origin: OriginFor<T>, who: AccountIdLookupOf<T>) -> DispatchResult {
|
||||
T::RemoveOrigin::ensure_origin(origin)?;
|
||||
@@ -211,6 +213,7 @@ pub mod pallet {
|
||||
/// May only be called from `T::SwapOrigin`.
|
||||
///
|
||||
/// Prime membership is *not* passed from `remove` to `add`, if extant.
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn swap_member(
|
||||
origin: OriginFor<T>,
|
||||
@@ -244,6 +247,7 @@ pub mod pallet {
|
||||
/// pass `members` pre-sorted.
|
||||
///
|
||||
/// May only be called from `T::ResetOrigin`.
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn reset_members(origin: OriginFor<T>, members: Vec<T::AccountId>) -> DispatchResult {
|
||||
T::ResetOrigin::ensure_origin(origin)?;
|
||||
@@ -266,6 +270,7 @@ pub mod pallet {
|
||||
/// May only be called from `Signed` origin of a current member.
|
||||
///
|
||||
/// Prime membership is passed from the origin account to `new`, if extant.
|
||||
#[pallet::call_index(4)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn change_key(origin: OriginFor<T>, new: AccountIdLookupOf<T>) -> DispatchResult {
|
||||
let remove = ensure_signed(origin)?;
|
||||
@@ -300,6 +305,7 @@ pub mod pallet {
|
||||
/// Set the prime member. Must be a current member.
|
||||
///
|
||||
/// May only be called from `T::PrimeOrigin`.
|
||||
#[pallet::call_index(5)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn set_prime(origin: OriginFor<T>, who: AccountIdLookupOf<T>) -> DispatchResult {
|
||||
T::PrimeOrigin::ensure_origin(origin)?;
|
||||
@@ -313,6 +319,7 @@ pub mod pallet {
|
||||
/// Remove the prime member if it exists.
|
||||
///
|
||||
/// May only be called from `T::PrimeOrigin`.
|
||||
#[pallet::call_index(6)]
|
||||
#[pallet::weight(50_000_000)]
|
||||
pub fn clear_prime(origin: OriginFor<T>) -> DispatchResult {
|
||||
T::PrimeOrigin::ensure_origin(origin)?;
|
||||
|
||||
Reference in New Issue
Block a user