Lower all Assets / NFT deposits by 10x (#1332)

* lower all deposits by 10x

* undo rococo stuff

* Apply suggestions from code review

* update asset deposits

* align statemint deposit ratios

Co-authored-by: joepetrowski <joe@parity.io>
This commit is contained in:
Shawn Tabrizi
2022-06-14 13:13:11 -04:00
committed by GitHub
parent 5fc7d4be96
commit 11201950d2
7 changed files with 18 additions and 18 deletions
@@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS; pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
// map to 1/10 of what the kusama relay chain charges (v9020) // map to 1/100 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 10 constants::currency::deposit(items, bytes) / 100
} }
} }
@@ -210,7 +210,7 @@ impl pallet_transaction_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const AssetDeposit: Balance = UNITS; // 1 UNIT deposit to create asset pub const AssetDeposit: Balance = UNITS / 10; // 1 / 10 UNITS deposit to create asset
pub const AssetAccountDeposit: Balance = deposit(1, 16); pub const AssetAccountDeposit: Balance = deposit(1, 16);
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50; pub const AssetsStringLimit: u32 = 50;
@@ -507,8 +507,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class pub const CollectionDeposit: Balance = UNITS / 10; // 1 / 10 UNIT deposit to create asset class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance pub const ItemDeposit: Balance = UNITS / 1_000; // 1 / 1000 UNIT deposit to create asset instance
pub const KeyLimit: u32 = 32; // Max 32 bytes per key pub const KeyLimit: u32 = 32; // Max 32 bytes per key
pub const ValueLimit: u32 = 64; // Max 64 bytes per value pub const ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129); pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
@@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS; pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
// 1/10 of Polkadot v9010 // 1/100 of Polkadot v9010
constants::currency::deposit(items, bytes) / 10 constants::currency::deposit(items, bytes) / 100
} }
} }
@@ -240,7 +240,7 @@ impl pallet_transaction_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const AssetDeposit: Balance = 100 * DOLLARS; // 100 DOLLARS deposit to create asset pub const AssetDeposit: Balance = 10 * UNITS; // 10 UNITS deposit to create fungible asset class
pub const AssetAccountDeposit: Balance = deposit(1, 16); pub const AssetAccountDeposit: Balance = deposit(1, 16);
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50; pub const AssetsStringLimit: u32 = 50;
@@ -537,8 +537,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class pub const CollectionDeposit: Balance = 10 * UNITS; // 10 UNIT deposit to create uniques class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance pub const ItemDeposit: Balance = UNITS / 100; // 1 / 100 UNIT deposit to create uniques instance
pub const KeyLimit: u32 = 32; // Max 32 bytes per key pub const KeyLimit: u32 = 32; // Max 32 bytes per key
pub const ValueLimit: u32 = 64; // Max 64 bytes per value pub const ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129); pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
@@ -26,8 +26,8 @@ pub mod currency {
pub const GRAND: Balance = constants::currency::GRAND; pub const GRAND: Balance = constants::currency::GRAND;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
// 1/10 of Westend testnet // 1/100 of Westend testnet
constants::currency::deposit(items, bytes) / 10 constants::currency::deposit(items, bytes) / 100
} }
} }
@@ -208,8 +208,8 @@ impl pallet_transaction_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const AssetDeposit: Balance = 1 * UNITS; // 1 WND deposit to create asset pub const AssetDeposit: Balance = UNITS / 10; // 1 / 10 WND deposit to create asset
pub const AssetAccountDeposit: Balance = 1 * UNITS; // 1 WND for an asset account pub const AssetAccountDeposit: Balance = deposit(1, 16);
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT; pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50; pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1) /// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
@@ -497,8 +497,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
} }
parameter_types! { parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class pub const CollectionDeposit: Balance = UNITS / 10; // 1 / 10 UNIT deposit to create asset class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance pub const ItemDeposit: Balance = UNITS / 1_000; // 1 / 1000 UNIT deposit to create asset instance
pub const KeyLimit: u32 = 32; // Max 32 bytes per key pub const KeyLimit: u32 = 32; // Max 32 bytes per key
pub const ValueLimit: u32 = 64; // Max 64 bytes per value pub const ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129); pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
@@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS; pub const MILLICENTS: Balance = constants::currency::MILLICENTS;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
// map to 1/10 of what the kusama relay chain charges (v9020) // map to 1/100 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 10 constants::currency::deposit(items, bytes) / 100
} }
} }