mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 01:11:08 +00:00
Re-export current primitives in crate root (#6487)
* Re-export current primitives in crate root * Add missing exports * restart CI
This commit is contained in:
@@ -32,7 +32,7 @@ use frame_support::{pallet_prelude::*, traits::Currency};
|
||||
use frame_system::pallet_prelude::*;
|
||||
pub use pallet::*;
|
||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use runtime_parachains::{
|
||||
configuration,
|
||||
paras::{self},
|
||||
@@ -549,7 +549,7 @@ mod tests {
|
||||
use frame_support::{assert_noop, assert_ok, parameter_types};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_balances;
|
||||
use primitives::v2::{BlockNumber, Header};
|
||||
use primitives::{BlockNumber, Header};
|
||||
use runtime_parachains::{
|
||||
configuration as parachains_configuration, paras as parachains_paras,
|
||||
shared as parachains_shared,
|
||||
|
||||
@@ -30,7 +30,7 @@ use frame_support::{
|
||||
};
|
||||
pub use pallet::*;
|
||||
use parity_scale_codec::Decode;
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use sp_runtime::traits::{CheckedSub, One, Saturating, Zero};
|
||||
use sp_std::{mem::swap, prelude::*};
|
||||
|
||||
@@ -684,7 +684,7 @@ mod tests {
|
||||
};
|
||||
use frame_system::{EnsureRoot, EnsureSignedBy};
|
||||
use pallet_balances;
|
||||
use primitives::v2::{BlockNumber, Header, Id as ParaId};
|
||||
use primitives::{BlockNumber, Header, Id as ParaId};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::traits::{BlakeTwo256, IdentityLookup};
|
||||
use std::{cell::RefCell, collections::BTreeMap};
|
||||
|
||||
@@ -23,7 +23,7 @@ use frame_support::{
|
||||
};
|
||||
pub use pallet::*;
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use primitives::v2::ValidityError;
|
||||
use primitives::ValidityError;
|
||||
use scale_info::TypeInfo;
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{self, Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
@@ -68,7 +68,7 @@ use frame_support::{
|
||||
};
|
||||
pub use pallet::*;
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use scale_info::TypeInfo;
|
||||
use sp_runtime::{
|
||||
traits::{
|
||||
@@ -864,7 +864,7 @@ mod tests {
|
||||
assert_noop, assert_ok, parameter_types,
|
||||
traits::{OnFinalize, OnInitialize},
|
||||
};
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use sp_core::H256;
|
||||
use std::{cell::RefCell, collections::BTreeMap, sync::Arc};
|
||||
// The testing primitives are very useful for avoiding having to work with signatures
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::NegativeImbalance;
|
||||
use frame_support::traits::{Currency, Imbalance, OnUnbalanced};
|
||||
use primitives::v2::Balance;
|
||||
use primitives::Balance;
|
||||
use sp_runtime::Perquintill;
|
||||
|
||||
/// Logic for the author to get a portion of fees.
|
||||
@@ -26,8 +26,8 @@ pub struct ToAuthor<R>(sp_std::marker::PhantomData<R>);
|
||||
impl<R> OnUnbalanced<NegativeImbalance<R>> for ToAuthor<R>
|
||||
where
|
||||
R: pallet_balances::Config + pallet_authorship::Config,
|
||||
<R as frame_system::Config>::AccountId: From<primitives::v2::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: Into<primitives::v2::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: From<primitives::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: Into<primitives::AccountId>,
|
||||
{
|
||||
fn on_nonzero_unbalanced(amount: NegativeImbalance<R>) {
|
||||
if let Some(author) = <pallet_authorship::Pallet<R>>::author() {
|
||||
@@ -41,8 +41,8 @@ impl<R> OnUnbalanced<NegativeImbalance<R>> for DealWithFees<R>
|
||||
where
|
||||
R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config,
|
||||
pallet_treasury::Pallet<R>: OnUnbalanced<NegativeImbalance<R>>,
|
||||
<R as frame_system::Config>::AccountId: From<primitives::v2::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: Into<primitives::v2::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: From<primitives::AccountId>,
|
||||
<R as frame_system::Config>::AccountId: Into<primitives::AccountId>,
|
||||
{
|
||||
fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance<R>>) {
|
||||
if let Some(fees) = fees_then_tips.next() {
|
||||
@@ -105,7 +105,7 @@ mod tests {
|
||||
dispatch::DispatchClass, parameter_types, traits::FindAuthor, weights::Weight, PalletId,
|
||||
};
|
||||
use frame_system::limits;
|
||||
use primitives::v2::AccountId;
|
||||
use primitives::AccountId;
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
testing::Header,
|
||||
|
||||
@@ -31,9 +31,7 @@ use frame_support::{
|
||||
use frame_support_test::TestRandomness;
|
||||
use frame_system::EnsureRoot;
|
||||
use parity_scale_codec::Encode;
|
||||
use primitives::v2::{
|
||||
BlockNumber, HeadData, Header, Id as ParaId, ValidationCode, LOWEST_PUBLIC_ID,
|
||||
};
|
||||
use primitives::{BlockNumber, HeadData, Header, Id as ParaId, ValidationCode, LOWEST_PUBLIC_ID};
|
||||
use runtime_parachains::{
|
||||
configuration, origin, paras, shared, Origin as ParaOrigin, ParaLifecycle,
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ use frame_support::{
|
||||
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
|
||||
};
|
||||
use frame_system::limits;
|
||||
use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId};
|
||||
use primitives::{AssignmentId, Balance, BlockNumber, ValidatorId};
|
||||
use sp_runtime::{FixedPointNumber, Perbill, Perquintill};
|
||||
use static_assertions::const_assert;
|
||||
|
||||
@@ -158,7 +158,7 @@ macro_rules! impl_runtime_weights {
|
||||
///
|
||||
/// This must only be used as long as the balance type is `u128`.
|
||||
pub type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
|
||||
static_assertions::assert_eq_size!(primitives::v2::Balance, u128);
|
||||
static_assertions::assert_eq_size!(primitives::Balance, u128);
|
||||
|
||||
/// A placeholder since there is currently no provided session key handler for parachain validator
|
||||
/// keys.
|
||||
|
||||
@@ -22,7 +22,7 @@ use frame_support::{
|
||||
weights::Weight,
|
||||
};
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use primitives::v2::{HeadData, Id as ParaId, ValidationCode};
|
||||
use primitives::{HeadData, Id as ParaId, ValidationCode};
|
||||
use sp_runtime::{traits::SaturatedConversion, Permill};
|
||||
use std::{cell::RefCell, collections::HashMap};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ use frame_support::{
|
||||
traits::{Currency, Get, ReservableCurrency},
|
||||
};
|
||||
use frame_system::{self, ensure_root, ensure_signed};
|
||||
use primitives::v2::{HeadData, Id as ParaId, ValidationCode, LOWEST_PUBLIC_ID};
|
||||
use primitives::{HeadData, Id as ParaId, ValidationCode, LOWEST_PUBLIC_ID};
|
||||
use runtime_parachains::{
|
||||
configuration, ensure_parachain,
|
||||
paras::{self, ParaGenesisArgs},
|
||||
@@ -663,7 +663,7 @@ mod tests {
|
||||
};
|
||||
use frame_system::limits;
|
||||
use pallet_balances::Error as BalancesError;
|
||||
use primitives::v2::{Balance, BlockNumber, Header};
|
||||
use primitives::{Balance, BlockNumber, Header};
|
||||
use runtime_parachains::{configuration, origin, shared};
|
||||
use sp_core::H256;
|
||||
use sp_io::TestExternalities;
|
||||
@@ -1289,7 +1289,7 @@ mod benchmarking {
|
||||
use crate::traits::Registrar as RegistrarT;
|
||||
use frame_support::assert_ok;
|
||||
use frame_system::RawOrigin;
|
||||
use primitives::v2::{MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE};
|
||||
use primitives::{MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE};
|
||||
use runtime_parachains::{paras, shared, Origin as ParaOrigin};
|
||||
use sp_runtime::traits::Bounded;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use frame_support::pallet_prelude::*;
|
||||
use frame_system::pallet_prelude::*;
|
||||
pub use pallet::*;
|
||||
use parity_scale_codec::Encode;
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use runtime_parachains::{
|
||||
configuration, dmp, hrmp,
|
||||
paras::{self, ParaGenesisArgs},
|
||||
|
||||
@@ -31,7 +31,7 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::pallet_prelude::*;
|
||||
pub use pallet::*;
|
||||
use primitives::v2::Id as ParaId;
|
||||
use primitives::Id as ParaId;
|
||||
use sp_runtime::traits::{CheckedConversion, CheckedSub, Saturating, Zero};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
@@ -506,7 +506,7 @@ mod tests {
|
||||
use frame_support::{assert_noop, assert_ok, parameter_types};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_balances;
|
||||
use primitives::v2::{BlockNumber, Header};
|
||||
use primitives::{BlockNumber, Header};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::traits::{BlakeTwo256, IdentityLookup};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use frame_support::{
|
||||
dispatch::DispatchResult,
|
||||
traits::{Currency, ReservableCurrency},
|
||||
};
|
||||
use primitives::v2::{HeadData, Id as ParaId, ValidationCode};
|
||||
use primitives::{HeadData, Id as ParaId, ValidationCode};
|
||||
use sp_std::vec::*;
|
||||
|
||||
/// Parachain registration API.
|
||||
|
||||
Reference in New Issue
Block a user