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
2022-12-12 15:32:41 +01:00
committed by GitHub
parent 6e0453a298
commit 31f5119ecd
67 changed files with 403 additions and 0 deletions
+4
View File
@@ -520,6 +520,7 @@ pub mod pallet {
///
/// Complexities:
/// - `Queues[duration].len()` (just take max).
#[pallet::call_index(0)]
#[pallet::weight(T::WeightInfo::place_bid_max())]
pub fn place_bid(
origin: OriginFor<T>,
@@ -581,6 +582,7 @@ pub mod pallet {
///
/// - `amount`: The amount of the previous bid.
/// - `duration`: The duration of the previous bid.
#[pallet::call_index(1)]
#[pallet::weight(T::WeightInfo::retract_bid(T::MaxQueueLen::get()))]
pub fn retract_bid(
origin: OriginFor<T>,
@@ -615,6 +617,7 @@ pub mod pallet {
/// Ensure we have sufficient funding for all potential payouts.
///
/// - `origin`: Must be accepted by `FundOrigin`.
#[pallet::call_index(2)]
#[pallet::weight(T::WeightInfo::fund_deficit())]
pub fn fund_deficit(origin: OriginFor<T>) -> DispatchResult {
T::FundOrigin::ensure_origin(origin)?;
@@ -636,6 +639,7 @@ pub mod pallet {
/// - `index`: The index of the receipt.
/// - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If
/// `None`, then all of it should be.
#[pallet::call_index(3)]
#[pallet::weight(T::WeightInfo::thaw())]
pub fn thaw(
origin: OriginFor<T>,