Skip to content

Commit

Permalink
Change Asset Class Creation Deposits (#259)
Browse files Browse the repository at this point in the history
Change the asset class creation deposits to use standard storage deposit
functionality.

Similar to #237
  • Loading branch information
joepetrowski authored Mar 28, 2024
1 parent e792ef7 commit 256059b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Update runtime weights [polkadot-fellows/runtimes#223](https://github.com/polkadot-fellows/runtimes/pull/223)
- Treasury Spend detects relative locations of the native asset ([polkadot-fellows/runtimes#233](https://github.com/polkadot-fellows/runtimes/pull/233))
- Increase consumer reference limits for Asset Hubs ([polkadot-fellows/runtimes#258](https://github.com/polkadot-fellows/runtimes/pull/258))
- Updated Asset Hub asset class creation deposit to use `system_para_deposit()` ([polkadot-fellows/runtimes#259](https://github.com/polkadot-fellows/runtimes/pull/259))

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use xcm::prelude::*;

pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;

use system_parachains_constants::kusama::currency::UNITS;
use system_parachains_constants::kusama::currency::*;

/// `AssetHubKusama` Runtime `Call` enum.
///
Expand Down Expand Up @@ -52,7 +52,7 @@ frame_support::parameter_types! {
pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into();

/// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub.
pub const CreateForeignAssetDeposit: u128 = UNITS / 10;
pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190);
}

fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec<Instruction<()>> {
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl pallet_transaction_payment::Config for Runtime {
}

parameter_types! {
pub const AssetDeposit: Balance = UNITS / 10; // 1 / 10 UNITS deposit to create asset
pub const AssetDeposit: Balance = system_para_deposit(1, 190);
pub const AssetAccountDeposit: Balance = system_para_deposit(1, 16);
pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use xcm::prelude::*;

pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;

use system_parachains_constants::polkadot::currency::UNITS;
use system_parachains_constants::polkadot::currency::*;

/// `AssetHubPolkadot` Runtime `Call` enum.
///
Expand Down Expand Up @@ -52,7 +52,7 @@ frame_support::parameter_types! {
pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into();

/// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub.
pub const CreateForeignAssetDeposit: u128 = 10 * UNITS;
pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190);
}

fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec<Instruction<()>> {
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl pallet_transaction_payment::Config for Runtime {
}

parameter_types! {
pub const AssetDeposit: Balance = 10 * UNITS; // 10 UNITS deposit to create fungible asset class
pub const AssetDeposit: Balance = system_para_deposit(1, 190);
pub const AssetAccountDeposit: Balance = system_para_deposit(1, 16);
pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
Expand Down

0 comments on commit 256059b

Please sign in to comment.