mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Create sp-weights crate to store weight primitives (#12219)
* Create sp-weights crate to store weight primitives * Fix templates * Fix templates * Fixes * Fixes * cargo fmt * Fixes * Fixes * Use deprecated type alias instead of deprecated unit types * Use deprecated subtraits instead of deprecated hollow new traits * Fixes * Allow deprecation in macro expansion * Add missing where clause during call macro expansion * cargo fmt * Fixes * cargo fmt * Fixes * Fixes * Fixes * Fixes * Move FRAME-specific weight files back to frame_support * Fixes * Update frame/support/src/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/src/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/src/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Add missing header * Rewrite module docs * Fixes * Fixes * Fixes * Fixes * cargo fmt Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -200,7 +200,7 @@ pub mod module3 {
|
||||
}
|
||||
#[weight = 3]
|
||||
fn aux_4(_origin) -> frame_support::dispatch::DispatchResult { unreachable!() }
|
||||
#[weight = (5, frame_support::weights::DispatchClass::Operational)]
|
||||
#[weight = (5, frame_support::dispatch::DispatchClass::Operational)]
|
||||
fn operational(_origin) { unreachable!() }
|
||||
}
|
||||
}
|
||||
@@ -504,8 +504,8 @@ fn call_encode_is_correct_and_decode_works() {
|
||||
#[test]
|
||||
fn call_weight_should_attach_to_call_enum() {
|
||||
use frame_support::{
|
||||
dispatch::{DispatchInfo, GetDispatchInfo},
|
||||
weights::{DispatchClass, Pays, Weight},
|
||||
dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays},
|
||||
weights::Weight,
|
||||
};
|
||||
// operational.
|
||||
assert_eq!(
|
||||
|
||||
@@ -100,7 +100,7 @@ pub mod module {
|
||||
}
|
||||
#[weight = 3]
|
||||
fn aux_4(_origin) -> frame_support::dispatch::DispatchResult { unreachable!() }
|
||||
#[weight = (5, frame_support::weights::DispatchClass::Operational)]
|
||||
#[weight = (5, frame_support::dispatch::DispatchClass::Operational)]
|
||||
fn operational(_origin) { unreachable!() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,16 @@
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::{
|
||||
dispatch::{Parameter, UnfilteredDispatchable},
|
||||
dispatch::{
|
||||
DispatchClass, DispatchInfo, GetDispatchInfo, Parameter, Pays, UnfilteredDispatchable,
|
||||
},
|
||||
pallet_prelude::ValueQuery,
|
||||
storage::unhashed,
|
||||
traits::{
|
||||
ConstU32, GetCallName, GetStorageVersion, OnFinalize, OnGenesis, OnInitialize,
|
||||
OnRuntimeUpgrade, PalletError, PalletInfoAccess, StorageVersion,
|
||||
},
|
||||
weights::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays, RuntimeDbWeight, Weight},
|
||||
weights::{RuntimeDbWeight, Weight},
|
||||
};
|
||||
use scale_info::{meta_type, TypeInfo};
|
||||
use sp_io::{
|
||||
|
||||
@@ -16,11 +16,10 @@
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support::{
|
||||
dispatch::UnfilteredDispatchable,
|
||||
dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays, UnfilteredDispatchable},
|
||||
pallet_prelude::ValueQuery,
|
||||
storage::unhashed,
|
||||
traits::{ConstU32, GetCallName, OnFinalize, OnGenesis, OnInitialize, OnRuntimeUpgrade},
|
||||
weights::{DispatchClass, DispatchInfo, GetDispatchInfo, Pays},
|
||||
};
|
||||
use sp_io::{
|
||||
hashing::{blake2_128, twox_128, twox_64},
|
||||
|
||||
Reference in New Issue
Block a user