Uniform pallet warnings (#13798)

* Use proc-macro-warning crate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fixup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix pallet_ui tests

Also renamed some of the odd-named ones.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update dep

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Ignore hardcoded weight warning

To be fixed in https://github.com/paritytech/substrate/issues/13813

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix more tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-04-04 13:32:10 +02:00
committed by GitHub
parent 846ec8cd01
commit 07dcd47d59
30 changed files with 299 additions and 75 deletions
+4 -4
View File
@@ -131,7 +131,7 @@ pub mod pallet {
/// ## Complexity
/// - O(1).
#[pallet::call_index(0)]
#[pallet::weight(50_000_000)]
#[pallet::weight({50_000_000})]
pub fn set_name(origin: OriginFor<T>, name: Vec<u8>) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -160,7 +160,7 @@ pub mod pallet {
/// ## Complexity
/// - O(1).
#[pallet::call_index(1)]
#[pallet::weight(70_000_000)]
#[pallet::weight({70_000_000})]
pub fn clear_name(origin: OriginFor<T>) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -183,7 +183,7 @@ pub mod pallet {
/// ## Complexity
/// - O(1).
#[pallet::call_index(2)]
#[pallet::weight(70_000_000)]
#[pallet::weight({70_000_000})]
pub fn kill_name(origin: OriginFor<T>, target: AccountIdLookupOf<T>) -> DispatchResult {
T::ForceOrigin::ensure_origin(origin)?;
@@ -207,7 +207,7 @@ pub mod pallet {
/// ## Complexity
/// - O(1).
#[pallet::call_index(3)]
#[pallet::weight(70_000_000)]
#[pallet::weight({70_000_000})]
pub fn force_name(
origin: OriginFor<T>,
target: AccountIdLookupOf<T>,