mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +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:
@@ -139,7 +139,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockWeights = BlockWeights;
|
||||
type BlockLength = BlockLength;
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = Nonce;
|
||||
type BlockNumber = BlockNumber;
|
||||
type Hash = Hash;
|
||||
@@ -147,7 +147,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type Lookup = AccountIdLookup<AccountId, ()>;
|
||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type DbWeight = RocksDbWeight;
|
||||
type Version = Version;
|
||||
@@ -169,10 +169,10 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_scheduler::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type PalletsOrigin = OriginCaller;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type MaximumWeight = MaximumSchedulerWeight;
|
||||
type ScheduleOrigin = EnsureRoot<AccountId>;
|
||||
type MaxScheduledPerBlock = MaxScheduledPerBlock;
|
||||
@@ -190,7 +190,7 @@ parameter_types! {
|
||||
|
||||
impl pallet_preimage::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_preimage::WeightInfo<Runtime>;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type ManagerOrigin = EnsureRoot<AccountId>;
|
||||
type MaxSize = PreimageMaxSize;
|
||||
@@ -245,7 +245,7 @@ impl pallet_indices::Config for Runtime {
|
||||
type AccountIndex = AccountIndex;
|
||||
type Currency = Balances;
|
||||
type Deposit = IndexDeposit;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::pallet_indices::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ parameter_types! {
|
||||
impl pallet_balances::Config for Runtime {
|
||||
type Balance = Balance;
|
||||
type DustRemoval = ();
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
type MaxLocks = MaxLocks;
|
||||
@@ -275,7 +275,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, ToAuthor<Runtime>>;
|
||||
type OperationalFeeMultiplier = OperationalFeeMultiplier;
|
||||
type WeightToFee = WeightToFee;
|
||||
@@ -321,7 +321,7 @@ impl_opaque_keys! {
|
||||
}
|
||||
|
||||
impl pallet_session::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ValidatorId = AccountId;
|
||||
type ValidatorIdOf = pallet_staking::StashOf<Self>;
|
||||
type ShouldEndSession = Babe;
|
||||
@@ -408,7 +408,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type EstimateCallFee = TransactionPayment;
|
||||
type SignedPhase = SignedPhase;
|
||||
@@ -451,7 +451,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_bags_list::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ScoreProvider = Staking;
|
||||
type WeightInfo = weights::pallet_bags_list::WeightInfo<Runtime>;
|
||||
type BagThresholds = BagThresholds;
|
||||
@@ -489,7 +489,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type UnixTime = Timestamp;
|
||||
type CurrencyToVote = CurrencyToVote;
|
||||
type RewardRemainder = ();
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Slash = ();
|
||||
type Reward = ();
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
@@ -516,7 +516,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_offences::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ parameter_types! {
|
||||
|
||||
impl pallet_im_online::Config for Runtime {
|
||||
type AuthorityId = ImOnlineId;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ValidatorSet = Historical;
|
||||
type NextSessionRotation = Babe;
|
||||
type ReportUnresponsiveness = Offences;
|
||||
@@ -547,8 +547,7 @@ impl pallet_im_online::Config for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_grandpa::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
type KeyOwnerProofSystem = Historical;
|
||||
|
||||
@@ -574,14 +573,14 @@ impl pallet_grandpa::Config for Runtime {
|
||||
/// format of the chain.
|
||||
impl<LocalCall> frame_system::offchain::CreateSignedTransaction<LocalCall> for Runtime
|
||||
where
|
||||
Call: From<LocalCall>,
|
||||
RuntimeCall: From<LocalCall>,
|
||||
{
|
||||
fn create_transaction<C: frame_system::offchain::AppCrypto<Self::Public, Self::Signature>>(
|
||||
call: Call,
|
||||
call: RuntimeCall,
|
||||
public: <Signature as Verify>::Signer,
|
||||
account: AccountId,
|
||||
nonce: <Runtime as frame_system::Config>::Index,
|
||||
) -> Option<(Call, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
|
||||
) -> Option<(RuntimeCall, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
|
||||
use sp_runtime::traits::StaticLookup;
|
||||
// take the biggest period possible.
|
||||
let period =
|
||||
@@ -625,9 +624,9 @@ impl frame_system::offchain::SigningTypes for Runtime {
|
||||
|
||||
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime
|
||||
where
|
||||
Call: From<C>,
|
||||
RuntimeCall: From<C>,
|
||||
{
|
||||
type OverarchingCall = Call;
|
||||
type OverarchingCall = RuntimeCall;
|
||||
type Extrinsic = UncheckedExtrinsic;
|
||||
}
|
||||
|
||||
@@ -642,7 +641,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_identity::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type Slashed = ();
|
||||
type BasicDeposit = BasicDeposit;
|
||||
@@ -657,8 +656,8 @@ impl pallet_identity::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>;
|
||||
}
|
||||
@@ -672,8 +671,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;
|
||||
@@ -689,9 +688,9 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_recovery::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = ();
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Currency = Balances;
|
||||
type ConfigDepositBase = ConfigDepositBase;
|
||||
type FriendDepositFactor = FriendDepositFactor;
|
||||
@@ -704,7 +703,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_vesting::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type BlockNumberToBalance = ConvertInto;
|
||||
type MinVestedTransfer = MinVestedTransfer;
|
||||
@@ -713,8 +712,8 @@ impl pallet_vesting::Config for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_sudo::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -756,71 +755,78 @@ 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::System(..) |
|
||||
Call::Babe(..) |
|
||||
Call::Timestamp(..) |
|
||||
Call::Indices(pallet_indices::Call::claim{..}) |
|
||||
Call::Indices(pallet_indices::Call::free{..}) |
|
||||
Call::Indices(pallet_indices::Call::freeze{..}) |
|
||||
RuntimeCall::System(..) |
|
||||
RuntimeCall::Babe(..) |
|
||||
RuntimeCall::Timestamp(..) |
|
||||
RuntimeCall::Indices(pallet_indices::Call::claim{..}) |
|
||||
RuntimeCall::Indices(pallet_indices::Call::free{..}) |
|
||||
RuntimeCall::Indices(pallet_indices::Call::freeze{..}) |
|
||||
// Specifically omitting Indices `transfer`, `force_transfer`
|
||||
// Specifically omitting the entire Balances pallet
|
||||
Call::Authorship(..) |
|
||||
Call::Staking(..) |
|
||||
Call::Session(..) |
|
||||
Call::Grandpa(..) |
|
||||
Call::ImOnline(..) |
|
||||
Call::Utility(..) |
|
||||
Call::Identity(..) |
|
||||
Call::Recovery(pallet_recovery::Call::as_recovered{..}) |
|
||||
Call::Recovery(pallet_recovery::Call::vouch_recovery{..}) |
|
||||
Call::Recovery(pallet_recovery::Call::claim_recovery{..}) |
|
||||
Call::Recovery(pallet_recovery::Call::close_recovery{..}) |
|
||||
Call::Recovery(pallet_recovery::Call::remove_recovery{..}) |
|
||||
Call::Recovery(pallet_recovery::Call::cancel_recovered{..}) |
|
||||
RuntimeCall::Authorship(..) |
|
||||
RuntimeCall::Staking(..) |
|
||||
RuntimeCall::Session(..) |
|
||||
RuntimeCall::Grandpa(..) |
|
||||
RuntimeCall::ImOnline(..) |
|
||||
RuntimeCall::Utility(..) |
|
||||
RuntimeCall::Identity(..) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::as_recovered{..}) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery{..}) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery{..}) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::close_recovery{..}) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery{..}) |
|
||||
RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered{..}) |
|
||||
// Specifically omitting Recovery `create_recovery`, `initiate_recovery`
|
||||
Call::Vesting(pallet_vesting::Call::vest{..}) |
|
||||
Call::Vesting(pallet_vesting::Call::vest_other{..}) |
|
||||
RuntimeCall::Vesting(pallet_vesting::Call::vest{..}) |
|
||||
RuntimeCall::Vesting(pallet_vesting::Call::vest_other{..}) |
|
||||
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
|
||||
Call::Scheduler(..) |
|
||||
RuntimeCall::Scheduler(..) |
|
||||
// Specifically omitting Sudo pallet
|
||||
Call::Proxy(..) |
|
||||
Call::Multisig(..) |
|
||||
Call::Registrar(paras_registrar::Call::register{..}) |
|
||||
Call::Registrar(paras_registrar::Call::deregister{..}) |
|
||||
RuntimeCall::Proxy(..) |
|
||||
RuntimeCall::Multisig(..) |
|
||||
RuntimeCall::Registrar(paras_registrar::Call::register{..}) |
|
||||
RuntimeCall::Registrar(paras_registrar::Call::deregister{..}) |
|
||||
// Specifically omitting Registrar `swap`
|
||||
Call::Registrar(paras_registrar::Call::reserve{..}) |
|
||||
Call::Crowdloan(..) |
|
||||
Call::Slots(..) |
|
||||
Call::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||
Call::VoterList(..) |
|
||||
Call::NominationPools(..)
|
||||
RuntimeCall::Registrar(paras_registrar::Call::reserve{..}) |
|
||||
RuntimeCall::Crowdloan(..) |
|
||||
RuntimeCall::Slots(..) |
|
||||
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||
RuntimeCall::VoterList(..) |
|
||||
RuntimeCall::NominationPools(..)
|
||||
),
|
||||
ProxyType::Staking => {
|
||||
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..)
|
||||
)
|
||||
},
|
||||
ProxyType::SudoBalances => match c {
|
||||
Call::Sudo(pallet_sudo::Call::sudo { call: ref x }) => {
|
||||
matches!(x.as_ref(), &Call::Balances(..))
|
||||
RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => {
|
||||
matches!(x.as_ref(), &RuntimeCall::Balances(..))
|
||||
},
|
||||
Call::Utility(..) => true,
|
||||
RuntimeCall::Utility(..) => true,
|
||||
_ => false,
|
||||
},
|
||||
ProxyType::IdentityJudgement => matches!(
|
||||
c,
|
||||
Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..)
|
||||
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
|
||||
RuntimeCall::Utility(..)
|
||||
),
|
||||
ProxyType::CancelProxy => {
|
||||
matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. }))
|
||||
matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }))
|
||||
},
|
||||
ProxyType::Auction => matches!(
|
||||
c,
|
||||
Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..)
|
||||
RuntimeCall::Auctions(..) |
|
||||
RuntimeCall::Crowdloan(..) |
|
||||
RuntimeCall::Registrar(..) |
|
||||
RuntimeCall::Slots(..)
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -836,8 +842,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;
|
||||
@@ -863,7 +869,7 @@ impl parachains_session_info::Config for Runtime {
|
||||
}
|
||||
|
||||
impl parachains_inclusion::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type DisputesHandler = ParasDisputes;
|
||||
type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints<Runtime>;
|
||||
}
|
||||
@@ -873,7 +879,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl parachains_paras::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::runtime_parachains_paras::WeightInfo<Runtime>;
|
||||
type UnsignedPriority = ParasUnsignedPriority;
|
||||
type NextSessionRotation = Babe;
|
||||
@@ -884,7 +890,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl parachains_ump::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type UmpSink =
|
||||
crate::parachains_ump::XcmSink<xcm_executor::XcmExecutor<xcm_config::XcmConfig>, Runtime>;
|
||||
type FirstMessageFactorPercent = FirstMessageFactorPercent;
|
||||
@@ -895,7 +901,7 @@ impl parachains_ump::Config for Runtime {
|
||||
impl parachains_dmp::Config for Runtime {}
|
||||
|
||||
impl parachains_hrmp::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type Currency = Balances;
|
||||
type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo<Self>;
|
||||
@@ -924,7 +930,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl assigned_slots::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type AssignSlotOrigin = EnsureRoot<AccountId>;
|
||||
type Leaser = Slots;
|
||||
type PermanentSlotLeasePeriodLength = PermanentSlotLeasePeriodLength;
|
||||
@@ -935,7 +941,7 @@ impl assigned_slots::Config for Runtime {
|
||||
}
|
||||
|
||||
impl parachains_disputes::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints<Runtime>;
|
||||
type PunishValidators = ();
|
||||
type WeightInfo = weights::runtime_parachains_disputes::WeightInfo<Runtime>;
|
||||
@@ -947,7 +953,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl paras_registrar::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type Currency = Balances;
|
||||
type OnSwap = (Crowdloan, Slots);
|
||||
@@ -961,7 +967,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl slots::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type Registrar = Registrar;
|
||||
type LeasePeriod = LeasePeriod;
|
||||
@@ -980,7 +986,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl crowdloan::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type PalletId = CrowdloanId;
|
||||
type SubmissionDeposit = SubmissionDeposit;
|
||||
type MinContribution = MinContribution;
|
||||
@@ -1000,7 +1006,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl auctions::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Leaser = Slots;
|
||||
type Registrar = Registrar;
|
||||
type EndingPeriod = EndingPeriod;
|
||||
@@ -1016,7 +1022,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_nomination_pools::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
||||
type Currency = Balances;
|
||||
type CurrencyBalance = Balance;
|
||||
@@ -1147,7 +1153,8 @@ pub type SignedExtra = (
|
||||
pallet_transaction_payment::ChargeTransactionPayment<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>;
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
@@ -1158,7 +1165,7 @@ pub type Executive = frame_executive::Executive<
|
||||
pallet_nomination_pools::migration::v3::MigrateToV3<Runtime>,
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
#[macro_use]
|
||||
@@ -1319,7 +1326,7 @@ sp_api::impl_runtime_apis! {
|
||||
fn candidate_events() -> Vec<CandidateEvent<Hash>> {
|
||||
parachains_runtime_api_impl::candidate_events::<Runtime, _>(|ev| {
|
||||
match ev {
|
||||
Event::ParaInclusion(ev) => {
|
||||
RuntimeEvent::ParaInclusion(ev) => {
|
||||
Some(ev)
|
||||
}
|
||||
_ => None,
|
||||
@@ -1552,13 +1559,13 @@ sp_api::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, len: u32) -> RuntimeDispatchInfo<Balance> {
|
||||
fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(call: Call, len: u32) -> FeeDetails<Balance> {
|
||||
fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
}
|
||||
@@ -1687,7 +1694,7 @@ sp_api::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()))
|
||||
|
||||
@@ -43,9 +43,9 @@ fn sample_size_is_sensible() {
|
||||
#[test]
|
||||
fn call_size() {
|
||||
assert!(
|
||||
core::mem::size_of::<Call>() <= 230,
|
||||
"size of Call is more than 230 bytes: some calls have too big arguments, use Box to reduce \
|
||||
the size of Call.
|
||||
core::mem::size_of::<RuntimeCall>() <= 230,
|
||||
"size of RuntimeCall is more than 230 bytes: some calls have too big arguments, use Box to reduce \
|
||||
the size of RuntimeCall.
|
||||
If the limit is too strong, maybe consider increase the limit to 300.",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ impl WeighMultiAssets for MultiAssets {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WestendXcmWeight<Call>(core::marker::PhantomData<Call>);
|
||||
impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
|
||||
pub struct WestendXcmWeight<RuntimeCall>(core::marker::PhantomData<RuntimeCall>);
|
||||
impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for WestendXcmWeight<RuntimeCall> {
|
||||
fn withdraw_asset(assets: &MultiAssets) -> XCMWeight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
@@ -99,7 +99,7 @@ impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
|
||||
fn transact(
|
||||
_origin_type: &OriginKind,
|
||||
_require_weight_at_most: &u64,
|
||||
_call: &DoubleEncoded<Call>,
|
||||
_call: &DoubleEncoded<RuntimeCall>,
|
||||
) -> XCMWeight {
|
||||
XcmGeneric::<Runtime>::transact().ref_time()
|
||||
}
|
||||
@@ -179,10 +179,10 @@ impl<Call> XcmWeightInfo<Call> for WestendXcmWeight<Call> {
|
||||
fn refund_surplus() -> XCMWeight {
|
||||
XcmGeneric::<Runtime>::refund_surplus().ref_time()
|
||||
}
|
||||
fn set_error_handler(_xcm: &Xcm<Call>) -> XCMWeight {
|
||||
fn set_error_handler(_xcm: &Xcm<RuntimeCall>) -> XCMWeight {
|
||||
XcmGeneric::<Runtime>::set_error_handler().ref_time()
|
||||
}
|
||||
fn set_appendix(_xcm: &Xcm<Call>) -> XCMWeight {
|
||||
fn set_appendix(_xcm: &Xcm<RuntimeCall>) -> XCMWeight {
|
||||
XcmGeneric::<Runtime>::set_appendix().ref_time()
|
||||
}
|
||||
fn clear_error() -> XCMWeight {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
//! XCM configurations for Westend.
|
||||
|
||||
use super::{
|
||||
parachains_origin, weights, AccountId, Balances, Call, Event, Origin, ParaId, Runtime,
|
||||
WeightToFee, XcmPallet,
|
||||
parachains_origin, weights, AccountId, Balances, Origin, ParaId, Runtime, RuntimeCall,
|
||||
RuntimeEvent, WeightToFee, XcmPallet,
|
||||
};
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
@@ -107,7 +107,7 @@ pub type Barrier = (
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = XcmRouter;
|
||||
type AssetTransactor = LocalAssetTransactor;
|
||||
type OriginConverter = LocalOriginConverter;
|
||||
@@ -115,7 +115,8 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = TrustedTeleporters;
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = WeightInfoBounds<weights::xcm::WestendXcmWeight<Call>, Call, MaxInstructions>;
|
||||
type Weigher =
|
||||
WeightInfoBounds<weights::xcm::WestendXcmWeight<RuntimeCall>, RuntimeCall, MaxInstructions>;
|
||||
type Trader = UsingComponents<WeightToFee, WndLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
||||
type ResponseHandler = XcmPallet;
|
||||
type AssetTrap = XcmPallet;
|
||||
@@ -131,7 +132,7 @@ pub type LocalOriginToLocation = (
|
||||
);
|
||||
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||
type XcmRouter = XcmRouter;
|
||||
// Anyone can execute XCM messages locally...
|
||||
@@ -141,10 +142,11 @@ impl pallet_xcm::Config for Runtime {
|
||||
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
type XcmReserveTransferFilter = Everything;
|
||||
type Weigher = WeightInfoBounds<weights::xcm::WestendXcmWeight<Call>, Call, MaxInstructions>;
|
||||
type Weigher =
|
||||
WeightInfoBounds<weights::xcm::WestendXcmWeight<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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user