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.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -16,7 +16,7 @@
targets = ['x86_64-unknown-linux-gnu']
[features]
-default = ['std', 'new-functionality']
+default = ['std', 'opal-runtime']
runtime-benchmarks = [
'hex-literal',
'frame-benchmarking',
@@ -119,9 +119,9 @@
"orml-vesting/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-new-functionality = [
- 'unique-runtime-common/refungible',
-]
+opal-runtime = ['rmrk']
+
+rmrk = []
################################################################################
# Substrate Dependencies
@@ -399,7 +399,7 @@
[dependencies]
log = { version = "0.4.16", default-features = false }
-unique-runtime-common = { path = "../common", default-features = false }
+unique-runtime-common = { path = "../common", default-features = false, features = ['refungible'] }
scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
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.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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 'up-data-structs/runtime-benchmarks',45]46try-runtime = [47 'frame-try-runtime',48 'frame-executive/try-runtime',49 'frame-system/try-runtime',50]51std = [52 'codec/std',53 'cumulus-pallet-aura-ext/std',54 'cumulus-pallet-parachain-system/std',55 'cumulus-pallet-xcm/std',56 'cumulus-pallet-xcmp-queue/std',57 'cumulus-primitives-core/std',58 'cumulus-primitives-utility/std',59 'frame-try-runtime/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system/std',63 'frame-system-rpc-runtime-api/std',64 'pallet-aura/std',65 'pallet-balances/std',66 # 'pallet-contracts/std',67 # 'pallet-contracts-primitives/std',68 # 'pallet-contracts-rpc-runtime-api/std',69 # 'pallet-contract-helpers/std',70 'pallet-randomness-collective-flip/std',71 'pallet-sudo/std',72 'pallet-timestamp/std',73 'pallet-transaction-payment/std',74 'pallet-transaction-payment-rpc-runtime-api/std',75 'pallet-treasury/std',76 # 'pallet-vesting/std',77 'pallet-evm/std',78 'pallet-evm-migration/std',79 'pallet-evm-contract-helpers/std',80 'pallet-evm-transaction-payment/std',81 'pallet-evm-coder-substrate/std',82 'pallet-ethereum/std',83 'pallet-base-fee/std',84 'fp-rpc/std',85 'up-rpc/std',86 'fp-evm-mapping/std',87 'fp-self-contained/std',88 'parachain-info/std',89 'serde',90 'pallet-inflation/std',91 'pallet-common/std',92 'pallet-structure/std',93 'pallet-fungible/std',94 'pallet-refungible/std',95 'pallet-nonfungible/std',96 'pallet-proxy-rmrk-core/std',97 'pallet-proxy-rmrk-equip/std',98 'pallet-unique/std',99 'pallet-unique-scheduler/std',100 'pallet-charge-transaction/std',101 'up-data-structs/std',102 'sp-api/std',103 'sp-block-builder/std',104 "sp-consensus-aura/std",105 'sp-core/std',106 'sp-inherents/std',107 'sp-io/std',108 'sp-offchain/std',109 'sp-runtime/std',110 'sp-session/std',111 'sp-std/std',112 'sp-transaction-pool/std',113 'sp-version/std',114 'xcm/std',115 'xcm-builder/std',116 'xcm-executor/std',117 'unique-runtime-common/std',118119 "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122new-functionality = []123124################################################################################125# Substrate Dependencies126127[dependencies.codec]128default-features = false129features = ['derive']130package = 'parity-scale-codec'131version = '3.1.2'132133[dependencies.frame-benchmarking]134default-features = false135git = "https://github.com/paritytech/substrate"136optional = true137branch = "polkadot-v0.9.24"138139[dependencies.frame-try-runtime]140default-features = false141git = 'https://github.com/paritytech/substrate'142optional = true143branch = 'polkadot-v0.9.24'144145[dependencies.frame-executive]146default-features = false147git = "https://github.com/paritytech/substrate"148branch = "polkadot-v0.9.24"149150[dependencies.frame-support]151default-features = false152git = "https://github.com/paritytech/substrate"153branch = "polkadot-v0.9.24"154155[dependencies.frame-system]156default-features = false157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.24"159160[dependencies.frame-system-benchmarking]161default-features = false162git = "https://github.com/paritytech/substrate"163optional = true164branch = "polkadot-v0.9.24"165166[dependencies.frame-system-rpc-runtime-api]167default-features = false168git = "https://github.com/paritytech/substrate"169branch = "polkadot-v0.9.24"170171[dependencies.hex-literal]172optional = true173version = '0.3.3'174175[dependencies.serde]176default-features = false177features = ['derive']178optional = true179version = '1.0.130'180181[dependencies.pallet-aura]182default-features = false183git = "https://github.com/paritytech/substrate"184branch = "polkadot-v0.9.24"185186[dependencies.pallet-balances]187default-features = false188git = "https://github.com/paritytech/substrate"189branch = "polkadot-v0.9.24"190191# Contracts specific packages192# [dependencies.pallet-contracts]193# git = 'https://github.com/paritytech/substrate'194# default-features = false195# branch = 'master'196# version = '4.0.0-dev'197198# [dependencies.pallet-contracts-primitives]199# git = 'https://github.com/paritytech/substrate'200# default-features = false201# branch = 'master'202# version = '4.0.0-dev'203204# [dependencies.pallet-contracts-rpc-runtime-api]205# git = 'https://github.com/paritytech/substrate'206# default-features = false207# branch = 'master'208# version = '4.0.0-dev'209210[dependencies.pallet-randomness-collective-flip]211default-features = false212git = "https://github.com/paritytech/substrate"213branch = "polkadot-v0.9.24"214215[dependencies.pallet-sudo]216default-features = false217git = "https://github.com/paritytech/substrate"218branch = "polkadot-v0.9.24"219220[dependencies.pallet-timestamp]221default-features = false222git = "https://github.com/paritytech/substrate"223branch = "polkadot-v0.9.24"224225[dependencies.pallet-transaction-payment]226default-features = false227git = "https://github.com/paritytech/substrate"228branch = "polkadot-v0.9.24"229230[dependencies.pallet-transaction-payment-rpc-runtime-api]231default-features = false232git = "https://github.com/paritytech/substrate"233branch = "polkadot-v0.9.24"234235[dependencies.pallet-treasury]236default-features = false237git = "https://github.com/paritytech/substrate"238branch = "polkadot-v0.9.24"239240# [dependencies.pallet-vesting]241# default-features = false242# git = 'https://github.com/paritytech/substrate'243# branch = 'master'244245[dependencies.sp-arithmetic]246default-features = false247git = "https://github.com/paritytech/substrate"248branch = "polkadot-v0.9.24"249250[dependencies.sp-api]251default-features = false252git = "https://github.com/paritytech/substrate"253branch = "polkadot-v0.9.24"254255[dependencies.sp-block-builder]256default-features = false257git = "https://github.com/paritytech/substrate"258branch = "polkadot-v0.9.24"259260[dependencies.sp-core]261default-features = false262git = "https://github.com/paritytech/substrate"263branch = "polkadot-v0.9.24"264265[dependencies.sp-consensus-aura]266default-features = false267git = "https://github.com/paritytech/substrate"268branch = "polkadot-v0.9.24"269270[dependencies.sp-inherents]271default-features = false272git = "https://github.com/paritytech/substrate"273branch = "polkadot-v0.9.24"274275[dependencies.sp-io]276default-features = false277git = "https://github.com/paritytech/substrate"278branch = "polkadot-v0.9.24"279280[dependencies.sp-offchain]281default-features = false282git = "https://github.com/paritytech/substrate"283branch = "polkadot-v0.9.24"284285[dependencies.sp-runtime]286default-features = false287git = "https://github.com/paritytech/substrate"288branch = "polkadot-v0.9.24"289290[dependencies.sp-session]291default-features = false292git = "https://github.com/paritytech/substrate"293branch = "polkadot-v0.9.24"294295[dependencies.sp-std]296default-features = false297git = "https://github.com/paritytech/substrate"298branch = "polkadot-v0.9.24"299300[dependencies.sp-transaction-pool]301default-features = false302git = "https://github.com/paritytech/substrate"303branch = "polkadot-v0.9.24"304305[dependencies.sp-version]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.24"309310[dependencies.smallvec]311version = '1.6.1'312313################################################################################314# Cumulus dependencies315316[dependencies.parachain-info]317default-features = false318git = "https://github.com/paritytech/cumulus"319branch = "polkadot-v0.9.24"320321[dependencies.cumulus-pallet-aura-ext]322git = "https://github.com/paritytech/cumulus"323branch = "polkadot-v0.9.24"324default-features = false325326[dependencies.cumulus-pallet-parachain-system]327git = "https://github.com/paritytech/cumulus"328branch = "polkadot-v0.9.24"329default-features = false330331[dependencies.cumulus-primitives-core]332git = "https://github.com/paritytech/cumulus"333branch = "polkadot-v0.9.24"334default-features = false335336[dependencies.cumulus-pallet-xcm]337git = "https://github.com/paritytech/cumulus"338branch = "polkadot-v0.9.24"339default-features = false340341[dependencies.cumulus-pallet-dmp-queue]342git = "https://github.com/paritytech/cumulus"343branch = "polkadot-v0.9.24"344default-features = false345346[dependencies.cumulus-pallet-xcmp-queue]347git = "https://github.com/paritytech/cumulus"348branch = "polkadot-v0.9.24"349default-features = false350351[dependencies.cumulus-primitives-utility]352git = "https://github.com/paritytech/cumulus"353branch = "polkadot-v0.9.24"354default-features = false355356[dependencies.cumulus-primitives-timestamp]357git = "https://github.com/paritytech/cumulus"358branch = "polkadot-v0.9.24"359default-features = false360361################################################################################362# Polkadot dependencies363364[dependencies.polkadot-parachain]365git = "https://github.com/paritytech/polkadot"366branch = "release-v0.9.24"367default-features = false368369[dependencies.xcm]370git = "https://github.com/paritytech/polkadot"371branch = "release-v0.9.24"372default-features = false373374[dependencies.xcm-builder]375git = "https://github.com/paritytech/polkadot"376branch = "release-v0.9.24"377default-features = false378379[dependencies.xcm-executor]380git = "https://github.com/paritytech/polkadot"381branch = "release-v0.9.24"382default-features = false383384[dependencies.pallet-xcm]385git = "https://github.com/paritytech/polkadot"386branch = "release-v0.9.24"387default-features = false388389[dependencies.orml-vesting]390git = "https://github.com/uniquenetwork/open-runtime-module-library"391branch = "unique-polkadot-v0.9.24"392version = "0.4.1-dev"393default-features = false394395################################################################################396# local dependencies397398[dependencies]399log = { version = "0.4.16", default-features = false }400unique-runtime-common = { path = "../common", default-features = false }401scale-info = { version = "2.0.1", default-features = false, features = [402 "derive",403] }404derivative = "2.2.0"405pallet-unique = { path = '../../pallets/unique', default-features = false }406up-rpc = { path = "../../primitives/rpc", default-features = false }407rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }408pallet-inflation = { path = '../../pallets/inflation', default-features = false }409up-data-structs = { path = '../../primitives/data-structs', default-features = false }410pallet-common = { default-features = false, path = "../../pallets/common" }411pallet-structure = { default-features = false, path = "../../pallets/structure" }412pallet-fungible = { default-features = false, path = "../../pallets/fungible" }413pallet-refungible = { default-features = false, path = "../../pallets/refungible" }414pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }415pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }416pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }417pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }418# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }419pallet-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" }420pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }421pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }422pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }423pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }424pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }425pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }426pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }427fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }428fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430431################################################################################432# Build Dependencies433434[build-dependencies.substrate-wasm-builder]435git = "https://github.com/paritytech/substrate"436branch = "polkadot-v0.9.24"1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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', 'unique-runtime']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 'up-data-structs/runtime-benchmarks',45]46try-runtime = [47 'frame-try-runtime',48 'frame-executive/try-runtime',49 'frame-system/try-runtime',50]51std = [52 'codec/std',53 'cumulus-pallet-aura-ext/std',54 'cumulus-pallet-parachain-system/std',55 'cumulus-pallet-xcm/std',56 'cumulus-pallet-xcmp-queue/std',57 'cumulus-primitives-core/std',58 'cumulus-primitives-utility/std',59 'frame-try-runtime/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system/std',63 'frame-system-rpc-runtime-api/std',64 'pallet-aura/std',65 'pallet-balances/std',66 # 'pallet-contracts/std',67 # 'pallet-contracts-primitives/std',68 # 'pallet-contracts-rpc-runtime-api/std',69 # 'pallet-contract-helpers/std',70 'pallet-randomness-collective-flip/std',71 'pallet-sudo/std',72 'pallet-timestamp/std',73 'pallet-transaction-payment/std',74 'pallet-transaction-payment-rpc-runtime-api/std',75 'pallet-treasury/std',76 # 'pallet-vesting/std',77 'pallet-evm/std',78 'pallet-evm-migration/std',79 'pallet-evm-contract-helpers/std',80 'pallet-evm-transaction-payment/std',81 'pallet-evm-coder-substrate/std',82 'pallet-ethereum/std',83 'pallet-base-fee/std',84 'fp-rpc/std',85 'up-rpc/std',86 'fp-evm-mapping/std',87 'fp-self-contained/std',88 'parachain-info/std',89 'serde',90 'pallet-inflation/std',91 'pallet-common/std',92 'pallet-structure/std',93 'pallet-fungible/std',94 'pallet-refungible/std',95 'pallet-nonfungible/std',96 'pallet-proxy-rmrk-core/std',97 'pallet-proxy-rmrk-equip/std',98 'pallet-unique/std',99 'pallet-unique-scheduler/std',100 'pallet-charge-transaction/std',101 'up-data-structs/std',102 'sp-api/std',103 'sp-block-builder/std',104 "sp-consensus-aura/std",105 'sp-core/std',106 'sp-inherents/std',107 'sp-io/std',108 'sp-offchain/std',109 'sp-runtime/std',110 'sp-session/std',111 'sp-std/std',112 'sp-transaction-pool/std',113 'sp-version/std',114 'xcm/std',115 'xcm-builder/std',116 'xcm-executor/std',117 'unique-runtime-common/std',118119 "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122unique-runtime = []123124################################################################################125# Substrate Dependencies126127[dependencies.codec]128default-features = false129features = ['derive']130package = 'parity-scale-codec'131version = '3.1.2'132133[dependencies.frame-benchmarking]134default-features = false135git = "https://github.com/paritytech/substrate"136optional = true137branch = "polkadot-v0.9.24"138139[dependencies.frame-try-runtime]140default-features = false141git = 'https://github.com/paritytech/substrate'142optional = true143branch = 'polkadot-v0.9.24'144145[dependencies.frame-executive]146default-features = false147git = "https://github.com/paritytech/substrate"148branch = "polkadot-v0.9.24"149150[dependencies.frame-support]151default-features = false152git = "https://github.com/paritytech/substrate"153branch = "polkadot-v0.9.24"154155[dependencies.frame-system]156default-features = false157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.24"159160[dependencies.frame-system-benchmarking]161default-features = false162git = "https://github.com/paritytech/substrate"163optional = true164branch = "polkadot-v0.9.24"165166[dependencies.frame-system-rpc-runtime-api]167default-features = false168git = "https://github.com/paritytech/substrate"169branch = "polkadot-v0.9.24"170171[dependencies.hex-literal]172optional = true173version = '0.3.3'174175[dependencies.serde]176default-features = false177features = ['derive']178optional = true179version = '1.0.130'180181[dependencies.pallet-aura]182default-features = false183git = "https://github.com/paritytech/substrate"184branch = "polkadot-v0.9.24"185186[dependencies.pallet-balances]187default-features = false188git = "https://github.com/paritytech/substrate"189branch = "polkadot-v0.9.24"190191# Contracts specific packages192# [dependencies.pallet-contracts]193# git = 'https://github.com/paritytech/substrate'194# default-features = false195# branch = 'master'196# version = '4.0.0-dev'197198# [dependencies.pallet-contracts-primitives]199# git = 'https://github.com/paritytech/substrate'200# default-features = false201# branch = 'master'202# version = '4.0.0-dev'203204# [dependencies.pallet-contracts-rpc-runtime-api]205# git = 'https://github.com/paritytech/substrate'206# default-features = false207# branch = 'master'208# version = '4.0.0-dev'209210[dependencies.pallet-randomness-collective-flip]211default-features = false212git = "https://github.com/paritytech/substrate"213branch = "polkadot-v0.9.24"214215[dependencies.pallet-sudo]216default-features = false217git = "https://github.com/paritytech/substrate"218branch = "polkadot-v0.9.24"219220[dependencies.pallet-timestamp]221default-features = false222git = "https://github.com/paritytech/substrate"223branch = "polkadot-v0.9.24"224225[dependencies.pallet-transaction-payment]226default-features = false227git = "https://github.com/paritytech/substrate"228branch = "polkadot-v0.9.24"229230[dependencies.pallet-transaction-payment-rpc-runtime-api]231default-features = false232git = "https://github.com/paritytech/substrate"233branch = "polkadot-v0.9.24"234235[dependencies.pallet-treasury]236default-features = false237git = "https://github.com/paritytech/substrate"238branch = "polkadot-v0.9.24"239240# [dependencies.pallet-vesting]241# default-features = false242# git = 'https://github.com/paritytech/substrate'243# branch = 'master'244245[dependencies.sp-arithmetic]246default-features = false247git = "https://github.com/paritytech/substrate"248branch = "polkadot-v0.9.24"249250[dependencies.sp-api]251default-features = false252git = "https://github.com/paritytech/substrate"253branch = "polkadot-v0.9.24"254255[dependencies.sp-block-builder]256default-features = false257git = "https://github.com/paritytech/substrate"258branch = "polkadot-v0.9.24"259260[dependencies.sp-core]261default-features = false262git = "https://github.com/paritytech/substrate"263branch = "polkadot-v0.9.24"264265[dependencies.sp-consensus-aura]266default-features = false267git = "https://github.com/paritytech/substrate"268branch = "polkadot-v0.9.24"269270[dependencies.sp-inherents]271default-features = false272git = "https://github.com/paritytech/substrate"273branch = "polkadot-v0.9.24"274275[dependencies.sp-io]276default-features = false277git = "https://github.com/paritytech/substrate"278branch = "polkadot-v0.9.24"279280[dependencies.sp-offchain]281default-features = false282git = "https://github.com/paritytech/substrate"283branch = "polkadot-v0.9.24"284285[dependencies.sp-runtime]286default-features = false287git = "https://github.com/paritytech/substrate"288branch = "polkadot-v0.9.24"289290[dependencies.sp-session]291default-features = false292git = "https://github.com/paritytech/substrate"293branch = "polkadot-v0.9.24"294295[dependencies.sp-std]296default-features = false297git = "https://github.com/paritytech/substrate"298branch = "polkadot-v0.9.24"299300[dependencies.sp-transaction-pool]301default-features = false302git = "https://github.com/paritytech/substrate"303branch = "polkadot-v0.9.24"304305[dependencies.sp-version]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.24"309310[dependencies.smallvec]311version = '1.6.1'312313################################################################################314# Cumulus dependencies315316[dependencies.parachain-info]317default-features = false318git = "https://github.com/paritytech/cumulus"319branch = "polkadot-v0.9.24"320321[dependencies.cumulus-pallet-aura-ext]322git = "https://github.com/paritytech/cumulus"323branch = "polkadot-v0.9.24"324default-features = false325326[dependencies.cumulus-pallet-parachain-system]327git = "https://github.com/paritytech/cumulus"328branch = "polkadot-v0.9.24"329default-features = false330331[dependencies.cumulus-primitives-core]332git = "https://github.com/paritytech/cumulus"333branch = "polkadot-v0.9.24"334default-features = false335336[dependencies.cumulus-pallet-xcm]337git = "https://github.com/paritytech/cumulus"338branch = "polkadot-v0.9.24"339default-features = false340341[dependencies.cumulus-pallet-dmp-queue]342git = "https://github.com/paritytech/cumulus"343branch = "polkadot-v0.9.24"344default-features = false345346[dependencies.cumulus-pallet-xcmp-queue]347git = "https://github.com/paritytech/cumulus"348branch = "polkadot-v0.9.24"349default-features = false350351[dependencies.cumulus-primitives-utility]352git = "https://github.com/paritytech/cumulus"353branch = "polkadot-v0.9.24"354default-features = false355356[dependencies.cumulus-primitives-timestamp]357git = "https://github.com/paritytech/cumulus"358branch = "polkadot-v0.9.24"359default-features = false360361################################################################################362# Polkadot dependencies363364[dependencies.polkadot-parachain]365git = "https://github.com/paritytech/polkadot"366branch = "release-v0.9.24"367default-features = false368369[dependencies.xcm]370git = "https://github.com/paritytech/polkadot"371branch = "release-v0.9.24"372default-features = false373374[dependencies.xcm-builder]375git = "https://github.com/paritytech/polkadot"376branch = "release-v0.9.24"377default-features = false378379[dependencies.xcm-executor]380git = "https://github.com/paritytech/polkadot"381branch = "release-v0.9.24"382default-features = false383384[dependencies.pallet-xcm]385git = "https://github.com/paritytech/polkadot"386branch = "release-v0.9.24"387default-features = false388389[dependencies.orml-vesting]390git = "https://github.com/uniquenetwork/open-runtime-module-library"391branch = "unique-polkadot-v0.9.24"392version = "0.4.1-dev"393default-features = false394395################################################################################396# local dependencies397398[dependencies]399log = { version = "0.4.16", default-features = false }400unique-runtime-common = { path = "../common", default-features = false }401scale-info = { version = "2.0.1", default-features = false, features = [402 "derive",403] }404derivative = "2.2.0"405pallet-unique = { path = '../../pallets/unique', default-features = false }406up-rpc = { path = "../../primitives/rpc", default-features = false }407rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }408pallet-inflation = { path = '../../pallets/inflation', default-features = false }409up-data-structs = { path = '../../primitives/data-structs', default-features = false }410pallet-common = { default-features = false, path = "../../pallets/common" }411pallet-structure = { default-features = false, path = "../../pallets/structure" }412pallet-fungible = { default-features = false, path = "../../pallets/fungible" }413pallet-refungible = { default-features = false, path = "../../pallets/refungible" }414pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }415pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }416pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }417pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }418# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }419pallet-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" }420pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }421pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }422pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }423pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }424pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }425pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }426pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }427fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }428fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430431################################################################################432# Build Dependencies433434[build-dependencies.substrate-wasm-builder]435git = "https://github.com/paritytech/substrate"436branch = "polkadot-v0.9.24"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;