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
@@ -282,6 +282,7 @@ pub mod pallet {
|
||||
/// ---------------------------------
|
||||
/// - Origin account is already in memory, so no DB operations for them.
|
||||
/// # </weight>
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(T::WeightInfo::transfer())]
|
||||
pub fn transfer(
|
||||
origin: OriginFor<T>,
|
||||
@@ -307,6 +308,7 @@ pub mod pallet {
|
||||
/// it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
///
|
||||
/// The dispatch origin for this call is `root`.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(
|
||||
T::WeightInfo::set_balance_creating() // Creates a new account.
|
||||
.max(T::WeightInfo::set_balance_killing()) // Kills an existing account.
|
||||
@@ -360,6 +362,7 @@ pub mod pallet {
|
||||
/// - Same as transfer, but additional read and write because the source account is not
|
||||
/// assumed to be in the overlay.
|
||||
/// # </weight>
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(T::WeightInfo::force_transfer())]
|
||||
pub fn force_transfer(
|
||||
origin: OriginFor<T>,
|
||||
@@ -385,6 +388,7 @@ pub mod pallet {
|
||||
/// 99% of the time you want [`transfer`] instead.
|
||||
///
|
||||
/// [`transfer`]: struct.Pallet.html#method.transfer
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(T::WeightInfo::transfer_keep_alive())]
|
||||
pub fn transfer_keep_alive(
|
||||
origin: OriginFor<T>,
|
||||
@@ -414,6 +418,7 @@ pub mod pallet {
|
||||
/// keep the sender account alive (true). # <weight>
|
||||
/// - O(1). Just like transfer, but reading the user's transferable balance first.
|
||||
/// #</weight>
|
||||
#[pallet::call_index(4)]
|
||||
#[pallet::weight(T::WeightInfo::transfer_all())]
|
||||
pub fn transfer_all(
|
||||
origin: OriginFor<T>,
|
||||
@@ -432,6 +437,7 @@ pub mod pallet {
|
||||
/// Unreserve some balance from a user by force.
|
||||
///
|
||||
/// Can only be called by ROOT.
|
||||
#[pallet::call_index(5)]
|
||||
#[pallet::weight(T::WeightInfo::force_unreserve())]
|
||||
pub fn force_unreserve(
|
||||
origin: OriginFor<T>,
|
||||
|
||||
Reference in New Issue
Block a user