mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +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:
@@ -137,7 +137,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockLength = BlockLength;
|
||||
type DbWeight = ();
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = Nonce;
|
||||
type BlockNumber = BlockNumber;
|
||||
type Hash = HashT;
|
||||
@@ -145,7 +145,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountId = AccountId;
|
||||
type Lookup = Indices;
|
||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type Version = Version;
|
||||
type PalletInfo = PalletInfo;
|
||||
@@ -160,9 +160,9 @@ impl frame_system::Config 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;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ impl pallet_indices::Config for Runtime {
|
||||
type AccountIndex = AccountIndex;
|
||||
type Currency = Balances;
|
||||
type Deposit = IndexDeposit;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
@@ -219,7 +219,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;
|
||||
@@ -236,7 +236,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
|
||||
type OperationalFeeMultiplier = OperationalFeeMultiplier;
|
||||
type WeightToFee = WeightToFee;
|
||||
@@ -282,7 +282,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;
|
||||
@@ -337,7 +337,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type UnixTime = Timestamp;
|
||||
type CurrencyToVote = frame_support::traits::U128CurrencyToVote;
|
||||
type RewardRemainder = ();
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Slash = ();
|
||||
type Reward = ();
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
@@ -362,8 +362,7 @@ impl pallet_staking::Config for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_grandpa::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
type KeyOwnerProofSystem = ();
|
||||
|
||||
@@ -383,14 +382,14 @@ impl pallet_grandpa::Config for Runtime {
|
||||
|
||||
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)> {
|
||||
let period =
|
||||
BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64;
|
||||
|
||||
@@ -427,7 +426,7 @@ impl frame_system::offchain::SigningTypes for Runtime {
|
||||
}
|
||||
|
||||
impl pallet_offences::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
}
|
||||
@@ -446,7 +445,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl claims::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type VestingSchedule = Vesting;
|
||||
type Prefix = Prefix;
|
||||
type MoveClaimOrigin = frame_system::EnsureRoot<AccountId>;
|
||||
@@ -458,7 +457,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_vesting::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type BlockNumberToBalance = ConvertInto;
|
||||
type MinVestedTransfer = MinVestedTransfer;
|
||||
@@ -467,8 +466,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;
|
||||
}
|
||||
|
||||
impl parachains_configuration::Config for Runtime {
|
||||
@@ -478,13 +477,13 @@ impl parachains_configuration::Config for Runtime {
|
||||
impl parachains_shared::Config for Runtime {}
|
||||
|
||||
impl parachains_inclusion::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type DisputesHandler = ParasDisputes;
|
||||
type RewardValidators = RewardValidatorsWithEraPoints<Runtime>;
|
||||
}
|
||||
|
||||
impl parachains_disputes::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RewardValidators = ();
|
||||
type PunishValidators = ();
|
||||
type WeightInfo = parachains_disputes::TestWeightInfo;
|
||||
@@ -509,7 +508,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl parachains_paras::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = parachains_paras::TestWeightInfo;
|
||||
type UnsignedPriority = ParasUnsignedPriority;
|
||||
type NextSessionRotation = Babe;
|
||||
@@ -522,7 +521,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl parachains_ump::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type UmpSink = ();
|
||||
type FirstMessageFactorPercent = FirstMessageFactorPercent;
|
||||
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
||||
@@ -540,24 +539,24 @@ pub type LocalOriginToLocation = xcm_builder::SignedToAccountId32<Origin, Accoun
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
// The config types here are entirely configurable, since the only one that is sorely needed
|
||||
// is `XcmExecutor`, which will be used in unit tests located in xcm-executor.
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||
type LocationInverter = xcm_config::InvertNothing;
|
||||
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
|
||||
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
|
||||
type XcmRouter = xcm_config::DoNothingRouter;
|
||||
type XcmExecuteFilter = Everything;
|
||||
type XcmExecutor = xcm_executor::XcmExecutor<xcm_config::XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
type XcmReserveTransferFilter = Everything;
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
|
||||
}
|
||||
|
||||
impl parachains_hrmp::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type Currency = Balances;
|
||||
type WeightInfo = parachains_hrmp::TestWeightInfo;
|
||||
@@ -570,9 +569,9 @@ impl paras_sudo_wrapper::Config for Runtime {}
|
||||
impl parachains_origin::Config for Runtime {}
|
||||
|
||||
impl pallet_test_notifier::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
}
|
||||
|
||||
#[frame_support::pallet]
|
||||
@@ -589,10 +588,10 @@ pub mod pallet_test_notifier {
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config + pallet_xcm::Config {
|
||||
type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;
|
||||
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
|
||||
type Origin: IsType<<Self as frame_system::Config>::Origin>
|
||||
+ Into<Result<pallet_xcm::Origin, <Self as Config>::Origin>>;
|
||||
type Call: IsType<<Self as pallet_xcm::Config>::Call> + From<Call<Self>>;
|
||||
type RuntimeCall: IsType<<Self as pallet_xcm::Config>::RuntimeCall> + From<Call<Self>>;
|
||||
}
|
||||
|
||||
#[pallet::event]
|
||||
@@ -635,7 +634,7 @@ pub mod pallet_test_notifier {
|
||||
Call::<T>::notification_received { query_id: 0, response: Default::default() };
|
||||
let qid = pallet_xcm::Pallet::<T>::new_notify_query(
|
||||
Junction::AccountId32 { network: Any, id }.into(),
|
||||
<T as Config>::Call::from(call),
|
||||
<T as Config>::RuntimeCall::from(call),
|
||||
100u32.into(),
|
||||
);
|
||||
Self::deposit_event(Event::<T>::NotifyQueryPrepared(qid));
|
||||
@@ -732,7 +731,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,
|
||||
@@ -742,7 +742,7 @@ pub type Executive = frame_executive::Executive<
|
||||
AllPalletsWithSystem,
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
|
||||
|
||||
pub type Hash = <Block as BlockT>::Hash;
|
||||
pub type Extrinsic = <Block as BlockT>::Extrinsic;
|
||||
@@ -1061,13 +1061,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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user