BREAKING: Rename Call & Event (#11981)

* rename Event to RuntimeEvent

* rename Call

* rename in runtimes

* small fix

* rename Event

* small fix & rename RuntimeCall back to Call for now

* small fixes

* more renaming

* a bit more renaming

* fmt

* small fix

* commit

* prep for renaming associated types

* fix

* rename associated Event type

* rename to RuntimeEvent

* commit

* merge conflict fixes & fmt

* additional renaming

* fix.

* fix decl_event

* rename in tests

* remove warnings

* remove accidental rename

* .

* commit

* update .stderr

* fix in test

* update .stderr

* TRYBUILD=overwrite

* docs

* fmt

* small change in docs

* rename PalletEvent to Event

* rename Call to RuntimeCall

* renamed at wrong places :P

* rename Call

* rename

* rename associated type

* fix

* fix & fmt

* commit

* frame-support-test

* passing tests

* update docs

* rustdoc fix

* update .stderr

* wrong code in docs

* merge fix

* fix in error message

* update .stderr

* docs & error message

* .

* merge fix

* merge fix

* fmt

* fmt

* merge fix

* more fixing

* fmt

* remove unused

* fmt

* fix

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Sergej Sakac
2022-09-13 00:03:31 +02:00
committed by GitHub
parent 472b5746e5
commit 6e8795afe6
228 changed files with 1791 additions and 1672 deletions
+5 -4
View File
@@ -18,7 +18,8 @@
//! Some configurable implementations as associated type for the substrate runtime.
use crate::{
AccountId, AllianceMotion, Assets, Authorship, Balances, Call, Hash, NegativeImbalance, Runtime,
AccountId, AllianceMotion, Assets, Authorship, Balances, Hash, NegativeImbalance, Runtime,
RuntimeCall,
};
use frame_support::{
pallet_prelude::*,
@@ -77,11 +78,11 @@ impl IdentityVerifier<AccountId> for AllianceIdentityVerifier {
}
pub struct AllianceProposalProvider;
impl ProposalProvider<AccountId, Hash, Call> for AllianceProposalProvider {
impl ProposalProvider<AccountId, Hash, RuntimeCall> for AllianceProposalProvider {
fn propose_proposal(
who: AccountId,
threshold: u32,
proposal: Box<Call>,
proposal: Box<RuntimeCall>,
length_bound: u32,
) -> Result<(u32, u32), DispatchError> {
AllianceMotion::do_propose_proposed(who, threshold, proposal, length_bound)
@@ -109,7 +110,7 @@ impl ProposalProvider<AccountId, Hash, Call> for AllianceProposalProvider {
AllianceMotion::do_close(proposal_hash, proposal_index, proposal_weight_bound, length_bound)
}
fn proposal_of(proposal_hash: Hash) -> Option<Call> {
fn proposal_of(proposal_hash: Hash) -> Option<RuntimeCall> {
AllianceMotion::proposal_of(proposal_hash)
}
}
+96 -92
View File
@@ -205,7 +205,7 @@ impl frame_system::Config for Runtime {
type BlockLength = RuntimeBlockLength;
type DbWeight = RocksDbWeight;
type Origin = Origin;
type Call = Call;
type RuntimeCall = RuntimeCall;
type Index = Index;
type BlockNumber = BlockNumber;
type Hash = Hash;
@@ -213,7 +213,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;
@@ -229,8 +229,8 @@ impl frame_system::Config for Runtime {
impl pallet_randomness_collective_flip::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 = pallet_utility::weights::SubstrateWeight<Runtime>;
}
@@ -243,8 +243,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;
@@ -286,25 +286,28 @@ 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(..) |
Call::Vesting(pallet_vesting::Call::vested_transfer { .. }) |
Call::Indices(pallet_indices::Call::transfer { .. })
RuntimeCall::Balances(..) |
RuntimeCall::Assets(..) |
RuntimeCall::Uniques(..) |
RuntimeCall::Vesting(pallet_vesting::Call::vested_transfer { .. }) |
RuntimeCall::Indices(pallet_indices::Call::transfer { .. })
),
ProxyType::Governance => matches!(
c,
Call::Democracy(..) |
Call::Council(..) | Call::Society(..) |
Call::TechnicalCommittee(..) |
Call::Elections(..) | Call::Treasury(..)
RuntimeCall::Democracy(..) |
RuntimeCall::Council(..) |
RuntimeCall::Society(..) |
RuntimeCall::TechnicalCommittee(..) |
RuntimeCall::Elections(..) |
RuntimeCall::Treasury(..)
),
ProxyType::Staking => matches!(c, Call::Staking(..)),
ProxyType::Staking => matches!(c, RuntimeCall::Staking(..)),
}
}
fn is_superset(&self, o: &Self) -> bool {
@@ -319,8 +322,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;
@@ -341,10 +344,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 = ConstU32<50>;
@@ -363,7 +366,7 @@ parameter_types! {
impl pallet_preimage::Config for Runtime {
type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type ManagerOrigin = EnsureRoot<AccountId>;
type MaxSize = PreimageMaxSize;
@@ -413,7 +416,7 @@ impl pallet_indices::Config for Runtime {
type AccountIndex = AccountIndex;
type Currency = Balances;
type Deposit = IndexDeposit;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_indices::weights::SubstrateWeight<Runtime>;
}
@@ -431,7 +434,7 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type Balance = Balance;
type DustRemoval = ();
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Pallet<Runtime>;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
@@ -446,7 +449,7 @@ parameter_types! {
}
impl pallet_transaction_payment::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = CurrencyAdapter<Balances, DealWithFees>;
type OperationalFeeMultiplier = OperationalFeeMultiplier;
type WeightToFee = IdentityFee<Balance>;
@@ -456,7 +459,7 @@ impl pallet_transaction_payment::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>,
@@ -496,7 +499,7 @@ impl_opaque_keys! {
}
impl pallet_session::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_staking::StashOf<Self>;
type ShouldEndSession = Babe;
@@ -546,7 +549,7 @@ impl pallet_staking::Config for Runtime {
type UnixTime = Timestamp;
type CurrencyToVote = U128CurrencyToVote;
type RewardRemainder = Treasury;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Slash = Treasury; // send the slashed funds to the treasury.
type Reward = (); // rewards are minted from the void
type SessionsPerEra = SessionsPerEra;
@@ -686,7 +689,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;
@@ -721,7 +724,7 @@ parameter_types! {
}
impl pallet_bags_list::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type ScoreProvider = Staking;
type WeightInfo = pallet_bags_list::weights::SubstrateWeight<Runtime>;
type BagThresholds = BagThresholds;
@@ -750,7 +753,7 @@ impl Convert<sp_core::U256, Balance> for U256ToBalance {
impl pallet_nomination_pools::Config for Runtime {
type WeightInfo = ();
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type CurrencyBalance = Balance;
type RewardCounter = FixedU128;
@@ -770,7 +773,7 @@ parameter_types! {
impl pallet_conviction_voting::Config for Runtime {
type WeightInfo = pallet_conviction_voting::weights::SubstrateWeight<Self>;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type VoteLockingPeriod = VoteLockingPeriod;
type MaxVotes = ConstU32<512>;
@@ -827,8 +830,8 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
impl pallet_referenda::Config for Runtime {
type WeightInfo = pallet_referenda::weights::SubstrateWeight<Self>;
type Call = Call;
type Event = Event;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
type Currency = pallet_balances::Pallet<Self>;
type SubmitOrigin = EnsureSigned<AccountId>;
@@ -846,8 +849,8 @@ impl pallet_referenda::Config for Runtime {
impl pallet_referenda::Config<pallet_referenda::Instance2> for Runtime {
type WeightInfo = pallet_referenda::weights::SubstrateWeight<Self>;
type Call = Call;
type Event = Event;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
type Currency = pallet_balances::Pallet<Self>;
type SubmitOrigin = EnsureSigned<AccountId>;
@@ -865,7 +868,7 @@ impl pallet_referenda::Config<pallet_referenda::Instance2> for Runtime {
impl pallet_ranked_collective::Config for Runtime {
type WeightInfo = pallet_ranked_collective::weights::SubstrateWeight<Self>;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type PromoteOrigin = EnsureRootWithSuccess<AccountId, ConstU16<65535>>;
type DemoteOrigin = EnsureRootWithSuccess<AccountId, ConstU16<65535>>;
type Polls = RankedPolls;
@@ -875,7 +878,7 @@ impl pallet_ranked_collective::Config for Runtime {
impl pallet_remark::Config for Runtime {
type WeightInfo = pallet_remark::weights::SubstrateWeight<Self>;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
}
parameter_types! {
@@ -889,8 +892,8 @@ parameter_types! {
}
impl pallet_democracy::Config for Runtime {
type Proposal = Call;
type Event = Event;
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type EnactmentPeriod = EnactmentPeriod;
type LaunchPeriod = LaunchPeriod;
@@ -948,8 +951,8 @@ parameter_types! {
type CouncilCollective = pallet_collective::Instance1;
impl pallet_collective::Config<CouncilCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type MotionDuration = CouncilMotionDuration;
type MaxProposals = CouncilMaxProposals;
type MaxMembers = CouncilMaxMembers;
@@ -975,7 +978,7 @@ parameter_types! {
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
impl pallet_elections_phragmen::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type PalletId = ElectionsPhragmenPalletId;
type Currency = Balances;
type ChangeMembers = Council;
@@ -1005,8 +1008,8 @@ parameter_types! {
type TechnicalCollective = pallet_collective::Instance2;
impl pallet_collective::Config<TechnicalCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type MotionDuration = TechnicalMotionDuration;
type MaxProposals = TechnicalMaxProposals;
type MaxMembers = TechnicalMaxMembers;
@@ -1019,7 +1022,7 @@ type EnsureRootOrHalfCouncil = EitherOfDiverse<
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
>;
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type AddOrigin = EnsureRootOrHalfCouncil;
type RemoveOrigin = EnsureRootOrHalfCouncil;
type SwapOrigin = EnsureRootOrHalfCouncil;
@@ -1056,7 +1059,7 @@ impl pallet_treasury::Config for Runtime {
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
>;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type OnSlash = ();
type ProposalBond = ProposalBond;
type ProposalBondMinimum = ProposalBondMinimum;
@@ -1082,7 +1085,7 @@ parameter_types! {
}
impl pallet_bounties::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type BountyDepositBase = BountyDepositBase;
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
type BountyUpdatePeriod = BountyUpdatePeriod;
@@ -1101,14 +1104,14 @@ parameter_types! {
}
impl pallet_child_bounties::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type MaxActiveChildBountyCount = ConstU32<5>;
type ChildBountyValueMinimum = ChildBountyValueMinimum;
type WeightInfo = pallet_child_bounties::weights::SubstrateWeight<Runtime>;
}
impl pallet_tips::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type DataDepositPerByte = DataDepositPerByte;
type MaximumReasonLength = MaximumReasonLength;
type Tippers = Elections;
@@ -1136,8 +1139,8 @@ impl pallet_contracts::Config for Runtime {
type Time = Timestamp;
type Randomness = RandomnessCollectiveFlip;
type Currency = Balances;
type Event = Event;
type Call = Call;
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
/// The safest default is to allow no calls at all.
///
/// Runtimes should whitelist dispatchables that are allowed to be called from contracts
@@ -1162,8 +1165,8 @@ impl pallet_contracts::Config for Runtime {
}
impl pallet_sudo::Config for Runtime {
type Event = Event;
type Call = Call;
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
}
parameter_types! {
@@ -1178,14 +1181,14 @@ parameter_types! {
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 traits::Verify>::Signer,
account: AccountId,
nonce: Index,
) -> Option<(Call, <UncheckedExtrinsic as traits::Extrinsic>::SignaturePayload)> {
) -> Option<(RuntimeCall, <UncheckedExtrinsic as traits::Extrinsic>::SignaturePayload)> {
let tip = 0;
// take the biggest period possible.
let period =
@@ -1225,15 +1228,15 @@ impl frame_system::offchain::SigningTypes for Runtime {
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime
where
Call: From<C>,
RuntimeCall: From<C>,
{
type Extrinsic = UncheckedExtrinsic;
type OverarchingCall = Call;
type OverarchingCall = RuntimeCall;
}
impl pallet_im_online::Config for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type NextSessionRotation = Babe;
type ValidatorSet = Historical;
type ReportUnresponsiveness = Offences;
@@ -1245,7 +1248,7 @@ impl pallet_im_online::Config for Runtime {
}
impl pallet_offences::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
type OnOffenceHandler = Staking;
}
@@ -1255,8 +1258,7 @@ impl pallet_authority_discovery::Config for Runtime {
}
impl pallet_grandpa::Config for Runtime {
type Event = Event;
type Call = Call;
type RuntimeEvent = RuntimeEvent;
type KeyOwnerProofSystem = Historical;
@@ -1288,7 +1290,7 @@ parameter_types! {
}
impl pallet_identity::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
@@ -1310,9 +1312,9 @@ parameter_types! {
}
impl pallet_recovery::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_recovery::weights::SubstrateWeight<Runtime>;
type Call = Call;
type RuntimeCall = RuntimeCall;
type Currency = Balances;
type ConfigDepositBase = ConfigDepositBase;
type FriendDepositFactor = FriendDepositFactor;
@@ -1333,7 +1335,7 @@ parameter_types! {
}
impl pallet_society::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type PalletId = SocietyPalletId;
type Currency = Balances;
type Randomness = RandomnessCollectiveFlip;
@@ -1356,7 +1358,7 @@ parameter_types! {
}
impl pallet_vesting::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
type MinVestedTransfer = MinVestedTransfer;
@@ -1383,10 +1385,10 @@ parameter_types! {
impl pallet_lottery::Config for Runtime {
type PalletId = LotteryPalletId;
type Call = Call;
type RuntimeCall = RuntimeCall;
type Currency = Balances;
type Randomness = RandomnessCollectiveFlip;
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type ManagerOrigin = EnsureRoot<AccountId>;
type MaxCalls = MaxCalls;
type ValidateCall = Lottery;
@@ -1403,7 +1405,7 @@ parameter_types! {
}
impl pallet_assets::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Balance = u128;
type AssetId = u32;
type Currency = Balances;
@@ -1431,7 +1433,7 @@ parameter_types! {
}
impl pallet_gilt::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type CurrencyBalance = Balance;
type AdminOrigin = frame_system::EnsureRoot<AccountId>;
@@ -1456,7 +1458,7 @@ parameter_types! {
}
impl pallet_uniques::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type CollectionId = u32;
type ItemId = u32;
type Currency = Balances;
@@ -1477,9 +1479,9 @@ impl pallet_uniques::Config for Runtime {
}
impl pallet_transaction_storage::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type Call = Call;
type RuntimeCall = RuntimeCall;
type FeeDestination = ();
type WeightInfo = pallet_transaction_storage::weights::SubstrateWeight<Runtime>;
type MaxBlockTransactions =
@@ -1489,8 +1491,8 @@ impl pallet_transaction_storage::Config for Runtime {
}
impl pallet_whitelist::Config for Runtime {
type Event = Event;
type Call = Call;
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WhitelistOrigin = EnsureRoot<AccountId>;
type DispatchWhitelistedOrigin = EnsureRoot<AccountId>;
type PreimageProvider = Preimage;
@@ -1504,7 +1506,7 @@ parameter_types! {
}
impl pallet_state_trie_migration::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type ControlOrigin = EnsureRoot<AccountId>;
type Currency = Balances;
type MaxKeyLen = MigrationMaxKeyLen;
@@ -1529,8 +1531,8 @@ parameter_types! {
type AllianceCollective = pallet_collective::Instance3;
impl pallet_collective::Config<AllianceCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type MotionDuration = AllianceMotionDuration;
type MaxProposals = AllianceMaxProposals;
type MaxMembers = AllianceMaxMembers;
@@ -1547,8 +1549,8 @@ parameter_types! {
}
impl pallet_alliance::Config for Runtime {
type Event = Event;
type Proposal = Call;
type RuntimeEvent = RuntimeEvent;
type Proposal = RuntimeCall;
type AdminOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, AllianceCollective, 2, 3>,
@@ -1673,12 +1675,14 @@ pub type SignedExtra = (
frame_system::CheckWeight<Runtime>,
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>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
pub type SignedPayload = generic::SignedPayload<RuntimeCall, 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,
@@ -1977,13 +1981,13 @@ 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)
}
}
@@ -2178,7 +2182,7 @@ mod tests {
fn validate_transaction_submitter_bounds() {
fn is_submit_signed_transaction<T>()
where
T: CreateSignedTransaction<Call>,
T: CreateSignedTransaction<RuntimeCall>,
{
}
@@ -2198,11 +2202,11 @@ mod tests {
#[test]
fn call_size() {
let size = core::mem::size_of::<Call>();
let size = core::mem::size_of::<RuntimeCall>();
assert!(
size <= 208,
"size of Call {} is more than 208 bytes: some calls have too big arguments, use Box to reduce the
size of Call.
"size of RuntimeCall {} is more than 208 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.",
size,
);