mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +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
@@ -192,6 +192,7 @@ pub mod pallet {
|
||||
T::AccountId: From<SomeType1> + From<SomeType3> + SomeAssociation1,
|
||||
{
|
||||
/// Doc comment put in metadata
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(Weight::from_ref_time(*_foo as u64))]
|
||||
pub fn foo(
|
||||
origin: OriginFor<T>,
|
||||
@@ -206,6 +207,7 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
/// Doc comment put in metadata
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(1)]
|
||||
pub fn foo_storage_layer(
|
||||
_origin: OriginFor<T>,
|
||||
@@ -220,6 +222,7 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
// Test for DispatchResult return type
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(1)]
|
||||
pub fn foo_no_post_info(_origin: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
|
||||
@@ -141,6 +141,7 @@ pub mod pallet {
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(<T::Balance as Into<u64>>::into(new_value.clone()))]
|
||||
pub fn set_dummy(
|
||||
origin: OriginFor<T>,
|
||||
|
||||
@@ -127,6 +127,7 @@ pub mod pallet {
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(<T::Balance as Into<u64>>::into(new_value.clone()))]
|
||||
pub fn set_dummy(
|
||||
origin: OriginFor<T>,
|
||||
|
||||
@@ -82,6 +82,7 @@ pub mod pallet {
|
||||
#[pallet::call]
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
/// Doc comment put in metadata
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(Weight::from_ref_time(*_foo as u64))]
|
||||
pub fn foo(
|
||||
origin: OriginFor<T>,
|
||||
@@ -93,6 +94,7 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
/// Doc comment put in metadata
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(1)]
|
||||
pub fn foo_storage_layer(
|
||||
origin: OriginFor<T>,
|
||||
|
||||
@@ -46,6 +46,7 @@ pub mod pallet {
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(1)]
|
||||
pub fn set_value(_origin: OriginFor<T>, value: u32) -> DispatchResult {
|
||||
Value::<T>::put(value);
|
||||
|
||||
Reference in New Issue
Block a user