mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +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
@@ -397,6 +397,7 @@ pub mod pallet {
|
||||
/// - `enactment_moment`: The moment that the proposal should be enacted.
|
||||
///
|
||||
/// Emits `Submitted`.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(T::WeightInfo::submit())]
|
||||
pub fn submit(
|
||||
origin: OriginFor<T>,
|
||||
@@ -444,6 +445,7 @@ pub mod pallet {
|
||||
/// posted.
|
||||
///
|
||||
/// Emits `DecisionDepositPlaced`.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(ServiceBranch::max_weight_of_deposit::<T, I>())]
|
||||
pub fn place_decision_deposit(
|
||||
origin: OriginFor<T>,
|
||||
@@ -471,6 +473,7 @@ pub mod pallet {
|
||||
/// refunded.
|
||||
///
|
||||
/// Emits `DecisionDepositRefunded`.
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(T::WeightInfo::refund_decision_deposit())]
|
||||
pub fn refund_decision_deposit(
|
||||
origin: OriginFor<T>,
|
||||
@@ -500,6 +503,7 @@ pub mod pallet {
|
||||
/// - `index`: The index of the referendum to be cancelled.
|
||||
///
|
||||
/// Emits `Cancelled`.
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(T::WeightInfo::cancel())]
|
||||
pub fn cancel(origin: OriginFor<T>, index: ReferendumIndex) -> DispatchResult {
|
||||
T::CancelOrigin::ensure_origin(origin)?;
|
||||
@@ -524,6 +528,7 @@ pub mod pallet {
|
||||
/// - `index`: The index of the referendum to be cancelled.
|
||||
///
|
||||
/// Emits `Killed` and `DepositSlashed`.
|
||||
#[pallet::call_index(4)]
|
||||
#[pallet::weight(T::WeightInfo::kill())]
|
||||
pub fn kill(origin: OriginFor<T>, index: ReferendumIndex) -> DispatchResult {
|
||||
T::KillOrigin::ensure_origin(origin)?;
|
||||
@@ -544,6 +549,7 @@ pub mod pallet {
|
||||
///
|
||||
/// - `origin`: must be `Root`.
|
||||
/// - `index`: the referendum to be advanced.
|
||||
#[pallet::call_index(5)]
|
||||
#[pallet::weight(ServiceBranch::max_weight_of_nudge::<T, I>())]
|
||||
pub fn nudge_referendum(
|
||||
origin: OriginFor<T>,
|
||||
@@ -570,6 +576,7 @@ pub mod pallet {
|
||||
/// `DecidingCount` is not yet updated. This means that we should either:
|
||||
/// - begin deciding another referendum (and leave `DecidingCount` alone); or
|
||||
/// - decrement `DecidingCount`.
|
||||
#[pallet::call_index(6)]
|
||||
#[pallet::weight(OneFewerDecidingBranch::max_weight::<T, I>())]
|
||||
pub fn one_fewer_deciding(
|
||||
origin: OriginFor<T>,
|
||||
@@ -603,6 +610,7 @@ pub mod pallet {
|
||||
/// refunded.
|
||||
///
|
||||
/// Emits `SubmissionDepositRefunded`.
|
||||
#[pallet::call_index(7)]
|
||||
#[pallet::weight(T::WeightInfo::refund_submission_deposit())]
|
||||
pub fn refund_submission_deposit(
|
||||
origin: OriginFor<T>,
|
||||
|
||||
Reference in New Issue
Block a user