Skip to content

Commit

Permalink
units in line with Polkadot
Browse files Browse the repository at this point in the history
  • Loading branch information
al3mart committed Feb 27, 2024
1 parent 222e894 commit 42ae4df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions runtime/src/assets_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use sp_runtime::traits::Verify;
pub type AssetsForceOrigin = EnsureRoot<AccountId>;

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;
Expand All @@ -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);
Expand Down Expand Up @@ -80,7 +80,7 @@ impl pallet_nft_fractionalization::Config for Runtime {
type StringLimit = AssetsStringLimit;
type NftCollectionId = <Self as pallet_nfts::Config>::CollectionId;
type NftId = <Self as pallet_nfts::Config>::ItemId;
type AssetBalance = <Self as pallet_balances::Config>::Balance;
type AssetBalance = <Self as pallet_assets::Config<TrustBackedAssets>>::Balance;
type AssetId = <Self as pallet_assets::Config<TrustBackedAssets>>::AssetId;
type Assets = Assets;
type Nfts = Nfts;
Expand Down Expand Up @@ -110,7 +110,7 @@ impl pallet_assets::Config<TrustBackedAssets> for Runtime {
type WeightInfo = pallet_assets::weights::SubstrateWeight<Self>;
type CallbackHandle = ();
type AssetAccountDeposit = AssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
type RemoveItemsLimit = ConstU32<1000>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
10 changes: 5 additions & 5 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -545,9 +545,9 @@ impl pallet_preimage::Config for Runtime {
type ManagerOrigin = EnsureRoot<AccountId>;
type Consideration = HoldConsideration<
AccountId,
Balances,
PreimageBalances,
PreimageHoldReason,
LinearStoragePrice<BaseDeposit, ByteDeposit, Balance>,
LinearStoragePrice<PreimageBaseDeposit, PreimageByteDeposit, Balance>,
>;
}

Expand Down Expand Up @@ -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::<Instance1> = 52,
Expand Down

0 comments on commit 42ae4df

Please sign in to comment.