mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 09:51:10 +00:00
Companion for paritytech/substrate#12219 (#5987)
* Companion for paritytech/substrate#12219 * Fixes * update lockfile for {"substrate"} * Fixes * cargo fmt Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+191
-172
File diff suppressed because it is too large
Load Diff
@@ -80,7 +80,7 @@ type WinnersData<T> =
|
|||||||
#[frame_support::pallet]
|
#[frame_support::pallet]
|
||||||
pub mod pallet {
|
pub mod pallet {
|
||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::{pallet_prelude::*, traits::EnsureOrigin, weights::DispatchClass};
|
use frame_support::{dispatch::DispatchClass, pallet_prelude::*, traits::EnsureOrigin};
|
||||||
use frame_system::{ensure_root, ensure_signed, pallet_prelude::*};
|
use frame_system::{ensure_root, ensure_signed, pallet_prelude::*};
|
||||||
|
|
||||||
#[pallet::pallet]
|
#[pallet::pallet]
|
||||||
|
|||||||
@@ -715,10 +715,9 @@ mod tests {
|
|||||||
use claims::Call as ClaimsCall;
|
use claims::Call as ClaimsCall;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
assert_err, assert_noop, assert_ok,
|
assert_err, assert_noop, assert_ok,
|
||||||
dispatch::DispatchError::BadOrigin,
|
dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays},
|
||||||
ord_parameter_types, parameter_types,
|
ord_parameter_types, parameter_types,
|
||||||
traits::{ExistenceRequirement, GenesisBuild},
|
traits::{ExistenceRequirement, GenesisBuild},
|
||||||
weights::{GetDispatchInfo, Pays},
|
|
||||||
};
|
};
|
||||||
use pallet_balances;
|
use pallet_balances;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
|
|||||||
@@ -61,10 +61,7 @@ where
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types,
|
dispatch::DispatchClass, parameter_types, traits::FindAuthor, weights::Weight, PalletId,
|
||||||
traits::FindAuthor,
|
|
||||||
weights::{DispatchClass, Weight},
|
|
||||||
PalletId,
|
|
||||||
};
|
};
|
||||||
use frame_system::limits;
|
use frame_system::limits;
|
||||||
use primitives::v2::AccountId;
|
use primitives::v2::AccountId;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ pub type SlowAdjustingFeeUpdate<R> =
|
|||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! impl_runtime_weights {
|
macro_rules! impl_runtime_weights {
|
||||||
($runtime:ident) => {
|
($runtime:ident) => {
|
||||||
use frame_support::weights::{DispatchClass, Weight};
|
use frame_support::{dispatch::DispatchClass, weights::Weight};
|
||||||
use frame_system::limits;
|
use frame_system::limits;
|
||||||
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
|
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
|
||||||
pub use runtime_common::{
|
pub use runtime_common::{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
//! Tests for the Kusama Runtime Configuration
|
//! Tests for the Kusama Runtime Configuration
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT};
|
use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT};
|
||||||
use keyring::Sr25519Keyring::Charlie;
|
use keyring::Sr25519Keyring::Charlie;
|
||||||
use pallet_transaction_payment::Multiplier;
|
use pallet_transaction_payment::Multiplier;
|
||||||
use parity_scale_codec::Encode;
|
use parity_scale_codec::Encode;
|
||||||
|
|||||||
@@ -2034,7 +2034,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test_fees {
|
mod test_fees {
|
||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::weights::{GetDispatchInfo, WeightToFee as WeightToFeeT};
|
use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT};
|
||||||
use keyring::Sr25519Keyring::{Alice, Charlie};
|
use keyring::Sr25519Keyring::{Alice, Charlie};
|
||||||
use pallet_transaction_payment::Multiplier;
|
use pallet_transaction_payment::Multiplier;
|
||||||
use runtime_common::MinimumMultiplier;
|
use runtime_common::MinimumMultiplier;
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ mod mock;
|
|||||||
#[frame_support::pallet]
|
#[frame_support::pallet]
|
||||||
pub mod pallet {
|
pub mod pallet {
|
||||||
use frame_benchmarking::BenchmarkError;
|
use frame_benchmarking::BenchmarkError;
|
||||||
use frame_support::{dispatch::Dispatchable, pallet_prelude::Encode, weights::GetDispatchInfo};
|
use frame_support::{
|
||||||
|
dispatch::{Dispatchable, GetDispatchInfo},
|
||||||
|
pallet_prelude::Encode,
|
||||||
|
};
|
||||||
use xcm::latest::{MultiAssets, MultiLocation, Response};
|
use xcm::latest::{MultiAssets, MultiLocation, Response};
|
||||||
|
|
||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ pub use crate::{
|
|||||||
FixedRateOfFungible, FixedWeightBounds, LocationInverter, TakeWeightCredit,
|
FixedRateOfFungible, FixedWeightBounds, LocationInverter, TakeWeightCredit,
|
||||||
};
|
};
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
dispatch::{DispatchError, DispatchInfo, DispatchResultWithPostInfo, Dispatchable, Parameter},
|
dispatch::{
|
||||||
|
DispatchError, DispatchInfo, DispatchResultWithPostInfo, Dispatchable, GetDispatchInfo,
|
||||||
|
Parameter, PostDispatchInfo,
|
||||||
|
},
|
||||||
ensure, parameter_types,
|
ensure, parameter_types,
|
||||||
sp_runtime::DispatchErrorWithPostInfo,
|
sp_runtime::DispatchErrorWithPostInfo,
|
||||||
traits::{Contains, Get, IsInVec},
|
traits::{Contains, Get, IsInVec},
|
||||||
weights::{GetDispatchInfo, PostDispatchInfo},
|
|
||||||
};
|
};
|
||||||
pub use parity_scale_codec::{Decode, Encode};
|
pub use parity_scale_codec::{Decode, Encode};
|
||||||
pub use sp_std::{
|
pub use sp_std::{
|
||||||
|
|||||||
@@ -15,8 +15,9 @@
|
|||||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
|
dispatch::GetDispatchInfo,
|
||||||
traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT},
|
traits::{tokens::currency::Currency as CurrencyT, Get, OnUnbalanced as OnUnbalancedT},
|
||||||
weights::{constants::WEIGHT_PER_SECOND, GetDispatchInfo, WeightToFee as WeightToFeeT},
|
weights::{constants::WEIGHT_PER_SECOND, WeightToFee as WeightToFeeT},
|
||||||
};
|
};
|
||||||
use parity_scale_codec::Decode;
|
use parity_scale_codec::Decode;
|
||||||
use sp_runtime::traits::{SaturatedConversion, Saturating, Zero};
|
use sp_runtime::traits::{SaturatedConversion, Saturating, Zero};
|
||||||
|
|||||||
@@ -18,10 +18,7 @@ use crate::traits::{
|
|||||||
ClaimAssets, ConvertOrigin, DropAssets, FilterAssetLocation, InvertLocation, OnResponse,
|
ClaimAssets, ConvertOrigin, DropAssets, FilterAssetLocation, InvertLocation, OnResponse,
|
||||||
ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader,
|
ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader,
|
||||||
};
|
};
|
||||||
use frame_support::{
|
use frame_support::dispatch::{Dispatchable, GetDispatchInfo, Parameter, PostDispatchInfo};
|
||||||
dispatch::{Dispatchable, Parameter},
|
|
||||||
weights::{GetDispatchInfo, PostDispatchInfo},
|
|
||||||
};
|
|
||||||
use xcm::latest::SendXcm;
|
use xcm::latest::SendXcm;
|
||||||
|
|
||||||
/// The trait to parameterize the `XcmExecutor`.
|
/// The trait to parameterize the `XcmExecutor`.
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
|
||||||
use frame_support::{dispatch::Dispatchable, ensure, weights::GetDispatchInfo};
|
use frame_support::{
|
||||||
|
dispatch::{Dispatchable, GetDispatchInfo},
|
||||||
|
ensure,
|
||||||
|
};
|
||||||
use sp_runtime::traits::Saturating;
|
use sp_runtime::traits::Saturating;
|
||||||
use sp_std::{marker::PhantomData, prelude::*};
|
use sp_std::{marker::PhantomData, prelude::*};
|
||||||
use xcm::latest::{
|
use xcm::latest::{
|
||||||
|
|||||||
Reference in New Issue
Block a user