mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
* Companion for #11981 * more renaming * fmt * fixes * add generic type * Companion for #11831 * fix * revert changes * Delete rename-outer-enum.diff * revert * Update run_benches_for_runtime.sh * rename type Call & type Event * passing tests * fmt * small fixes * commit * fix * fmt * commit * error fixes * fix * small fix in test * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * remove RuntimeCall from pallet_grandpa * last fix * commit * rename * merge fix * update lockfile for {"substrate"} * cargo +nightly fmt * fix Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -58,12 +58,12 @@ impl frame_system::Config for Test {
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
type Hash = H256;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = Header;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type Version = ();
|
||||
type PalletInfo = PalletInfo;
|
||||
@@ -86,7 +86,7 @@ impl pallet_balances::Config for Test {
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type Balance = u64;
|
||||
type DustRemoval = ();
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
type WeightInfo = ();
|
||||
@@ -128,7 +128,7 @@ parameter_types! {
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = DevNull;
|
||||
type AssetTransactor = AssetTransactor;
|
||||
type OriginConverter = ();
|
||||
@@ -136,7 +136,7 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = TrustedTeleporters;
|
||||
type LocationInverter = xcm_builder::LocationInverter<Ancestry>;
|
||||
type Barrier = AllowUnpaidExecutionFrom<Everything>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||
type Trader = xcm_builder::FixedRateOfFungible<WeightPrice, ()>;
|
||||
type ResponseHandler = DevNull;
|
||||
type AssetTrap = ();
|
||||
|
||||
@@ -85,7 +85,7 @@ benchmarks! {
|
||||
transact {
|
||||
let origin = T::transact_origin()?;
|
||||
let mut executor = new_executor::<T>(origin);
|
||||
let noop_call: <T as Config>::Call = frame_system::Call::remark_with_event {
|
||||
let noop_call: <T as Config>::RuntimeCall = frame_system::Call::remark_with_event {
|
||||
remark: Default::default()
|
||||
}.into();
|
||||
let double_encoded_noop_call: DoubleEncoded<_> = noop_call.encode().into();
|
||||
|
||||
@@ -64,12 +64,12 @@ impl frame_system::Config for Test {
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
type Hash = H256;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = u64;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = Header;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type Version = ();
|
||||
type PalletInfo = PalletInfo;
|
||||
@@ -100,7 +100,7 @@ parameter_types! {
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = DevNull;
|
||||
type AssetTransactor = NoAssetTransactor;
|
||||
type OriginConverter = AlwaysSignedByDefault<Origin>;
|
||||
@@ -108,7 +108,7 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = ();
|
||||
type LocationInverter = xcm_builder::LocationInverter<Ancestry>;
|
||||
type Barrier = AllowUnpaidExecutionFrom<Everything>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||
type Trader = xcm_builder::FixedRateOfFungible<WeightPrice, ()>;
|
||||
type ResponseHandler = DevNull;
|
||||
type AssetTrap = TestAssetTrap;
|
||||
@@ -131,7 +131,7 @@ impl crate::Config for Test {
|
||||
}
|
||||
|
||||
impl generic::Config for Test {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
|
||||
fn worst_case_response() -> (u64, Response) {
|
||||
let assets: MultiAssets = (Concrete(Here.into()), 100).into();
|
||||
|
||||
@@ -12,7 +12,7 @@ pub mod pallet {
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config<I: 'static = ()>: frame_system::Config + crate::Config {
|
||||
type Call: Dispatchable<Origin = Self::Origin>
|
||||
type RuntimeCall: Dispatchable<Origin = Self::Origin>
|
||||
+ GetDispatchInfo
|
||||
+ From<frame_system::Call<Self>>
|
||||
+ Encode;
|
||||
|
||||
@@ -54,11 +54,11 @@ const SEED: u32 = 0;
|
||||
/// The XCM executor to use for doing stuff.
|
||||
pub type ExecutorOf<T> = xcm_executor::XcmExecutor<<T as Config>::XcmConfig>;
|
||||
/// The overarching call type.
|
||||
pub type OverArchingCallOf<T> = <T as frame_system::Config>::Call;
|
||||
pub type OverArchingCallOf<T> = <T as frame_system::Config>::RuntimeCall;
|
||||
/// The asset transactor of our executor
|
||||
pub type AssetTransactorOf<T> = <<T as Config>::XcmConfig as xcm_executor::Config>::AssetTransactor;
|
||||
/// The call type of executor's config. Should eventually resolve to the same overarching call type.
|
||||
pub type XcmCallOf<T> = <<T as Config>::XcmConfig as xcm_executor::Config>::Call;
|
||||
pub type XcmCallOf<T> = <<T as Config>::XcmConfig as xcm_executor::Config>::RuntimeCall;
|
||||
|
||||
pub fn mock_worst_case_holding() -> MultiAssets {
|
||||
const HOLDING_FUNGIBLES: u32 = 99;
|
||||
|
||||
Reference in New Issue
Block a user