diff --git a/Cargo.lock b/Cargo.lock index d9daf37d..7e448650 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1183,7 +1183,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.22", "serde", "serde_json", "thiserror", @@ -3253,7 +3253,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "async-trait", "fp-storage", @@ -3265,7 +3265,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "async-trait", "fp-consensus", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "async-trait", "fc-api", @@ -3302,7 +3302,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fc-db", "fc-storage", @@ -3323,7 +3323,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -3377,7 +3377,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -3390,7 +3390,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -3545,7 +3545,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "hex", "impl-serde", @@ -3564,7 +3564,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "parity-scale-codec", @@ -3576,7 +3576,7 @@ dependencies = [ [[package]] name = "fp-dynamic-fee" version = "1.0.0" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "async-trait", "sp-core", @@ -3586,7 +3586,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -3599,7 +3599,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "evm", "frame-support", @@ -3615,7 +3615,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -3632,7 +3632,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "frame-support", "parity-scale-codec", @@ -3644,7 +3644,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "parity-scale-codec", "serde", @@ -7147,7 +7147,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "frame-support", @@ -7419,7 +7419,7 @@ dependencies = [ [[package]] name = "pallet-dynamic-fee" version = "4.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-dynamic-fee", "fp-evm", @@ -7568,7 +7568,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ethereum", "ethereum-types", @@ -7591,7 +7591,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "environmental", "evm", @@ -7617,7 +7617,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "frame-support", "frame-system", @@ -7651,7 +7651,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", ] @@ -7659,7 +7659,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "sp-core", @@ -7669,7 +7669,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "frame-support", @@ -7681,7 +7681,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "ed25519-dalek", "fp-evm", @@ -7690,7 +7690,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "num", @@ -7699,7 +7699,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "tiny-keccak", @@ -7708,7 +7708,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#eaa9d956bf7f6c4fd510451bf64980701e31d2cb" +source = "git+https://github.com/justinphamnz/frontier?branch=polkadot-v1.1.0#c6156ad7ca229552e9fb9df501e828c9d7d4da7e" dependencies = [ "fp-evm", "ripemd", @@ -11202,7 +11202,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.22", ] [[package]] @@ -12698,9 +12698,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index beeb950b..ff4288e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -223,7 +223,7 @@ fc-rpc-core = { git = "https://github.com/justinphamnz/frontier", branch = "polk fc-consensus = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0" } fc-mapping-sync = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0" } fc-db = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0" } -fp-self-contained = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0", default-features = false } +fp-self-contained = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0", default-features = false, features = ["serde"] } fp-rpc = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0", default-features = false } fp-evm = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0", default-features = false } pallet-evm = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0", default-features = false } diff --git a/pallets/estate/Cargo.toml b/pallets/estate/Cargo.toml index a70dd591..048dc48a 100644 --- a/pallets/estate/Cargo.toml +++ b/pallets/estate/Cargo.toml @@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, package = "parity-scale-codec" } -serde = { workspace = true, optional = true } +serde = { workspace = true } scale-info = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -50,7 +50,7 @@ default = ["std"] std = [ "codec/std", "log/std", - "serde", + "serde/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/estate/src/rate.rs b/pallets/estate/src/rate.rs index 747a7202..d986c0e1 100644 --- a/pallets/estate/src/rate.rs +++ b/pallets/estate/src/rate.rs @@ -17,7 +17,6 @@ use codec::{Decode, Encode}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{Perbill, RuntimeDebug}; @@ -72,8 +71,8 @@ pub fn round_issuance_range(config: MintingRateInfo) -> Range { } } -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, Default, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Clone, Copy, Encode, Decode, Default, RuntimeDebug, TypeInfo, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct Range { pub min: T, pub ideal: T, @@ -96,8 +95,8 @@ impl From for Range { } } -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Eq, PartialEq, Clone, Encode, Decode, Default, RuntimeDebug, TypeInfo)] +#[derive(Eq, PartialEq, Clone, Encode, Decode, Default, RuntimeDebug, TypeInfo, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct MintingRateInfo { /// Number of metaverse expectations pub expect: Range, diff --git a/primitives/metaverse/src/lib.rs b/primitives/metaverse/src/lib.rs index 8c4374a5..9df7a248 100644 --- a/primitives/metaverse/src/lib.rs +++ b/primitives/metaverse/src/lib.rs @@ -171,7 +171,21 @@ impl ItemId { } } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, MaxEncodedLen, PartialOrd, Ord, TypeInfo, Serialize, Deserialize)] +#[derive( + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + MaxEncodedLen, + PartialOrd, + Ord, + TypeInfo, + Serialize, + Deserialize, +)] #[serde(rename_all = "camelCase")] //#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum FungibleTokenId { diff --git a/traits/core-primitives/Cargo.toml b/traits/core-primitives/Cargo.toml index 27b4092b..60a0c37b 100644 --- a/traits/core-primitives/Cargo.toml +++ b/traits/core-primitives/Cargo.toml @@ -9,7 +9,7 @@ repository = 'https://github.com/bit-country' version = '2.0.0-rc6' [dependencies] -serde = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true } codec = { workspace = true, package = "parity-scale-codec" } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -20,7 +20,7 @@ scale-info = { workspace = true } [features] default = ['std'] std = [ - 'serde', + 'serde/std', 'primitives/std', 'codec/std', 'sp-runtime/std', diff --git a/traits/core-primitives/src/lib.rs b/traits/core-primitives/src/lib.rs index 5aa8b55d..547ff88f 100644 --- a/traits/core-primitives/src/lib.rs +++ b/traits/core-primitives/src/lib.rs @@ -2,7 +2,6 @@ use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{DispatchError, DispatchResult, Perbill, RuntimeDebug}; use sp_std::{collections::btree_map::BTreeMap, prelude::*, vec::Vec}; @@ -12,8 +11,7 @@ use primitives::{ ClassId, FungibleTokenId, GroupCollectionId, MetaverseId, UndeployedLandBlockId, UndeployedLandBlockType, }; -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo, Serialize, Deserialize)] pub enum TokenType { Transferable, BoundToAddress, @@ -31,8 +29,7 @@ impl Default for TokenType { } } -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, Serialize, Deserialize)] pub enum CollectionType { Collectable, Wearable, @@ -70,8 +67,7 @@ pub struct NftGroupCollectionData { pub properties: NftMetadata, } -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, Serialize, Deserialize)] pub struct NftClassData { // Minimum balance to create a collection of Asset pub deposit: Balance, @@ -84,8 +80,7 @@ pub struct NftClassData { pub total_minted_tokens: u32, } -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, Serialize, Deserialize)] pub struct NftClassDataV1 { // Minimum balance to create a collection of Asset pub deposit: Balance, @@ -96,8 +91,7 @@ pub struct NftClassDataV1 { pub royalty_fee: Perbill, } -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, Serialize, Deserialize)] pub struct NftAssetData { // Deposit balance to create each token pub deposit: Balance, @@ -105,8 +99,7 @@ pub struct NftAssetData { pub is_locked: bool, } -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo, Serialize, Deserialize)] pub struct NftAssetDataV1 { // Deposit balance to create each token pub deposit: Balance,