--- a/Cargo.lock +++ b/Cargo.lock @@ -6329,6 +6329,7 @@ name = "pallet-rmrk-core" version = "0.1.0" dependencies = [ + "derivative", "frame-benchmarking", "frame-support", "frame-system", --- a/pallets/proxy-rmrk-core/Cargo.toml +++ b/pallets/proxy-rmrk-core/Cargo.toml @@ -23,6 +23,7 @@ pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" } frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" } scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +derivative = { version = "2.2.0", features = ["use_core"] } [features] default = ["std"] --- a/pallets/proxy-rmrk-core/src/misc.rs +++ b/pallets/proxy-rmrk-core/src/misc.rs @@ -1,5 +1,6 @@ use super::*; use codec::{Encode, Decode}; +use derivative::Derivative; #[macro_export] macro_rules! map_common_err_to_proxy { @@ -49,9 +50,10 @@ } // todo remove default? -#[derive(Encode, Decode, PartialEq, Eq, Default)] +#[derive(Encode, Decode, PartialEq, Eq, Derivative)] +#[derivative(Default(bound=""))] pub enum NftType { - #[default] + #[derivative(Default)] Regular, Resource, FixedPart, @@ -60,9 +62,10 @@ } // todo remove default? -#[derive(Encode, Decode, PartialEq, Eq, Default)] +#[derive(Encode, Decode, PartialEq, Eq, Derivative)] +#[derivative(Default(bound=""))] pub enum ResourceType { - #[default] + #[derivative(Default)] Basic, Composable, Slot,