mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
* Companion for #11981 * rename * Event to RuntimeEvent in imports * missed rename * undo * revert * rename type Call & Event * commit * ... * fix * fix errors * fixes * fmt * fix imports * final fix? * fmt * fix? * fixes after merge * small fix * cargo update -p polkadot-runtime-common * cargo +nightly fmt * update lockfile for {"polkadot", "substrate"} * fix Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -159,14 +159,14 @@ impl frame_system::Config for Runtime {
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
type AccountId = AccountId;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Index = Index;
|
||||
type BlockNumber = BlockNumber;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Header = Header;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type DbWeight = RocksDbWeight;
|
||||
@@ -215,7 +215,7 @@ impl pallet_balances::Config for Runtime {
|
||||
/// The type for recording an account's balance.
|
||||
type Balance = Balance;
|
||||
/// The ubiquitous event type.
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type DustRemoval = ();
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
@@ -231,7 +231,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnChargeTransaction =
|
||||
pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees<Runtime>>;
|
||||
type WeightToFee = WeightToFee;
|
||||
@@ -257,7 +257,7 @@ pub type AssetsForceOrigin =
|
||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
||||
|
||||
impl pallet_assets::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Balance = Balance;
|
||||
type AssetId = AssetId;
|
||||
type Currency = Balances;
|
||||
@@ -282,8 +282,8 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_multisig::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Currency = Balances;
|
||||
type DepositBase = DepositBase;
|
||||
type DepositFactor = DepositFactor;
|
||||
@@ -292,8 +292,8 @@ impl pallet_multisig::Config for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_utility::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type PalletsOrigin = OriginCaller;
|
||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||
}
|
||||
@@ -345,65 +345,75 @@ impl Default for ProxyType {
|
||||
Self::Any
|
||||
}
|
||||
}
|
||||
impl InstanceFilter<Call> for ProxyType {
|
||||
fn filter(&self, c: &Call) -> bool {
|
||||
impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||
match self {
|
||||
ProxyType::Any => true,
|
||||
ProxyType::NonTransfer =>
|
||||
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
|
||||
ProxyType::NonTransfer => !matches!(
|
||||
c,
|
||||
RuntimeCall::Balances { .. } |
|
||||
RuntimeCall::Assets { .. } |
|
||||
RuntimeCall::Uniques { .. }
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||
Call::Utility { .. } | Call::Multisig { .. }
|
||||
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Assets => {
|
||||
matches!(
|
||||
c,
|
||||
Call::Assets { .. } |
|
||||
Call::Utility { .. } | Call::Multisig { .. } |
|
||||
Call::Uniques { .. }
|
||||
RuntimeCall::Assets { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. } |
|
||||
RuntimeCall::Uniques { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::AssetOwner => matches!(
|
||||
c,
|
||||
Call::Assets(pallet_assets::Call::create { .. }) |
|
||||
Call::Assets(pallet_assets::Call::destroy { .. }) |
|
||||
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
||||
Call::Assets(pallet_assets::Call::set_team { .. }) |
|
||||
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
|
||||
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::create { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
Call::Utility { .. } | Call::Multisig { .. }
|
||||
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::AssetManager => matches!(
|
||||
c,
|
||||
Call::Assets(pallet_assets::Call::mint { .. }) |
|
||||
Call::Assets(pallet_assets::Call::burn { .. }) |
|
||||
Call::Assets(pallet_assets::Call::freeze { .. }) |
|
||||
Call::Assets(pallet_assets::Call::thaw { .. }) |
|
||||
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
||||
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::mint { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::burn { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
||||
Call::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
||||
Call::Utility { .. } | Call::Multisig { .. }
|
||||
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
|
||||
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
|
||||
RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -422,8 +432,8 @@ impl InstanceFilter<Call> for ProxyType {
|
||||
}
|
||||
|
||||
impl pallet_proxy::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Currency = Balances;
|
||||
type ProxyType = ProxyType;
|
||||
type ProxyDepositBase = ProxyDepositBase;
|
||||
@@ -442,7 +452,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnSystemEvent = ();
|
||||
type SelfParaId = parachain_info::Pallet<Runtime>;
|
||||
type DmpMessageHandler = DmpQueue;
|
||||
@@ -458,7 +468,7 @@ impl parachain_info::Config for Runtime {}
|
||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||
|
||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type ChannelInfo = ParachainSystem;
|
||||
type VersionWrapper = PolkadotXcm;
|
||||
@@ -472,7 +482,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||
}
|
||||
|
||||
impl cumulus_pallet_dmp_queue::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||
}
|
||||
@@ -484,7 +494,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_session::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||
// we don't have stash and controller, thus we don't need the convert as well.
|
||||
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
|
||||
@@ -516,7 +526,7 @@ pub type CollatorSelectionUpdateOrigin =
|
||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;
|
||||
|
||||
impl pallet_collator_selection::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||
type PotId = PotId;
|
||||
@@ -532,7 +542,7 @@ impl pallet_collator_selection::Config for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_asset_tx_payment::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Fungibles = Assets;
|
||||
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
|
||||
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
|
||||
@@ -552,7 +562,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_uniques::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type CollectionId = u32;
|
||||
type ItemId = u32;
|
||||
type Currency = Balances;
|
||||
@@ -637,9 +647,10 @@ pub type SignedExtra = (
|
||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||
);
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
|
||||
pub type UncheckedExtrinsic =
|
||||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||
/// Extrinsic type that has already been checked.
|
||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
|
||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
@@ -775,17 +786,17 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: Call,
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: Call,
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
@@ -917,7 +928,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::generic::Config for Runtime {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
|
||||
fn worst_case_response() -> (u64, Response) {
|
||||
(0u64, Response::Version(Default::default()))
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// limitations under the License.
|
||||
|
||||
use super::{
|
||||
AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo,
|
||||
ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue,
|
||||
AccountId, AssetId, Assets, Authorship, Balance, Balances, Origin, ParachainInfo,
|
||||
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
@@ -156,7 +156,7 @@ pub type Barrier = DenyThenTry<
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = XcmRouter;
|
||||
type AssetTransactor = AssetTransactors;
|
||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||
@@ -167,8 +167,11 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Barrier = Barrier;
|
||||
type Weigher =
|
||||
WeightInfoBounds<crate::weights::xcm::StatemintXcmWeight<Call>, Call, MaxInstructions>;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, DotLocation, AccountId, Balances, ToStakingPot<Runtime>>;
|
||||
type ResponseHandler = PolkadotXcm;
|
||||
@@ -191,7 +194,7 @@ pub type XcmRouter = (
|
||||
);
|
||||
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, ()>;
|
||||
type XcmRouter = XcmRouter;
|
||||
@@ -202,16 +205,19 @@ impl pallet_xcm::Config for Runtime {
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
type XcmReserveTransferFilter = Everything;
|
||||
type Weigher =
|
||||
WeightInfoBounds<crate::weights::xcm::StatemintXcmWeight<Call>, Call, MaxInstructions>;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||
}
|
||||
|
||||
impl cumulus_pallet_xcm::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user