From 42ae4df0cde551b7a8ba78bdf060e529cbc11ea3 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:25:31 +0100 Subject: [PATCH] units in line with Polkadot --- runtime/src/assets_config.rs | 10 +++++----- runtime/src/lib.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/runtime/src/assets_config.rs b/runtime/src/assets_config.rs index e16d72cc..1097e9f8 100644 --- a/runtime/src/assets_config.rs +++ b/runtime/src/assets_config.rs @@ -16,7 +16,7 @@ use sp_runtime::traits::Verify; pub type AssetsForceOrigin = EnsureRoot; parameter_types! { - pub const AssetDeposit: Balance = UNIT / 10; // 1 / 10 UNITS deposit to create asset + pub const AssetDeposit: Balance = 10 * UNIT; pub const AssetAccountDeposit: Balance = deposit(1, 16); pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const AssetsStringLimit: u32 = 50; @@ -28,8 +28,8 @@ parameter_types! { parameter_types! { pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled(); - pub const NftsCollectionDeposit: Balance = UNIT / 10; - pub const NftsItemDeposit: Balance = UNIT / 1_000; + pub const NftsCollectionDeposit: Balance = 10 * UNIT; + pub const NftsItemDeposit: Balance = UNIT / 100; pub const NftsMetadataDepositBase: Balance = deposit(1, 129); pub const NftsAttributeDepositBase: Balance = deposit(1, 0); pub const NftsDepositPerByte: Balance = deposit(0, 1); @@ -80,7 +80,7 @@ impl pallet_nft_fractionalization::Config for Runtime { type StringLimit = AssetsStringLimit; type NftCollectionId = ::CollectionId; type NftId = ::ItemId; - type AssetBalance = ::Balance; + type AssetBalance = >::Balance; type AssetId = >::AssetId; type Assets = Assets; type Nfts = Nfts; @@ -110,7 +110,7 @@ impl pallet_assets::Config for Runtime { type WeightInfo = pallet_assets::weights::SubstrateWeight; type CallbackHandle = (); type AssetAccountDeposit = AssetAccountDeposit; - type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; + type RemoveItemsLimit = ConstU32<1000>; #[cfg(feature = "runtime-benchmarks")] type BenchmarkHelper = (); } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 12e55cf9..45ba77b5 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -534,8 +534,8 @@ impl pallet_scheduler::Config for Runtime { parameter_types! { pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage); - pub const BaseDeposit: Balance = 1 * UNIT; - pub const ByteDeposit: Balance = UNIT / 100; + pub const PreimageBaseDeposit: Balance = deposit(2, 64); + pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { @@ -545,9 +545,9 @@ impl pallet_preimage::Config for Runtime { type ManagerOrigin = EnsureRoot; type Consideration = HoldConsideration< AccountId, - Balances, + PreimageBalances, PreimageHoldReason, - LinearStoragePrice, + LinearStoragePrice, >; } @@ -589,7 +589,7 @@ construct_runtime!( // Contracts Contracts: pallet_contracts = 40, - // Nfts + // Assets Nfts: pallet_nfts = 50, NftFractionalization: pallet_nft_fractionalization = 51, Assets: pallet_assets:: = 52,