diff --git a/pallet/account-migration/src/lib.rs b/pallet/account-migration/src/lib.rs index 04e496b56..8dcb69745 100644 --- a/pallet/account-migration/src/lib.rs +++ b/pallet/account-migration/src/lib.rs @@ -163,6 +163,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Migrate all the account data under the `from` to `to`. + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn migrate( origin: OriginFor, diff --git a/pallet/deposit/src/lib.rs b/pallet/deposit/src/lib.rs index 4e004a8e6..ec980f841 100644 --- a/pallet/deposit/src/lib.rs +++ b/pallet/deposit/src/lib.rs @@ -177,6 +177,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Lock the RING for some KTON profit/interest. + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn lock(origin: OriginFor, amount: Balance, months: u8) -> DispatchResult { let who = ensure_signed(origin)?; @@ -246,6 +247,7 @@ pub mod pallet { } /// Claim the expired-locked RING. + #[pallet::call_index(1)] #[pallet::weight(0)] pub fn claim(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -284,6 +286,7 @@ pub mod pallet { } /// Claim the unexpired-locked RING by paying the KTON penalty. + #[pallet::call_index(2)] #[pallet::weight(0)] pub fn claim_with_penalty(origin: OriginFor, id: DepositId) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/pallet/ecdsa-authority/src/lib.rs b/pallet/ecdsa-authority/src/lib.rs index 9a6c04227..d7e171887 100644 --- a/pallet/ecdsa-authority/src/lib.rs +++ b/pallet/ecdsa-authority/src/lib.rs @@ -225,8 +225,8 @@ pub mod pallet { /// /// Not allow to call while authorities is changing. /// This will insert new authority into the index 0 of authorities. + #[pallet::call_index(0)] #[pallet::weight(10_000_000)] - #[frame_support::transactional] pub fn add_authority(origin: OriginFor, new: T::AccountId) -> DispatchResult { ensure_root(origin)?; @@ -250,8 +250,8 @@ pub mod pallet { /// Remove a authority and trigger `on_authorities_change`. /// /// Not allow to call while authorities is changing. + #[pallet::call_index(1)] #[pallet::weight(10_000_000)] - #[frame_support::transactional] pub fn remove_authority(origin: OriginFor, old: T::AccountId) -> DispatchResult { ensure_root(origin)?; @@ -281,8 +281,8 @@ pub mod pallet { /// Swap the old authority with the new authority and trigger `on_authorities_change`. /// /// Not allow to call while authorities is changing. + #[pallet::call_index(2)] #[pallet::weight(10_000_000)] - #[frame_support::transactional] pub fn swap_authority( origin: OriginFor, old: T::AccountId, @@ -315,8 +315,8 @@ pub mod pallet { /// Submit the authorities change signature. /// /// Free to submit the first-correct signature. + #[pallet::call_index(3)] #[pallet::weight(10_000_000)] - #[frame_support::transactional] pub fn submit_authorities_change_signature( origin: OriginFor, signature: Signature, @@ -364,8 +364,8 @@ pub mod pallet { /// Submit the new message root signature. /// /// Free to submit the first-correct signature. + #[pallet::call_index(4)] #[pallet::weight(10_000_000)] - #[frame_support::transactional] pub fn submit_new_message_root_signature( origin: OriginFor, signature: Signature, diff --git a/pallet/message-transact/src/lib.rs b/pallet/message-transact/src/lib.rs index bfefcacfe..b5098809a 100644 --- a/pallet/message-transact/src/lib.rs +++ b/pallet/message-transact/src/lib.rs @@ -107,6 +107,7 @@ pub mod pallet { { /// This call can only be called by the lcmp message layer and is not available to normal /// users. + #[pallet::call_index(0)] #[pallet::weight({ let without_base_extrinsic_weight = true; ::GasWeightMapping::gas_to_weight({ diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs index ff4a29832..d38d9d861 100644 --- a/pallet/staking/src/lib.rs +++ b/pallet/staking/src/lib.rs @@ -350,6 +350,7 @@ pub mod pallet { /// Add stakes to the staking pool. /// /// This will transfer the stakes to a pallet/contact account. + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn stake( origin: OriginFor, @@ -409,6 +410,7 @@ pub mod pallet { } /// Withdraw stakes from the staking pool. + #[pallet::call_index(1)] #[pallet::weight(0)] pub fn unstake( origin: OriginFor, @@ -455,6 +457,7 @@ pub mod pallet { /// Cancel the `unstake` operation. /// /// Re-stake the unstaking assets immediately. + #[pallet::call_index(2)] #[pallet::weight(0)] pub fn restake( origin: OriginFor, @@ -499,6 +502,7 @@ pub mod pallet { } /// Claim the stakes from the pallet/contract account. + #[pallet::call_index(3)] #[pallet::weight(0)] pub fn claim(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -515,6 +519,7 @@ pub mod pallet { /// Declare the desire to collect. /// /// Effects will be felt at the beginning of the next session. + #[pallet::call_index(4)] #[pallet::weight(0)] pub fn collect(origin: OriginFor, commission: Perbill) -> DispatchResult { let who = ensure_signed(origin)?; @@ -529,6 +534,7 @@ pub mod pallet { /// Declare the desire to nominate a collator. /// /// Effects will be felt at the beginning of the next session. + #[pallet::call_index(5)] #[pallet::weight(0)] pub fn nominate(origin: OriginFor, target: T::AccountId) -> DispatchResult { let who = ensure_signed(origin)?; @@ -552,6 +558,7 @@ pub mod pallet { /// Effects will be felt at the beginning of the next era. /// /// If the target is a collator, its nominators need to re-nominate. + #[pallet::call_index(6)] #[pallet::weight(0)] pub fn chill(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?;