difftreelog
feat common construct_runtime, rmrk feature
in: master
9 files changed
runtime/common/Cargo.tomldiffbeforeafterboth--- a/runtime/common/Cargo.toml
+++ b/runtime/common/Cargo.toml
@@ -32,8 +32,10 @@
'frame-support/runtime-benchmarks',
'frame-system/runtime-benchmarks',
]
+
+opal-runtime = []
+quartz-runtime = []
unique-runtime = []
-quartz-runtime = []
refungible = []
runtime/common/src/lib.rsdiffbeforeafterboth--- a/runtime/common/src/lib.rs
+++ b/runtime/common/src/lib.rs
@@ -23,3 +23,4 @@
pub mod sponsoring;
pub mod types;
pub mod weights;
+pub mod construct_runtime;
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -154,6 +154,191 @@
}
}
+ impl rmrk_rpc::RmrkApi<
+ Block,
+ AccountId,
+ RmrkCollectionInfo<AccountId>,
+ RmrkInstanceInfo<AccountId>,
+ RmrkResourceInfo,
+ RmrkPropertyInfo,
+ RmrkBaseInfo<AccountId>,
+ RmrkPartType,
+ RmrkTheme
+ > for Runtime {
+ fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::last_collection_idx::<Runtime>();
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default());
+ }
+
+ fn collection_by_id(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId
+ ) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::collection_by_id::<Runtime>(collection_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn nft_by_id(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ nft_by_id: RmrkNftId
+ ) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::nft_by_id::<Runtime>(collection_id, nft_by_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn account_tokens(
+ #[allow(unused_variables)]
+ account_id: AccountId,
+
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId
+ ) -> Result<Vec<RmrkNftId>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::account_tokens::<Runtime>(account_id, collection_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn nft_children(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ nft_id: RmrkNftId
+ ) -> Result<Vec<RmrkNftChild>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::nft_children::<Runtime>(collection_id, nft_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn collection_properties(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ filter_keys: Option<Vec<RmrkPropertyKey>>
+ ) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::collection_properties::<Runtime>(collection_id, filter_keys);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn nft_properties(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ nft_id: RmrkNftId,
+
+ #[allow(unused_variables)]
+ filter_keys: Option<Vec<RmrkPropertyKey>>
+ ) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::nft_properties::<Runtime>(collection_id, nft_id, filter_keys);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn nft_resources(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ nft_id: RmrkNftId
+ ) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::nft_resources::<Runtime>(collection_id, nft_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn nft_resource_priority(
+ #[allow(unused_variables)]
+ collection_id: RmrkCollectionId,
+
+ #[allow(unused_variables)]
+ nft_id: RmrkNftId,
+
+ #[allow(unused_variables)]
+ resource_id: RmrkResourceId
+ ) -> Result<Option<u32>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_core::rpc::nft_resource_priority::<Runtime>(collection_id, nft_id, resource_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn base(
+ #[allow(unused_variables)]
+ base_id: RmrkBaseId
+ ) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_equip::rpc::base::<Runtime>(base_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn base_parts(
+ #[allow(unused_variables)]
+ base_id: RmrkBaseId
+ ) -> Result<Vec<RmrkPartType>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_equip::rpc::base_parts::<Runtime>(base_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+
+ fn theme_names(
+ #[allow(unused_variables)]
+ base_id: RmrkBaseId
+ ) -> Result<Vec<RmrkThemeName>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_equip::rpc::theme_names::<Runtime>(base_id);
+
+ #[cfg(not(feature = "rmrk"))]
+ Ok(Default::default())
+ }
+
+ fn theme(
+ #[allow(unused_variables)]
+ base_id: RmrkBaseId,
+
+ #[allow(unused_variables)]
+ theme_name: RmrkThemeName,
+
+ #[allow(unused_variables)]
+ filter_keys: Option<Vec<RmrkPropertyKey>>
+ ) -> Result<Option<RmrkTheme>, DispatchError> {
+ #[cfg(feature = "rmrk")]
+ return pallet_proxy_rmrk_equip::rpc::theme::<Runtime>(base_id, theme_name, filter_keys);
+
+ #[cfg(not(feature = "rmrk"))]
+ return Ok(Default::default())
+ }
+ }
+
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
runtime/opal/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.24'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'new-functionality']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-ethereum/runtime-benchmarks',27 'pallet-evm-migration/runtime-benchmarks',28 'pallet-evm-coder-substrate/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-timestamp/runtime-benchmarks',31 'pallet-common/runtime-benchmarks',32 'pallet-structure/runtime-benchmarks',33 'pallet-fungible/runtime-benchmarks',34 'pallet-refungible/runtime-benchmarks',35 'pallet-nonfungible/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-proxy-rmrk-equip/runtime-benchmarks',38 'pallet-unique/runtime-benchmarks',39 'pallet-inflation/runtime-benchmarks',40 'pallet-unique-scheduler/runtime-benchmarks',41 'pallet-xcm/runtime-benchmarks',42 'sp-runtime/runtime-benchmarks',43 'xcm-builder/runtime-benchmarks',44]45try-runtime = [46 'frame-try-runtime',47 'frame-executive/try-runtime',48 'frame-system/try-runtime',49]50std = [51 'codec/std',52 'cumulus-pallet-aura-ext/std',53 'cumulus-pallet-parachain-system/std',54 'cumulus-pallet-xcm/std',55 'cumulus-pallet-xcmp-queue/std',56 'cumulus-primitives-core/std',57 'cumulus-primitives-utility/std',58 'frame-try-runtime/std',59 'frame-executive/std',60 'frame-support/std',61 'frame-system/std',62 'frame-system-rpc-runtime-api/std',63 'pallet-aura/std',64 'pallet-balances/std',65 # 'pallet-contracts/std',66 # 'pallet-contracts-primitives/std',67 # 'pallet-contracts-rpc-runtime-api/std',68 # 'pallet-contract-helpers/std',69 'pallet-randomness-collective-flip/std',70 'pallet-sudo/std',71 'pallet-timestamp/std',72 'pallet-transaction-payment/std',73 'pallet-transaction-payment-rpc-runtime-api/std',74 'pallet-treasury/std',75 # 'pallet-vesting/std',76 'pallet-evm/std',77 'pallet-evm-migration/std',78 'pallet-evm-contract-helpers/std',79 'pallet-evm-transaction-payment/std',80 'pallet-evm-coder-substrate/std',81 'pallet-ethereum/std',82 'pallet-base-fee/std',83 'fp-rpc/std',84 'up-rpc/std',85 'fp-evm-mapping/std',86 'fp-self-contained/std',87 'parachain-info/std',88 'serde',89 'pallet-inflation/std',90 'pallet-common/std',91 'pallet-structure/std',92 'pallet-fungible/std',93 'pallet-refungible/std',94 'pallet-nonfungible/std',95 'pallet-proxy-rmrk-core/std',96 'pallet-proxy-rmrk-equip/std',97 'pallet-unique/std',98 'pallet-unique-scheduler/std',99 'pallet-charge-transaction/std',100 'up-data-structs/std',101 'sp-api/std',102 'sp-block-builder/std',103 "sp-consensus-aura/std",104 'sp-core/std',105 'sp-inherents/std',106 'sp-io/std',107 'sp-offchain/std',108 'sp-runtime/std',109 'sp-session/std',110 'sp-std/std',111 'sp-transaction-pool/std',112 'sp-version/std',113 'xcm/std',114 'xcm-builder/std',115 'xcm-executor/std',116 'unique-runtime-common/std',117 'rmrk-rpc/std',118119 "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122new-functionality = [123 'unique-runtime-common/refungible',124]125126################################################################################127# Substrate Dependencies128129[dependencies.codec]130default-features = false131features = ['derive']132package = 'parity-scale-codec'133version = '3.1.2'134135[dependencies.frame-benchmarking]136default-features = false137git = "https://github.com/paritytech/substrate"138optional = true139branch = "polkadot-v0.9.24"140141[dependencies.frame-try-runtime]142default-features = false143git = 'https://github.com/paritytech/substrate'144optional = true145branch = 'polkadot-v0.9.24'146147[dependencies.frame-executive]148default-features = false149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.24"151152[dependencies.frame-support]153default-features = false154git = "https://github.com/paritytech/substrate"155branch = "polkadot-v0.9.24"156157[dependencies.frame-system]158default-features = false159git = "https://github.com/paritytech/substrate"160branch = "polkadot-v0.9.24"161162[dependencies.frame-system-benchmarking]163default-features = false164git = "https://github.com/paritytech/substrate"165optional = true166branch = "polkadot-v0.9.24"167168[dependencies.frame-system-rpc-runtime-api]169default-features = false170git = "https://github.com/paritytech/substrate"171branch = "polkadot-v0.9.24"172173[dependencies.hex-literal]174optional = true175version = '0.3.3'176177[dependencies.serde]178default-features = false179features = ['derive']180optional = true181version = '1.0.130'182183[dependencies.pallet-aura]184default-features = false185git = "https://github.com/paritytech/substrate"186branch = "polkadot-v0.9.24"187188[dependencies.pallet-balances]189default-features = false190git = "https://github.com/paritytech/substrate"191branch = "polkadot-v0.9.24"192193# Contracts specific packages194# [dependencies.pallet-contracts]195# git = 'https://github.com/paritytech/substrate'196# default-features = false197# branch = 'master'198# version = '4.0.0-dev'199200# [dependencies.pallet-contracts-primitives]201# git = 'https://github.com/paritytech/substrate'202# default-features = false203# branch = 'master'204# version = '4.0.0-dev'205206# [dependencies.pallet-contracts-rpc-runtime-api]207# git = 'https://github.com/paritytech/substrate'208# default-features = false209# branch = 'master'210# version = '4.0.0-dev'211212[dependencies.pallet-randomness-collective-flip]213default-features = false214git = "https://github.com/paritytech/substrate"215branch = "polkadot-v0.9.24"216217[dependencies.pallet-sudo]218default-features = false219git = "https://github.com/paritytech/substrate"220branch = "polkadot-v0.9.24"221222[dependencies.pallet-timestamp]223default-features = false224git = "https://github.com/paritytech/substrate"225branch = "polkadot-v0.9.24"226227[dependencies.pallet-transaction-payment]228default-features = false229git = "https://github.com/paritytech/substrate"230branch = "polkadot-v0.9.24"231232[dependencies.pallet-transaction-payment-rpc-runtime-api]233default-features = false234git = "https://github.com/paritytech/substrate"235branch = "polkadot-v0.9.24"236237[dependencies.pallet-treasury]238default-features = false239git = "https://github.com/paritytech/substrate"240branch = "polkadot-v0.9.24"241242# [dependencies.pallet-vesting]243# default-features = false244# git = 'https://github.com/paritytech/substrate'245# branch = 'master'246247[dependencies.sp-arithmetic]248default-features = false249git = "https://github.com/paritytech/substrate"250branch = "polkadot-v0.9.24"251252[dependencies.sp-api]253default-features = false254git = "https://github.com/paritytech/substrate"255branch = "polkadot-v0.9.24"256257[dependencies.sp-block-builder]258default-features = false259git = "https://github.com/paritytech/substrate"260branch = "polkadot-v0.9.24"261262[dependencies.sp-core]263default-features = false264git = "https://github.com/paritytech/substrate"265branch = "polkadot-v0.9.24"266267[dependencies.sp-consensus-aura]268default-features = false269git = "https://github.com/paritytech/substrate"270branch = "polkadot-v0.9.24"271272[dependencies.sp-inherents]273default-features = false274git = "https://github.com/paritytech/substrate"275branch = "polkadot-v0.9.24"276277[dependencies.sp-io]278default-features = false279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.24"281282[dependencies.sp-offchain]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.24"286287[dependencies.sp-runtime]288default-features = false289git = "https://github.com/paritytech/substrate"290branch = "polkadot-v0.9.24"291292[dependencies.sp-session]293default-features = false294git = "https://github.com/paritytech/substrate"295branch = "polkadot-v0.9.24"296297[dependencies.sp-std]298default-features = false299git = "https://github.com/paritytech/substrate"300branch = "polkadot-v0.9.24"301302[dependencies.sp-transaction-pool]303default-features = false304git = "https://github.com/paritytech/substrate"305branch = "polkadot-v0.9.24"306307[dependencies.sp-version]308default-features = false309git = "https://github.com/paritytech/substrate"310branch = "polkadot-v0.9.24"311312[dependencies.smallvec]313version = '1.6.1'314315################################################################################316# Cumulus dependencies317318[dependencies.parachain-info]319default-features = false320git = "https://github.com/paritytech/cumulus"321branch = "polkadot-v0.9.24"322323[dependencies.cumulus-pallet-aura-ext]324git = "https://github.com/paritytech/cumulus"325branch = "polkadot-v0.9.24"326default-features = false327328[dependencies.cumulus-pallet-parachain-system]329git = "https://github.com/paritytech/cumulus"330branch = "polkadot-v0.9.24"331default-features = false332333[dependencies.cumulus-primitives-core]334git = "https://github.com/paritytech/cumulus"335branch = "polkadot-v0.9.24"336default-features = false337338[dependencies.cumulus-pallet-xcm]339git = "https://github.com/paritytech/cumulus"340branch = "polkadot-v0.9.24"341default-features = false342343[dependencies.cumulus-pallet-dmp-queue]344git = "https://github.com/paritytech/cumulus"345branch = "polkadot-v0.9.24"346default-features = false347348[dependencies.cumulus-pallet-xcmp-queue]349git = "https://github.com/paritytech/cumulus"350branch = "polkadot-v0.9.24"351default-features = false352353[dependencies.cumulus-primitives-utility]354git = "https://github.com/paritytech/cumulus"355branch = "polkadot-v0.9.24"356default-features = false357358[dependencies.cumulus-primitives-timestamp]359git = "https://github.com/paritytech/cumulus"360branch = "polkadot-v0.9.24"361default-features = false362363################################################################################364# Polkadot dependencies365366[dependencies.polkadot-parachain]367git = "https://github.com/paritytech/polkadot"368branch = "release-v0.9.24"369default-features = false370371[dependencies.xcm]372git = "https://github.com/paritytech/polkadot"373branch = "release-v0.9.24"374default-features = false375376[dependencies.xcm-builder]377git = "https://github.com/paritytech/polkadot"378branch = "release-v0.9.24"379default-features = false380381[dependencies.xcm-executor]382git = "https://github.com/paritytech/polkadot"383branch = "release-v0.9.24"384default-features = false385386[dependencies.pallet-xcm]387git = "https://github.com/paritytech/polkadot"388branch = "release-v0.9.24"389default-features = false390391[dependencies.orml-vesting]392git = "https://github.com/uniquenetwork/open-runtime-module-library"393branch = "unique-polkadot-v0.9.24"394version = "0.4.1-dev"395default-features = false396397################################################################################398# local dependencies399400[dependencies]401log = { version = "0.4.16", default-features = false }402unique-runtime-common = { path = "../common", default-features = false }403scale-info = { version = "2.0.1", default-features = false, features = [404 "derive",405] }406derivative = "2.2.0"407pallet-unique = { path = '../../pallets/unique', default-features = false }408up-rpc = { path = "../../primitives/rpc", default-features = false }409rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }410fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }411pallet-inflation = { path = '../../pallets/inflation', default-features = false }412up-data-structs = { path = '../../primitives/data-structs', default-features = false }413pallet-common = { default-features = false, path = "../../pallets/common" }414pallet-structure = { default-features = false, path = "../../pallets/structure" }415pallet-fungible = { default-features = false, path = "../../pallets/fungible" }416pallet-refungible = { default-features = false, path = "../../pallets/refungible" }417pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }418pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }419pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }420pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }421# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }422pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.24", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }423pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }424pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }425pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }426pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }427pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }428pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }431fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }432433################################################################################434# Build Dependencies435436[build-dependencies.substrate-wasm-builder]437git = "https://github.com/paritytech/substrate"438branch = "polkadot-v0.9.24"runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -54,7 +54,7 @@
OnMethodCall, Account as EVMAccount, FeeCalculator, GasWeightMapping,
};
pub use frame_support::{
- construct_runtime, match_types,
+ match_types,
dispatch::DispatchResult,
PalletId, parameter_types, StorageValue, ConsensusEngineId,
traits::{
@@ -130,6 +130,7 @@
//use xcm_executor::traits::MatchesFungible;
use unique_runtime_common::{
+ construct_runtime,
impl_common_runtime_apis,
types::*,
constants::*,
@@ -910,11 +911,13 @@
type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
}
+#[cfg(feature = "rmrk")]
impl pallet_proxy_rmrk_core::Config for Runtime {
type WeightInfo = pallet_proxy_rmrk_core::weights::SubstrateWeight<Self>;
type Event = Event;
}
+#[cfg(feature = "rmrk")]
impl pallet_proxy_rmrk_equip::Config for Runtime {
type WeightInfo = pallet_proxy_rmrk_equip::weights::SubstrateWeight<Self>;
type Event = Event;
@@ -1120,60 +1123,7 @@
type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
}
-construct_runtime!(
- pub enum Runtime where
- Block = Block,
- NodeBlock = opaque::Block,
- UncheckedExtrinsic = UncheckedExtrinsic
- {
- ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
- ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
-
- Aura: pallet_aura::{Pallet, Config<T>} = 22,
- AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,
-
- Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
- RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
- Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,
- TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,
- Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,
- Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,
- System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,
- Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,
- // Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,
- // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,
-
- // XCM helpers.
- XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
- PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
- CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
- DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
-
- // Unique Pallets
- Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
- Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
- // free = 63
- Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
- // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
- Common: pallet_common::{Pallet, Storage, Event<T>} = 66,
- Fungible: pallet_fungible::{Pallet, Storage} = 67,
- Refungible: pallet_refungible::{Pallet, Storage} = 68,
- Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,
- Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,
- RmrkCore: pallet_proxy_rmrk_core::{Pallet, Call, Storage, Event<T>} = 71,
- RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
-
- // Frontier
- EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
- Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
-
- EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,
- EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
- EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
- EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
- }
-);
+construct_runtime!();
pub struct TransactionConverter;
@@ -1309,73 +1259,7 @@
}};
}
-impl_common_runtime_apis! {
- #![custom_apis]
-
- impl rmrk_rpc::RmrkApi<
- Block,
- AccountId,
- RmrkCollectionInfo<AccountId>,
- RmrkInstanceInfo<AccountId>,
- RmrkResourceInfo,
- RmrkPropertyInfo,
- RmrkBaseInfo<AccountId>,
- RmrkPartType,
- RmrkTheme
- > for Runtime {
- fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {
- pallet_proxy_rmrk_core::rpc::last_collection_idx::<Runtime>()
- }
-
- fn collection_by_id(collection_id: RmrkCollectionId) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::collection_by_id::<Runtime>(collection_id)
- }
-
- fn nft_by_id(collection_id: RmrkCollectionId, nft_by_id: RmrkNftId) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::nft_by_id::<Runtime>(collection_id, nft_by_id)
- }
-
- fn account_tokens(account_id: AccountId, collection_id: RmrkCollectionId) -> Result<Vec<RmrkNftId>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::account_tokens::<Runtime>(account_id, collection_id)
- }
-
- fn nft_children(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkNftChild>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::nft_children::<Runtime>(collection_id, nft_id)
- }
-
- fn collection_properties(collection_id: RmrkCollectionId, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::collection_properties::<Runtime>(collection_id, filter_keys)
- }
-
- fn nft_properties(collection_id: RmrkCollectionId, nft_id: RmrkNftId, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::nft_properties::<Runtime>(collection_id, nft_id, filter_keys)
- }
-
- fn nft_resources(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::nft_resources::<Runtime>(collection_id, nft_id)
- }
-
- fn nft_resource_priority(collection_id: RmrkCollectionId, nft_id: RmrkNftId, resource_id: RmrkResourceId) -> Result<Option<u32>, DispatchError> {
- pallet_proxy_rmrk_core::rpc::nft_resource_priority::<Runtime>(collection_id, nft_id, resource_id)
- }
-
- fn base(base_id: RmrkBaseId) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {
- pallet_proxy_rmrk_equip::rpc::base::<Runtime>(base_id)
- }
-
- fn base_parts(base_id: RmrkBaseId) -> Result<Vec<RmrkPartType>, DispatchError> {
- pallet_proxy_rmrk_equip::rpc::base_parts::<Runtime>(base_id)
- }
-
- fn theme_names(base_id: RmrkBaseId) -> Result<Vec<RmrkThemeName>, DispatchError> {
- pallet_proxy_rmrk_equip::rpc::theme_names::<Runtime>(base_id)
- }
-
- fn theme(base_id: RmrkBaseId, theme_name: RmrkThemeName, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Option<RmrkTheme>, DispatchError> {
- pallet_proxy_rmrk_equip::rpc::theme::<Runtime>(base_id, theme_name, filter_keys)
- }
- }
-}
+impl_common_runtime_apis!();
struct CheckInherents;
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -16,7 +16,7 @@
targets = ['x86_64-unknown-linux-gnu']
[features]
-default = ['std', 'new-functionality']
+default = ['std', 'quartz-runtime']
runtime-benchmarks = [
'hex-literal',
'frame-benchmarking',
@@ -118,7 +118,9 @@
"orml-vesting/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-new-functionality = []
+quartz-runtime = []
+
+rmrk = []
################################################################################
# Substrate Dependencies
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -54,7 +54,7 @@
OnMethodCall, Account as EVMAccount, FeeCalculator, GasWeightMapping,
};
pub use frame_support::{
- construct_runtime, match_types,
+ match_types,
dispatch::DispatchResult,
PalletId, parameter_types, StorageValue, ConsensusEngineId,
traits::{
@@ -128,6 +128,7 @@
use xcm_executor::traits::{MatchesFungible, WeightTrader};
use unique_runtime_common::{
+ construct_runtime,
impl_common_runtime_apis,
types::*,
constants::*,
@@ -909,15 +910,17 @@
type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
}
-// impl pallet_proxy_rmrk_core::Config for Runtime {
-// type WeightInfo = pallet_proxy_rmrk_core::weights::SubstrateWeight<Self>;
-// type Event = Event;
-// }
+#[cfg(feature = "rmrk")]
+impl pallet_proxy_rmrk_core::Config for Runtime {
+ type WeightInfo = pallet_proxy_rmrk_core::weights::SubstrateWeight<Self>;
+ type Event = Event;
+}
-// impl pallet_proxy_rmrk_equip::Config for Runtime {
-// type WeightInfo = pallet_proxy_rmrk_equip::weights::SubstrateWeight<Self>;
-// type Event = Event;
-// }
+#[cfg(feature = "rmrk")]
+impl pallet_proxy_rmrk_equip::Config for Runtime {
+ type WeightInfo = pallet_proxy_rmrk_equip::weights::SubstrateWeight<Self>;
+ type Event = Event;
+}
impl pallet_unique::Config for Runtime {
type Event = Event;
@@ -1118,61 +1121,8 @@
type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
}
-construct_runtime!(
- pub enum Runtime where
- Block = Block,
- NodeBlock = opaque::Block,
- UncheckedExtrinsic = UncheckedExtrinsic
- {
- ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
- ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
-
- Aura: pallet_aura::{Pallet, Config<T>} = 22,
- AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,
-
- Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
- RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
- Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,
- TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,
- Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,
- Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,
- System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,
- Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,
- // Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,
- // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,
-
- // XCM helpers.
- XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
- PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
- CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
- DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
+construct_runtime!();
- // Unique Pallets
- Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
- Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- // Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
- // free = 63
- Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
- // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
- Common: pallet_common::{Pallet, Storage, Event<T>} = 66,
- Fungible: pallet_fungible::{Pallet, Storage} = 67,
- // Refungible: pallet_refungible::{Pallet, Storage} = 68,
- Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,
- Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,
- // RmrkCore: pallet_proxy_rmrk_core::{Pallet, Call, Storage, Event<T>} = 71,
- // RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
-
- // Frontier
- EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
- Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
-
- EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,
- EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
- EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
- EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
- }
-);
-
pub struct TransactionConverter;
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
@@ -1308,129 +1258,8 @@
Ok::<_, DispatchError>(dispatch.$method($($name),*))
}};
}
-
-impl_common_runtime_apis! {
- #![custom_apis]
- impl rmrk_rpc::RmrkApi<
- Block,
- AccountId,
- RmrkCollectionInfo<AccountId>,
- RmrkInstanceInfo<AccountId>,
- RmrkResourceInfo,
- RmrkPropertyInfo,
- RmrkBaseInfo<AccountId>,
- RmrkPartType,
- RmrkTheme
- > for Runtime {
-
- // fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::last_collection_idx::<Runtime>()
- // }
-
- // fn collection_by_id(collection_id: RmrkCollectionId) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::collection_by_id::<Runtime>(collection_id)
- // }
-
- // fn nft_by_id(collection_id: RmrkCollectionId, nft_by_id: RmrkNftId) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::nft_by_id::<Runtime>(collection_id, nft_by_id)
- // }
-
- // fn account_tokens(account_id: AccountId, collection_id: RmrkCollectionId) -> Result<Vec<RmrkNftId>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::account_tokens::<Runtime>(account_id, collection_id)
- // }
-
- // fn nft_children(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkNftChild>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::nft_children::<Runtime>(collection_id, nft_id)
- // }
-
- // fn collection_properties(collection_id: RmrkCollectionId, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::collection_properties::<Runtime>(collection_id, filter_keys)
- // }
-
- // fn nft_properties(collection_id: RmrkCollectionId, nft_id: RmrkNftId, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::nft_properties::<Runtime>(collection_id, nft_id, filter_keys)
- // }
-
- // fn nft_resources(collection_id: RmrkCollectionId, nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::nft_resources::<Runtime>(collection_id, nft_id)
- // }
-
- // fn nft_resource_priority(collection_id: RmrkCollectionId, nft_id: RmrkNftId, resource_id: RmrkResourceId) -> Result<Option<u32>, DispatchError> {
- // pallet_proxy_rmrk_core::rpc::nft_resource_priority::<Runtime>(collection_id, nft_id, resource_id)
- // }
-
- // fn base(base_id: RmrkBaseId) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {
- // pallet_proxy_rmrk_equip::rpc::base::<Runtime>(base_id)
- // }
-
- // fn base_parts(base_id: RmrkBaseId) -> Result<Vec<RmrkPartType>, DispatchError> {
- // pallet_proxy_rmrk_equip::rpc::base_parts::<Runtime>(base_id)
- // }
-
- // fn theme_names(base_id: RmrkBaseId) -> Result<Vec<RmrkThemeName>, DispatchError> {
- // pallet_proxy_rmrk_equip::rpc::theme_names::<Runtime>(base_id)
- // }
-
- // fn theme(base_id: RmrkBaseId, theme_name: RmrkThemeName, filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Option<RmrkTheme>, DispatchError> {
- // pallet_proxy_rmrk_equip::rpc::theme::<Runtime>(base_id, theme_name, filter_keys)
- // }
-
- fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {
- Ok(Default::default())
- }
-
- fn collection_by_id(_collection_id: RmrkCollectionId) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_by_id(_collection_id: RmrkCollectionId, _nft_by_id: RmrkNftId) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn account_tokens(_account_id: AccountId, _collection_id: RmrkCollectionId) -> Result<Vec<RmrkNftId>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_children(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId) -> Result<Vec<RmrkNftChild>, DispatchError> {
- Ok(Default::default())
- }
-
- fn collection_properties(_collection_id: RmrkCollectionId, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_properties(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_resources(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_resource_priority(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId, _resource_id: RmrkResourceId) -> Result<Option<u32>, DispatchError> {
- Ok(Default::default())
- }
-
- fn base(_base_id: RmrkBaseId) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn base_parts(_base_id: RmrkBaseId) -> Result<Vec<RmrkPartType>, DispatchError> {
- Ok(Default::default())
- }
-
- fn theme_names(_base_id: RmrkBaseId) -> Result<Vec<RmrkThemeName>, DispatchError> {
- Ok(Default::default())
- }
-
- fn theme(_base_id: RmrkBaseId, _theme_name: RmrkThemeName, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Option<RmrkTheme>, DispatchError> {
- Ok(Default::default())
- }
-
-
- }
-}
+impl_common_runtime_apis!();
struct CheckInherents;
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -16,7 +16,7 @@
targets = ['x86_64-unknown-linux-gnu']
[features]
-default = ['std', 'new-functionality']
+default = ['std', 'unique-runtime']
runtime-benchmarks = [
'hex-literal',
'frame-benchmarking',
@@ -119,7 +119,7 @@
"orml-vesting/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-new-functionality = []
+unique-runtime = []
################################################################################
# Substrate Dependencies
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -54,7 +54,7 @@
OnMethodCall, Account as EVMAccount, FeeCalculator, GasWeightMapping,
};
pub use frame_support::{
- construct_runtime, match_types,
+ match_types,
dispatch::DispatchResult,
PalletId, parameter_types, StorageValue, ConsensusEngineId,
traits::{
@@ -128,6 +128,7 @@
use xcm_executor::traits::{MatchesFungible, WeightTrader};
use unique_runtime_common::{
+ construct_runtime,
impl_common_runtime_apis,
types::*,
constants::*,
@@ -910,6 +911,18 @@
type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
}
+#[cfg(feature = "rmrk")]
+impl pallet_proxy_rmrk_core::Config for Runtime {
+ type WeightInfo = pallet_proxy_rmrk_core::weights::SubstrateWeight<Self>;
+ type Event = Event;
+}
+
+#[cfg(feature = "rmrk")]
+impl pallet_proxy_rmrk_equip::Config for Runtime {
+ type WeightInfo = pallet_proxy_rmrk_equip::weights::SubstrateWeight<Self>;
+ type Event = Event;
+}
+
impl pallet_unique::Config for Runtime {
type Event = Event;
type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;
@@ -1109,58 +1122,7 @@
type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
}
-construct_runtime!(
- pub enum Runtime where
- Block = Block,
- NodeBlock = opaque::Block,
- UncheckedExtrinsic = UncheckedExtrinsic
- {
- ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
- ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
-
- Aura: pallet_aura::{Pallet, Config<T>} = 22,
- AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,
-
- Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
- RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
- Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,
- TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,
- Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,
- Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,
- System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,
- Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,
- // Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,
- // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,
-
- // XCM helpers.
- XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
- PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
- CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
- DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
-
- // Unique Pallets
- Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
- Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- // Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
- // free = 63
- Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
- // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
- Common: pallet_common::{Pallet, Storage, Event<T>} = 66,
- Fungible: pallet_fungible::{Pallet, Storage} = 67,
- // Refungible: pallet_refungible::{Pallet, Storage} = 68,
- Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,
- Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,
-
- // Frontier
- EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
- Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
-
- EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,
- EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
- EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
- EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
- }
-);
+construct_runtime!();
pub struct TransactionConverter;
@@ -1297,73 +1259,7 @@
}};
}
-impl_common_runtime_apis! {
- #![custom_apis]
-
- impl rmrk_rpc::RmrkApi<
- Block,
- AccountId,
- RmrkCollectionInfo<AccountId>,
- RmrkInstanceInfo<AccountId>,
- RmrkResourceInfo,
- RmrkPropertyInfo,
- RmrkBaseInfo<AccountId>,
- RmrkPartType,
- RmrkTheme
- > for Runtime {
- fn last_collection_idx() -> Result<RmrkCollectionId, DispatchError> {
- Ok(Default::default())
- }
-
- fn collection_by_id(_collection_id: RmrkCollectionId) -> Result<Option<RmrkCollectionInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_by_id(_collection_id: RmrkCollectionId, _nft_by_id: RmrkNftId) -> Result<Option<RmrkInstanceInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn account_tokens(_account_id: AccountId, _collection_id: RmrkCollectionId) -> Result<Vec<RmrkNftId>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_children(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId) -> Result<Vec<RmrkNftChild>, DispatchError> {
- Ok(Default::default())
- }
-
- fn collection_properties(_collection_id: RmrkCollectionId, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_properties(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Vec<RmrkPropertyInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_resources(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId) -> Result<Vec<RmrkResourceInfo>, DispatchError> {
- Ok(Default::default())
- }
-
- fn nft_resource_priority(_collection_id: RmrkCollectionId, _nft_id: RmrkNftId, _resource_id: RmrkResourceId) -> Result<Option<u32>, DispatchError> {
- Ok(Default::default())
- }
-
- fn base(_base_id: RmrkBaseId) -> Result<Option<RmrkBaseInfo<AccountId>>, DispatchError> {
- Ok(Default::default())
- }
-
- fn base_parts(_base_id: RmrkBaseId) -> Result<Vec<RmrkPartType>, DispatchError> {
- Ok(Default::default())
- }
-
- fn theme_names(_base_id: RmrkBaseId) -> Result<Vec<RmrkThemeName>, DispatchError> {
- Ok(Default::default())
- }
-
- fn theme(_base_id: RmrkBaseId, _theme_name: RmrkThemeName, _filter_keys: Option<Vec<RmrkPropertyKey>>) -> Result<Option<RmrkTheme>, DispatchError> {
- Ok(Default::default())
- }
- }
-}
+impl_common_runtime_apis!();
struct CheckInherents;