Use explicit call indices (#6449)

* cargo update -p sp-io

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>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-12-19 23:13:34 +01:00
committed by GitHub
parent b9a55985bd
commit d387338fb0
21 changed files with 309 additions and 180 deletions
+3
View File
@@ -165,6 +165,7 @@ pub mod pallet {
/// independently of any other on-chain mechanism to use it.
///
/// The dispatch origin for this call must match `T::ForceOrigin`.
#[pallet::call_index(0)]
#[pallet::weight(T::WeightInfo::force_lease())]
pub fn force_lease(
origin: OriginFor<T>,
@@ -183,6 +184,7 @@ pub mod pallet {
/// Clear all leases for a Para Id, refunding any deposits back to the original owners.
///
/// The dispatch origin for this call must match `T::ForceOrigin`.
#[pallet::call_index(1)]
#[pallet::weight(T::WeightInfo::clear_all_leases())]
pub fn clear_all_leases(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
T::ForceOrigin::ensure_origin(origin)?;
@@ -205,6 +207,7 @@ pub mod pallet {
/// let them onboard from here.
///
/// Origin must be signed, but can be called by anyone.
#[pallet::call_index(2)]
#[pallet::weight(T::WeightInfo::trigger_onboard())]
pub fn trigger_onboard(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
let _ = ensure_signed(origin)?;