Skip to content

Commit

Permalink
Lower all Assets / NFT deposits by 10x (#1332)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
shawntabrizi and joepetrowski authored Jun 14, 2022
1 parent 5fc7d4b commit 1120195
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions parachains/runtimes/assets/statemine/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;

pub const fn deposit(items: u32, bytes: u32) -> Balance {
// map to 1/10 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 10
// map to 1/100 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 100
}
}

Expand Down
6 changes: 3 additions & 3 deletions parachains/runtimes/assets/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl pallet_transaction_payment::Config for Runtime {
}

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 ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50;
Expand Down Expand Up @@ -507,8 +507,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
}

parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance
pub const CollectionDeposit: Balance = UNITS / 10; // 1 / 10 UNIT deposit to create asset class
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 ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
Expand Down
4 changes: 2 additions & 2 deletions parachains/runtimes/assets/statemint/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;

pub const fn deposit(items: u32, bytes: u32) -> Balance {
// 1/10 of Polkadot v9010
constants::currency::deposit(items, bytes) / 10
// 1/100 of Polkadot v9010
constants::currency::deposit(items, bytes) / 100
}
}

Expand Down
6 changes: 3 additions & 3 deletions parachains/runtimes/assets/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl pallet_transaction_payment::Config for Runtime {
}

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 ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50;
Expand Down Expand Up @@ -537,8 +537,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
}

parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance
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 uniques instance
pub const KeyLimit: u32 = 32; // Max 32 bytes per key
pub const ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
Expand Down
4 changes: 2 additions & 2 deletions parachains/runtimes/assets/westmint/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub mod currency {
pub const GRAND: Balance = constants::currency::GRAND;

pub const fn deposit(items: u32, bytes: u32) -> Balance {
// 1/10 of Westend testnet
constants::currency::deposit(items, bytes) / 10
// 1/100 of Westend testnet
constants::currency::deposit(items, bytes) / 100
}
}

Expand Down
8 changes: 4 additions & 4 deletions parachains/runtimes/assets/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ impl pallet_transaction_payment::Config for Runtime {
}

parameter_types! {
pub const AssetDeposit: Balance = 1 * UNITS; // 1 WND deposit to create asset
pub const AssetAccountDeposit: Balance = 1 * UNITS; // 1 WND for an asset account
pub const AssetDeposit: Balance = UNITS / 10; // 1 / 10 WND deposit to create asset
pub const AssetAccountDeposit: Balance = deposit(1, 16);
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
Expand Down Expand Up @@ -497,8 +497,8 @@ impl pallet_asset_tx_payment::Config for Runtime {
}

parameter_types! {
pub const CollectionDeposit: Balance = UNITS; // 1 UNIT deposit to create asset class
pub const ItemDeposit: Balance = UNITS / 100; // 1/100 UNIT deposit to create asset instance
pub const CollectionDeposit: Balance = UNITS / 10; // 1 / 10 UNIT deposit to create asset class
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 ValueLimit: u32 = 64; // Max 64 bytes per value
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub mod currency {
pub const MILLICENTS: Balance = constants::currency::MILLICENTS;

pub const fn deposit(items: u32, bytes: u32) -> Balance {
// map to 1/10 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 10
// map to 1/100 of what the kusama relay chain charges (v9020)
constants::currency::deposit(items, bytes) / 100
}
}

Expand Down

0 comments on commit 1120195

Please sign in to comment.