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:
Oliver Tale-Yazdi authored and GitHub committed 2022-12-12 14:32:41 +00:00
1 parent 6e0453a298
commit 31f5119ecd
67 files changed
+403

No files matched your search

+4
View File
@@ -135,6 +135,7 @@ pub mod pallet {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[pallet::call_index(0)]
#[pallet::weight(50_000_000)]
pub fn set_name(origin: OriginFor<T>, name: Vec<u8>) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -167,6 +168,7 @@ pub mod pallet {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[pallet::call_index(1)]
#[pallet::weight(70_000_000)]
pub fn clear_name(origin: OriginFor<T>) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -193,6 +195,7 @@ pub mod pallet {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[pallet::call_index(2)]
#[pallet::weight(70_000_000)]
pub fn kill_name(origin: OriginFor<T>, target: AccountIdLookupOf<T>) -> DispatchResult {
T::ForceOrigin::ensure_origin(origin)?;
@@ -220,6 +223,7 @@ pub mod pallet {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[pallet::call_index(3)]
#[pallet::weight(70_000_000)]
pub fn force_name(
origin: OriginFor<T>,