git.delta.rocks / unique-network / refs/commits / 20be67e26dbe

difftreelog

source

runtime/opal/src/lib.rs40.4 KiBsourcehistory
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.1819#![cfg_attr(not(feature = "std"), no_std)]20// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.21#![recursion_limit = "1024"]22#![allow(clippy::from_over_into, clippy::identity_op)]23#![allow(clippy::fn_to_numeric_cast_with_truncation)]24// Make the WASM binary available.25#[cfg(feature = "std")]26include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));2728use sp_api::impl_runtime_apis;29use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};30use sp_runtime::DispatchError;31// #[cfg(any(feature = "std", test))]32// pub use sp_runtime::BuildStorage;3334use sp_runtime::{35	Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,36	traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero},37	transaction_validity::{TransactionSource, TransactionValidity},38	ApplyExtrinsicResult, RuntimeAppPublic,39};4041use sp_std::prelude::*;4243#[cfg(feature = "std")]44use sp_version::NativeVersion;45use sp_version::RuntimeVersion;46pub use pallet_transaction_payment::{47	Multiplier, TargetedFeeAdjustment, FeeDetails, RuntimeDispatchInfo,48};49// A few exports that help ease life for downstream crates.50pub use pallet_balances::Call as BalancesCall;51pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};52pub use frame_support::{53	construct_runtime, match_type,54	dispatch::DispatchResult,55	PalletId, parameter_types, StorageValue, ConsensusEngineId,56	traits::{57		tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT, Everything,58		Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem, LockIdentifier,59		OnUnbalanced, Randomness, FindAuthor,60	},61	weights::{62		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},63		DispatchClass, DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,64		WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,65	},66};67use up_data_structs::*;68// use pallet_contracts::weights::WeightInfo;69// #[cfg(any(feature = "std", test))]70use frame_system::{71	self as frame_system, EnsureRoot, EnsureSigned,72	limits::{BlockWeights, BlockLength},73};74use sp_arithmetic::{75	traits::{BaseArithmetic, Unsigned},76};77use smallvec::smallvec;78use codec::{Encode, Decode};79use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};80use fp_rpc::TransactionStatus;81use sp_runtime::{82	traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating},83	transaction_validity::TransactionValidityError,84	SaturatedConversion,85};8687// pub use pallet_timestamp::Call as TimestampCall;88pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;8990// Polkadot imports91use pallet_xcm::XcmPassthrough;92use polkadot_parachain::primitives::Sibling;93use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};94use xcm_builder::{95	AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,96	EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,97	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,98	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,99	ParentIsPreset,100};101use xcm_executor::{Config, XcmExecutor, Assets};102use sp_std::{marker::PhantomData};103104use xcm::latest::{105	//	Xcm,106	AssetId::{Concrete},107	Fungibility::Fungible as XcmFungible,108	MultiAsset,109	Error as XcmError,110};111use xcm_executor::traits::{MatchesFungible, WeightTrader};112//use xcm_executor::traits::MatchesFungible;113use sp_runtime::traits::CheckedConversion;114115use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};116117pub const RUNTIME_NAME: &str = "Opal";118119type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;120121impl RuntimeInstance for Runtime {122	type CrossAccountId = self::CrossAccountId;123	type TransactionConverter = self::TransactionConverter;124125	fn get_transaction_converter() -> TransactionConverter {126		TransactionConverter127	}128}129130/// The type for looking up accounts. We don't expect more than 4 billion of them, but you131/// never know...132pub type AccountIndex = u32;133134/// Balance of an account.135pub type Balance = u128;136137/// Index of a transaction in the chain.138pub type Index = u32;139140/// A hash of some data used by the chain.141pub type Hash = sp_core::H256;142143/// Digest item type.144pub type DigestItem = generic::DigestItem;145146/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know147/// the specifics of the runtime. They can then be made to be agnostic over specific formats148/// of data like extrinsics, allowing for them to continue syncing the network through upgrades149/// to even the core data structures.150pub mod opaque {151	use sp_std::prelude::*;152	use sp_runtime::impl_opaque_keys;153	use super::Aura;154155	pub use unique_runtime_common::types::*;156157	impl_opaque_keys! {158		pub struct SessionKeys {159			pub aura: Aura,160		}161	}162}163164/// This runtime version.165pub const VERSION: RuntimeVersion = RuntimeVersion {166	spec_name: create_runtime_str!(RUNTIME_NAME),167	impl_name: create_runtime_str!(RUNTIME_NAME),168	authoring_version: 1,169	spec_version: 917004,170	impl_version: 0,171	apis: RUNTIME_API_VERSIONS,172	transaction_version: 1,173	state_version: 0,174};175176#[derive(codec::Encode, codec::Decode)]177pub enum XCMPMessage<XAccountId, XBalance> {178	/// Transfer tokens to the given account from the Parachain account.179	TransferToken(XAccountId, XBalance),180}181182/// The version information used to identify this runtime when compiled natively.183#[cfg(feature = "std")]184pub fn native_version() -> NativeVersion {185	NativeVersion {186		runtime_version: VERSION,187		can_author_with: Default::default(),188	}189}190191type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;192193pub struct DealWithFees;194impl OnUnbalanced<NegativeImbalance> for DealWithFees {195	fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance>) {196		if let Some(fees) = fees_then_tips.next() {197			// for fees, 100% to treasury198			let mut split = fees.ration(100, 0);199			if let Some(tips) = fees_then_tips.next() {200				// for tips, if any, 100% to treasury201				tips.ration_merge_into(100, 0, &mut split);202			}203			Treasury::on_unbalanced(split.0);204			// Author::on_unbalanced(split.1);205		}206	}207}208209parameter_types! {210	pub const BlockHashCount: BlockNumber = 2400;211	pub RuntimeBlockLength: BlockLength =212		BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);213	pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);214	pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;215	pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()216		.base_block(BlockExecutionWeight::get())217		.for_class(DispatchClass::all(), |weights| {218			weights.base_extrinsic = ExtrinsicBaseWeight::get();219		})220		.for_class(DispatchClass::Normal, |weights| {221			weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);222		})223		.for_class(DispatchClass::Operational, |weights| {224			weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);225			// Operational transactions have some extra reserved space, so that they226			// are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.227			weights.reserved = Some(228				MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT229			);230		})231		.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)232		.build_or_panic();233	pub const Version: RuntimeVersion = VERSION;234	pub const SS58Prefix: u8 = 42;235}236237parameter_types! {238	pub const ChainId: u64 = 8882;239}240241pub struct FixedFee;242impl FeeCalculator for FixedFee {243	fn min_gas_price() -> U256 {244		MIN_GAS_PRICE.into()245	}246}247248// Assuming slowest ethereum opcode is SSTORE, with gas price of 20000 as our worst case249// (contract, which only writes a lot of data),250// approximating on top of our real store write weight251parameter_types! {252	pub const WritesPerSecond: u64 = WEIGHT_PER_SECOND / <Runtime as frame_system::Config>::DbWeight::get().write;253	pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000;254	pub const WeightPerGas: u64 = WEIGHT_PER_SECOND / GasPerSecond::get();255}256257/// Limiting EVM execution to 50% of block for substrate users and management tasks258/// EVM transaction consumes more weight than substrate's, so we can't rely on them being259/// scheduled fairly260const EVM_DISPATCH_RATIO: Perbill = Perbill::from_percent(50);261parameter_types! {262	pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * EVM_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WeightPerGas::get());263}264265pub enum FixedGasWeightMapping {}266impl GasWeightMapping for FixedGasWeightMapping {267	fn gas_to_weight(gas: u64) -> Weight {268		gas.saturating_mul(WeightPerGas::get())269	}270	fn weight_to_gas(weight: Weight) -> u64 {271		weight / WeightPerGas::get()272	}273}274275impl pallet_evm::account::Config for Runtime {276	type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;277	type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;278	type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;279}280281impl pallet_evm::Config for Runtime {282	type BlockGasLimit = BlockGasLimit;283	type FeeCalculator = FixedFee;284	type GasWeightMapping = FixedGasWeightMapping;285	type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;286	type CallOrigin = EnsureAddressTruncated;287	type WithdrawOrigin = EnsureAddressTruncated;288	type AddressMapping = HashedAddressMapping<Self::Hashing>;289	type PrecompilesType = ();290	type PrecompilesValue = ();291	type Currency = Balances;292	type Event = Event;293	type OnMethodCall = (294		pallet_evm_migration::OnMethodCall<Self>,295		pallet_unique::UniqueErcSupport<Self>,296		pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,297	);298	type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;299	type ChainId = ChainId;300	type Runner = pallet_evm::runner::stack::Runner<Self>;301	type OnChargeTransaction = pallet_evm_transaction_payment::OnChargeTransaction<Self>;302	type TransactionValidityHack = pallet_evm_transaction_payment::TransactionValidityHack<Self>;303	type FindAuthor = EthereumFindAuthor<Aura>;304}305306impl pallet_evm_migration::Config for Runtime {307	type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;308}309310impl frame_common::account::Config for Runtime {311	type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;312	type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;313}314315pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);316impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {317	fn find_author<'a, I>(digests: I) -> Option<H160>318	where319		I: 'a + IntoIterator<Item = (ConsensusEngineId, &'a [u8])>,320	{321		if let Some(author_index) = F::find_author(digests) {322			let authority_id = Aura::authorities()[author_index as usize].clone();323			return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24]));324		}325		None326	}327}328329impl pallet_ethereum::Config for Runtime {330	type Event = Event;331	type StateRoot = pallet_ethereum::IntermediateStateRoot;332}333334impl pallet_randomness_collective_flip::Config for Runtime {}335336impl frame_system::Config for Runtime {337	/// The data to be stored in an account.338	type AccountData = pallet_balances::AccountData<Balance>;339	/// The identifier used to distinguish between accounts.340	type AccountId = AccountId;341	/// The basic call filter to use in dispatchable.342	type BaseCallFilter = Everything;343	/// Maximum number of block number to block hash mappings to keep (oldest pruned first).344	type BlockHashCount = BlockHashCount;345	/// The maximum length of a block (in bytes).346	type BlockLength = RuntimeBlockLength;347	/// The index type for blocks.348	type BlockNumber = BlockNumber;349	/// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.350	type BlockWeights = RuntimeBlockWeights;351	/// The aggregated dispatch type that is available for extrinsics.352	type Call = Call;353	/// The weight of database operations that the runtime can invoke.354	type DbWeight = RocksDbWeight;355	/// The ubiquitous event type.356	type Event = Event;357	/// The type for hashing blocks and tries.358	type Hash = Hash;359	/// The hashing algorithm used.360	type Hashing = BlakeTwo256;361	/// The header type.362	type Header = generic::Header<BlockNumber, BlakeTwo256>;363	/// The index type for storing how many extrinsics an account has signed.364	type Index = Index;365	/// The lookup mechanism to get account ID from whatever is passed in dispatchers.366	type Lookup = AccountIdLookup<AccountId, ()>;367	/// What to do if an account is fully reaped from the system.368	type OnKilledAccount = ();369	/// What to do if a new account is created.370	type OnNewAccount = ();371	type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;372	/// The ubiquitous origin type.373	type Origin = Origin;374	/// This type is being generated by `construct_runtime!`.375	type PalletInfo = PalletInfo;376	/// This is used as an identifier of the chain. 42 is the generic substrate prefix.377	type SS58Prefix = SS58Prefix;378	/// Weight information for the extrinsics of this pallet.379	type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;380	/// Version of the runtime.381	type Version = Version;382	type MaxConsumers = ConstU32<16>;383}384385parameter_types! {386	pub const MinimumPeriod: u64 = SLOT_DURATION / 2;387}388389impl pallet_timestamp::Config for Runtime {390	/// A timestamp: milliseconds since the unix epoch.391	type Moment = u64;392	type OnTimestampSet = ();393	type MinimumPeriod = MinimumPeriod;394	type WeightInfo = ();395}396397parameter_types! {398	// pub const ExistentialDeposit: u128 = 500;399	pub const ExistentialDeposit: u128 = 0;400	pub const MaxLocks: u32 = 50;401}402403impl pallet_balances::Config for Runtime {404	type MaxLocks = MaxLocks;405	type MaxReserves = ();406	type ReserveIdentifier = [u8; 8];407	/// The type for recording an account's balance.408	type Balance = Balance;409	/// The ubiquitous event type.410	type Event = Event;411	type DustRemoval = Treasury;412	type ExistentialDeposit = ExistentialDeposit;413	type AccountStore = System;414	type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;415}416417pub const fn deposit(items: u32, bytes: u32) -> Balance {418	items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE419}420421/*422parameter_types! {423	pub TombstoneDeposit: Balance = deposit(424		1,425		sp_std::mem::size_of::<pallet_contracts::Pallet<Runtime>> as u32,426	);427	pub DepositPerContract: Balance = TombstoneDeposit::get();428	pub const DepositPerStorageByte: Balance = deposit(0, 1);429	pub const DepositPerStorageItem: Balance = deposit(1, 0);430	pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);431	pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;432	pub const SignedClaimHandicap: u32 = 2;433	pub const MaxDepth: u32 = 32;434	pub const MaxValueSize: u32 = 16 * 1024;435	pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb436	// The lazy deletion runs inside on_initialize.437	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *438		RuntimeBlockWeights::get().max_block;439	// The weight needed for decoding the queue should be less or equal than a fifth440	// of the overall weight dedicated to the lazy deletion.441	pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (442			<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -443			<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)444		)) / 5) as u32;445	pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();446}447448impl pallet_contracts::Config for Runtime {449	type Time = Timestamp;450	type Randomness = RandomnessCollectiveFlip;451	type Currency = Balances;452	type Event = Event;453	type RentPayment = ();454	type SignedClaimHandicap = SignedClaimHandicap;455	type TombstoneDeposit = TombstoneDeposit;456	type DepositPerContract = DepositPerContract;457	type DepositPerStorageByte = DepositPerStorageByte;458	type DepositPerStorageItem = DepositPerStorageItem;459	type RentFraction = RentFraction;460	type SurchargeReward = SurchargeReward;461	type WeightPrice = pallet_transaction_payment::Pallet<Self>;462	type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;463	type ChainExtension = NFTExtension;464	type DeletionQueueDepth = DeletionQueueDepth;465	type DeletionWeightLimit = DeletionWeightLimit;466	type Schedule = Schedule;467	type CallStack = [pallet_contracts::Frame<Self>; 31];468}469*/470471parameter_types! {472	/// This value increases the priority of `Operational` transactions by adding473	/// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.474	pub const OperationalFeeMultiplier: u8 = 5;475}476477/// Linear implementor of `WeightToFeePolynomial`478pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);479480impl<T> WeightToFeePolynomial for LinearFee<T>481where482	T: BaseArithmetic + From<u32> + Copy + Unsigned,483{484	type Balance = T;485486	fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {487		smallvec!(WeightToFeeCoefficient {488			// Targeting 0.1 Unique per NFT transfer489			coeff_integer: WEIGHT_TO_FEE_COEFF.into(),490			coeff_frac: Perbill::zero(),491			negative: false,492			degree: 1,493		})494	}495}496497impl pallet_transaction_payment::Config for Runtime {498	type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;499	type TransactionByteFee = TransactionByteFee;500	type OperationalFeeMultiplier = OperationalFeeMultiplier;501	type WeightToFee = LinearFee<Balance>;502	type FeeMultiplierUpdate = ();503}504505parameter_types! {506	pub const ProposalBond: Permill = Permill::from_percent(5);507	pub const ProposalBondMinimum: Balance = 1 * UNIQUE;508	pub const ProposalBondMaximum: Balance = 1000 * UNIQUE;509	pub const SpendPeriod: BlockNumber = 5 * MINUTES;510	pub const Burn: Permill = Permill::from_percent(0);511	pub const TipCountdown: BlockNumber = 1 * DAYS;512	pub const TipFindersFee: Percent = Percent::from_percent(20);513	pub const TipReportDepositBase: Balance = 1 * UNIQUE;514	pub const DataDepositPerByte: Balance = 1 * CENTIUNIQUE;515	pub const BountyDepositBase: Balance = 1 * UNIQUE;516	pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;517	pub const TreasuryModuleId: PalletId = PalletId(*b"py/trsry");518	pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;519	pub const MaximumReasonLength: u32 = 16384;520	pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);521	pub const BountyValueMinimum: Balance = 5 * UNIQUE;522	pub const MaxApprovals: u32 = 100;523}524525impl pallet_treasury::Config for Runtime {526	type PalletId = TreasuryModuleId;527	type Currency = Balances;528	type ApproveOrigin = EnsureRoot<AccountId>;529	type RejectOrigin = EnsureRoot<AccountId>;530	type Event = Event;531	type OnSlash = ();532	type ProposalBond = ProposalBond;533	type ProposalBondMinimum = ProposalBondMinimum;534	type ProposalBondMaximum = ProposalBondMaximum;535	type SpendPeriod = SpendPeriod;536	type Burn = Burn;537	type BurnDestination = ();538	type SpendFunds = ();539	type WeightInfo = pallet_treasury::weights::SubstrateWeight<Self>;540	type MaxApprovals = MaxApprovals;541}542543impl pallet_sudo::Config for Runtime {544	type Event = Event;545	type Call = Call;546}547548pub struct RelayChainBlockNumberProvider<T>(sp_std::marker::PhantomData<T>);549550impl<T: cumulus_pallet_parachain_system::Config> BlockNumberProvider551	for RelayChainBlockNumberProvider<T>552{553	type BlockNumber = BlockNumber;554555	fn current_block_number() -> Self::BlockNumber {556		cumulus_pallet_parachain_system::Pallet::<T>::validation_data()557			.map(|d| d.relay_parent_number)558			.unwrap_or_default()559	}560}561562parameter_types! {563	pub const MinVestedTransfer: Balance = 10 * UNIQUE;564	pub const MaxVestingSchedules: u32 = 28;565}566567impl orml_vesting::Config for Runtime {568	type Event = Event;569	type Currency = pallet_balances::Pallet<Runtime>;570	type MinVestedTransfer = MinVestedTransfer;571	type VestedTransferOrigin = EnsureSigned<AccountId>;572	type WeightInfo = ();573	type MaxVestingSchedules = MaxVestingSchedules;574	type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;575}576577parameter_types! {578	pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;579	pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;580}581582impl cumulus_pallet_parachain_system::Config for Runtime {583	type Event = Event;584	type SelfParaId = parachain_info::Pallet<Self>;585	type OnSystemEvent = ();586	// type DownwardMessageHandlers = cumulus_primitives_utility::UnqueuedDmpAsParent<587	// 	MaxDownwardMessageWeight,588	// 	XcmExecutor<XcmConfig>,589	// 	Call,590	// >;591	type OutboundXcmpMessageSource = XcmpQueue;592	type DmpMessageHandler = DmpQueue;593	type ReservedDmpWeight = ReservedDmpWeight;594	type ReservedXcmpWeight = ReservedXcmpWeight;595	type XcmpMessageHandler = XcmpQueue;596}597598impl parachain_info::Config for Runtime {}599600impl cumulus_pallet_aura_ext::Config for Runtime {}601602parameter_types! {603	pub const RelayLocation: MultiLocation = MultiLocation::parent();604	pub const RelayNetwork: NetworkId = NetworkId::Polkadot;605	pub RelayOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();606	pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();607}608609/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used610/// when determining ownership of accounts for asset transacting and when attempting to use XCM611/// `Transact` in order to determine the dispatch Origin.612pub type LocationToAccountId = (613	// The parent (Relay-chain) origin converts to the default `AccountId`.614	ParentIsPreset<AccountId>,615	// Sibling parachain origins convert to AccountId via the `ParaId::into`.616	SiblingParachainConvertsVia<Sibling, AccountId>,617	// Straight up local `AccountId32` origins just alias directly to `AccountId`.618	AccountId32Aliases<RelayNetwork, AccountId>,619);620621pub struct OnlySelfCurrency;622impl<B: TryFrom<u128>> MatchesFungible<B> for OnlySelfCurrency {623	fn matches_fungible(a: &MultiAsset) -> Option<B> {624		match (&a.id, &a.fun) {625			(Concrete(_), XcmFungible(ref amount)) => CheckedConversion::checked_from(*amount),626			_ => None,627		}628	}629}630631/// Means for transacting assets on this chain.632pub type LocalAssetTransactor = CurrencyAdapter<633	// Use this currency:634	Balances,635	// Use this currency when it is a fungible asset matching the given location or name:636	OnlySelfCurrency,637	// Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:638	LocationToAccountId,639	// Our chain's account ID type (we can't get away without mentioning it explicitly):640	AccountId,641	// We don't track any teleports.642	(),643>;644645/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,646/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can647/// biases the kind of local `Origin` it will become.648pub type XcmOriginToTransactDispatchOrigin = (649	// Sovereign account converter; this attempts to derive an `AccountId` from the origin location650	// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for651	// foreign chains who want to have a local sovereign account on this chain which they control.652	SovereignSignedViaLocation<LocationToAccountId, Origin>,653	// Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when654	// recognised.655	RelayChainAsNative<RelayOrigin, Origin>,656	// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when657	// recognised.658	SiblingParachainAsNative<cumulus_pallet_xcm::Origin, Origin>,659	// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a660	// transaction from the Root origin.661	ParentAsSuperuser<Origin>,662	// Native signed account converter; this just converts an `AccountId32` origin into a normal663	// `Origin::Signed` origin of the same 32-byte value.664	SignedAccountId32AsNative<RelayNetwork, Origin>,665	// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.666	XcmPassthrough<Origin>,667);668669parameter_types! {670	// One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.671	pub UnitWeightCost: Weight = 1_000_000;672	// 1200 UNIQUEs buy 1 second of weight.673	pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), 1_200 * UNIQUE);674	pub const MaxInstructions: u32 = 100;675	pub const MaxAuthorities: u32 = 100_000;676}677678match_type! {679	pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {680		MultiLocation { parents: 1, interior: Here } |681		MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }682	};683}684685pub type Barrier = (686	TakeWeightCredit,687	AllowTopLevelPaidExecutionFrom<Everything>,688	AllowUnpaidExecutionFrom<ParentOrParentsUnitPlurality>,689	// ^^^ Parent & its unit plurality gets free execution690);691692pub struct UsingOnlySelfCurrencyComponents<693	WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,694	AssetId: Get<MultiLocation>,695	AccountId,696	Currency: CurrencyT<AccountId>,697	OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,698>(699	Weight,700	Currency::Balance,701	PhantomData<(WeightToFee, AssetId, AccountId, Currency, OnUnbalanced)>,702);703impl<704		WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,705		AssetId: Get<MultiLocation>,706		AccountId,707		Currency: CurrencyT<AccountId>,708		OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,709	> WeightTrader710	for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>711{712	fn new() -> Self {713		Self(0, Zero::zero(), PhantomData)714	}715716	fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {717		let amount = WeightToFee::calc(&weight);718		let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;719720		// location to this parachain through relay chain721		let option1: xcm::v1::AssetId = Concrete(MultiLocation {722			parents: 1,723			interior: X1(Parachain(ParachainInfo::parachain_id().into())),724		});725		// direct location726		let option2: xcm::v1::AssetId = Concrete(MultiLocation {727			parents: 0,728			interior: Here,729		});730731		let required = if payment.fungible.contains_key(&option1) {732			(option1, u128_amount).into()733		} else if payment.fungible.contains_key(&option2) {734			(option2, u128_amount).into()735		} else {736			(Concrete(MultiLocation::default()), u128_amount).into()737		};738739		let unused = payment740			.checked_sub(required)741			.map_err(|_| XcmError::TooExpensive)?;742		self.0 = self.0.saturating_add(weight);743		self.1 = self.1.saturating_add(amount);744		Ok(unused)745	}746747	fn refund_weight(&mut self, weight: Weight) -> Option<MultiAsset> {748		let weight = weight.min(self.0);749		let amount = WeightToFee::calc(&weight);750		self.0 -= weight;751		self.1 = self.1.saturating_sub(amount);752		let amount: u128 = amount.saturated_into();753		if amount > 0 {754			Some((AssetId::get(), amount).into())755		} else {756			None757		}758	}759}760impl<761		WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,762		AssetId: Get<MultiLocation>,763		AccountId,764		Currency: CurrencyT<AccountId>,765		OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,766	> Drop767	for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>768{769	fn drop(&mut self) {770		OnUnbalanced::on_unbalanced(Currency::issue(self.1));771	}772}773774pub struct XcmConfig;775impl Config for XcmConfig {776	type Call = Call;777	type XcmSender = XcmRouter;778	// How to withdraw and deposit an asset.779	type AssetTransactor = LocalAssetTransactor;780	type OriginConverter = XcmOriginToTransactDispatchOrigin;781	type IsReserve = NativeAsset;782	type IsTeleporter = (); // Teleportation is disabled783	type LocationInverter = LocationInverter<Ancestry>;784	type Barrier = Barrier;785	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;786	type Trader = UsingOnlySelfCurrencyComponents<787		IdentityFee<Balance>,788		RelayLocation,789		AccountId,790		Balances,791		(),792	>;793	type ResponseHandler = (); // Don't handle responses for now.794	type SubscriptionService = PolkadotXcm;795796	type AssetTrap = PolkadotXcm;797	type AssetClaims = PolkadotXcm;798}799800// parameter_types! {801// 	pub const MaxDownwardMessageWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10;802// }803804/// No local origins on this chain are allowed to dispatch XCM sends/executions.805pub type LocalOriginToLocation = (SignedToAccountId32<Origin, AccountId, RelayNetwork>,);806807/// The means for routing XCM messages which are not for local execution into the right message808/// queues.809pub type XcmRouter = (810	// Two routers - use UMP to communicate with the relay chain:811	cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,812	// ..and XCMP to communicate with the sibling chains.813	XcmpQueue,814);815816impl pallet_evm_coder_substrate::Config for Runtime {817	type EthereumTransactionSender = pallet_ethereum::Pallet<Self>;818	type GasWeightMapping = FixedGasWeightMapping;819}820821impl pallet_xcm::Config for Runtime {822	type Event = Event;823	type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;824	type XcmRouter = XcmRouter;825	type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;826	type XcmExecuteFilter = Everything;827	type XcmExecutor = XcmExecutor<XcmConfig>;828	type XcmTeleportFilter = Everything;829	type XcmReserveTransferFilter = Everything;830	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;831	type LocationInverter = LocationInverter<Ancestry>;832	type Origin = Origin;833	type Call = Call;834	const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;835	type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;836}837838impl cumulus_pallet_xcm::Config for Runtime {839	type Event = Event;840	type XcmExecutor = XcmExecutor<XcmConfig>;841}842843impl cumulus_pallet_xcmp_queue::Config for Runtime {844	type WeightInfo = ();845	type Event = Event;846	type XcmExecutor = XcmExecutor<XcmConfig>;847	type ChannelInfo = ParachainSystem;848	type VersionWrapper = ();849	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;850	type ControllerOrigin = EnsureRoot<AccountId>;851	type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;852}853854impl cumulus_pallet_dmp_queue::Config for Runtime {855	type Event = Event;856	type XcmExecutor = XcmExecutor<XcmConfig>;857	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;858}859860impl pallet_aura::Config for Runtime {861	type AuthorityId = AuraId;862	type DisabledValidators = ();863	type MaxAuthorities = MaxAuthorities;864}865866parameter_types! {867	pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account();868	pub const CollectionCreationPrice: Balance = 2 * UNIQUE;869}870871impl pallet_common::Config for Runtime {872	type Event = Event;873	type Currency = Balances;874	type CollectionCreationPrice = CollectionCreationPrice;875	type TreasuryAccountId = TreasuryAccountId;876}877878impl pallet_fungible::Config for Runtime {879	type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;880}881impl pallet_refungible::Config for Runtime {882	type WeightInfo = pallet_refungible::weights::SubstrateWeight<Self>;883}884impl pallet_nonfungible::Config for Runtime {885	type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;886}887888impl pallet_unique::Config for Runtime {889	type Event = Event;890	type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;891}892893parameter_types! {894	pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied895}896897/// Used for the pallet inflation898impl pallet_inflation::Config for Runtime {899	type Currency = Balances;900	type TreasuryAccountId = TreasuryAccountId;901	type InflationBlockInterval = InflationBlockInterval;902	type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;903}904905// parameter_types! {906// 	pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *907// 		RuntimeBlockWeights::get().max_block;908// 	pub const MaxScheduledPerBlock: u32 = 50;909// }910911type EvmSponsorshipHandler = (912	pallet_unique::UniqueEthSponsorshipHandler<Runtime>,913	pallet_evm_contract_helpers::HelpersContractSponsoring<Runtime>,914);915type SponsorshipHandler = (916	pallet_unique::UniqueSponsorshipHandler<Runtime>,917	//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,918	pallet_evm_transaction_payment::BridgeSponsorshipHandler<Runtime>,919);920921// impl pallet_unq_scheduler::Config for Runtime {922// 	type Event = Event;923// 	type Origin = Origin;924// 	type PalletsOrigin = OriginCaller;925// 	type Call = Call;926// 	type MaximumWeight = MaximumSchedulerWeight;927// 	type ScheduleOrigin = EnsureSigned<AccountId>;928// 	type MaxScheduledPerBlock = MaxScheduledPerBlock;929// 	type SponsorshipHandler = SponsorshipHandler;930// 	type WeightInfo = ();931// }932933impl pallet_evm_transaction_payment::Config for Runtime {934	type EvmSponsorshipHandler = EvmSponsorshipHandler;935	type Currency = Balances;936}937938impl pallet_charge_transaction::Config for Runtime {939	type SponsorshipHandler = SponsorshipHandler;940}941942// impl pallet_contract_helpers::Config for Runtime {943//	 type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;944// }945946parameter_types! {947	// 0x842899ECF380553E8a4de75bF534cdf6fBF64049948	pub const HelpersContractAddress: H160 = H160([949		0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,950	]);951}952953impl pallet_evm_contract_helpers::Config for Runtime {954	type ContractAddress = HelpersContractAddress;955	type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;956	type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;957	type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;958}959960construct_runtime!(961	pub enum Runtime where962		Block = Block,963		NodeBlock = opaque::Block,964		UncheckedExtrinsic = UncheckedExtrinsic965	{966		ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,967		ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,968969		Aura: pallet_aura::{Pallet, Config<T>} = 22,970		AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,971972		Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,973		RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,974		Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,975		TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,976		Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,977		Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,978		System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,979		Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,980		// Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,981		// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,982983		// XCM helpers.984		XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,985		PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,986		CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,987		DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,988989		// Unique Pallets990		Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,991		Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,992		// Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,993		// free = 63994		Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,995		// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,996		Common: pallet_common::{Pallet, Storage, Event<T>} = 66,997		Fungible: pallet_fungible::{Pallet, Storage} = 67,998		Refungible: pallet_refungible::{Pallet, Storage} = 68,999		Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,10001001		// Frontier1002		EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,1003		Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,10041005		EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,1006		EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,1007		EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,1008		EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,1009	}1010);10111012pub struct TransactionConverter;10131014impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {1015	fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {1016		UncheckedExtrinsic::new_unsigned(1017			pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),1018		)1019	}1020}10211022impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {1023	fn convert_transaction(1024		&self,1025		transaction: pallet_ethereum::Transaction,1026	) -> opaque::UncheckedExtrinsic {1027		let extrinsic = UncheckedExtrinsic::new_unsigned(1028			pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),1029		);1030		let encoded = extrinsic.encode();1031		opaque::UncheckedExtrinsic::decode(&mut &encoded[..])1032			.expect("Encoded extrinsic is always valid")1033	}1034}10351036/// The address format for describing accounts.1037pub type Address = sp_runtime::MultiAddress<AccountId, ()>;1038/// Block header type as expected by this runtime.1039pub type Header = generic::Header<BlockNumber, BlakeTwo256>;1040/// Block type as expected by this runtime.1041pub type Block = generic::Block<Header, UncheckedExtrinsic>;1042/// A Block signed with a Justification1043pub type SignedBlock = generic::SignedBlock<Block>;1044/// BlockId type as expected by this runtime.1045pub type BlockId = generic::BlockId<Block>;1046/// The SignedExtension to the basic transaction logic.1047pub type SignedExtra = (1048	frame_system::CheckSpecVersion<Runtime>,1049	// system::CheckTxVersion<Runtime>,1050	frame_system::CheckGenesis<Runtime>,1051	frame_system::CheckEra<Runtime>,1052	frame_system::CheckNonce<Runtime>,1053	frame_system::CheckWeight<Runtime>,1054	pallet_charge_transaction::ChargeTransactionPayment<Runtime>,1055	//pallet_contract_helpers::ContractHelpersExtension<Runtime>,1056);1057/// Unchecked extrinsic type as expected by this runtime.1058pub type UncheckedExtrinsic =1059	fp_self_contained::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;1060/// Extrinsic type that has already been checked.1061pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic<AccountId, Call, SignedExtra, H160>;1062/// Executive: handles dispatch to the various modules.1063pub type Executive = frame_executive::Executive<1064	Runtime,1065	Block,1066	frame_system::ChainContext<Runtime>,1067	Runtime,1068	AllPalletsReversedWithSystemFirst,1069>;10701071impl_opaque_keys! {1072	pub struct SessionKeys {1073		pub aura: Aura,1074	}1075}10761077impl fp_self_contained::SelfContainedCall for Call {1078	type SignedInfo = H160;10791080	fn is_self_contained(&self) -> bool {1081		match self {1082			Call::Ethereum(call) => call.is_self_contained(),1083			_ => false,1084		}1085	}10861087	fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {1088		match self {1089			Call::Ethereum(call) => call.check_self_contained(),1090			_ => None,1091		}1092	}10931094	fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {1095		match self {1096			Call::Ethereum(call) => call.validate_self_contained(info),1097			_ => None,1098		}1099	}11001101	fn pre_dispatch_self_contained(1102		&self,1103		info: &Self::SignedInfo,1104	) -> Option<Result<(), TransactionValidityError>> {1105		match self {1106			Call::Ethereum(call) => call.pre_dispatch_self_contained(info),1107			_ => None,1108		}1109	}11101111	fn apply_self_contained(1112		self,1113		info: Self::SignedInfo,1114	) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {1115		match self {1116			call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch(1117				Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)),1118			)),1119			_ => None,1120		}1121	}1122}11231124macro_rules! dispatch_unique_runtime {1125	($collection:ident.$method:ident($($name:ident),*)) => {{1126		use pallet_unique::dispatch::Dispatched;11271128		let collection = Dispatched::dispatch(<pallet_common::CollectionHandle<Runtime>>::try_get($collection)?);1129		let dispatch = collection.as_dyn();11301131		Ok(dispatch.$method($($name),*))1132	}};1133}11341135impl_common_runtime_apis!();11361137struct CheckInherents;11381139impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {1140	fn check_inherents(1141		block: &Block,1142		relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof,1143	) -> sp_inherents::CheckInherentsResult {1144		let relay_chain_slot = relay_state_proof1145			.read_slot()1146			.expect("Could not read the relay chain slot from the proof");11471148		let inherent_data =1149			cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration(1150				relay_chain_slot,1151				sp_std::time::Duration::from_secs(6),1152			)1153			.create_inherent_data()1154			.expect("Could not create the timestamp inherent data");11551156		inherent_data.check_extrinsics(block)1157	}1158}11591160cumulus_pallet_parachain_system::register_validate_block!(1161	Runtime = Runtime,1162	BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,1163	CheckInherents = CheckInherents,1164);