Companion for #11981 (#1563)

* 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:
Sergej Sakac
2022-09-13 01:55:33 +02:00
committed by GitHub
parent 51eb647826
commit b43bc58cb6
39 changed files with 1020 additions and 958 deletions
@@ -122,7 +122,7 @@ impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The aggregated dispatch type that is available for extrinsics.
type Call = Call;
type RuntimeCall = RuntimeCall;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = AccountIdLookup<AccountId, ()>;
/// The index type for storing how many extrinsics an account has signed.
@@ -136,7 +136,7 @@ impl frame_system::Config for Runtime {
/// The header type.
type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// The ubiquitous event type.
type Event = Event;
type RuntimeEvent = RuntimeEvent;
/// The ubiquitous origin type.
type Origin = Origin;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
@@ -164,7 +164,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 OutboundXcmpMessageSource = ();
@@ -200,7 +200,7 @@ pub struct DisallowSigned;
impl sp_runtime::traits::SignedExtension for DisallowSigned {
const IDENTIFIER: &'static str = "DisallowSigned";
type AccountId = AccountId;
type Call = Call;
type Call = RuntimeCall;
type AdditionalSigned = ();
type Pre = ();
fn additional_signed(
@@ -248,9 +248,10 @@ pub type BlockId = generic::BlockId<Block>;
/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = DisallowSigned;
/// 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,
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime};
use super::{AccountId, Origin, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent};
use frame_support::{match_types, parameter_types};
use xcm::latest::prelude::*;
use xcm_builder::{
@@ -52,7 +52,7 @@ parameter_types! {
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type Call = Call;
type RuntimeCall = RuntimeCall;
type XcmSender = (); // sending XCM not supported
type AssetTransactor = (); // balances not supported
type OriginConverter = XcmOriginToTransactDispatchOrigin;
@@ -60,7 +60,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = (); // balances not supported
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = AllowUnpaidExecutionFrom<JustTheParent>;
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>; // balances not supported
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>; // balances not supported
type Trader = (); // balances not supported
type ResponseHandler = (); // Don't handle responses for now.
type AssetTrap = (); // don't trap for now
@@ -69,6 +69,6 @@ impl xcm_executor::Config for XcmConfig {
}
impl cumulus_pallet_xcm::Config for Runtime {
type Event = Event;
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
}