Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for #10382 (Insufficient asset quotes and deposits) #804

Merged
merged 13 commits into from
Dec 9, 2021
485 changes: 251 additions & 234 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions pallets/dmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ mod tests {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

thread_local! {
Expand Down
1 change: 1 addition & 0 deletions pallets/parachain-system/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
impl Config for Test {
type Event = Event;
Expand Down
1 change: 1 addition & 0 deletions pallets/xcmp-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Test>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions parachain-template/pallets/template/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl pallet_template::Config for Test {
Expand Down
1 change: 1 addition & 0 deletions parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions polkadot-parachains/parachains-common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ mod tests {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl pallet_balances::Config for Test {
Expand Down
3 changes: 3 additions & 0 deletions polkadot-parachains/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ impl frame_system::Config for Runtime {
type BlockLength = RuntimeBlockLength;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -465,6 +466,7 @@ impl cumulus_ping::Config for Runtime {

parameter_types! {
pub const AssetDeposit: Balance = 1 * ROC;
pub const AssetAccountDeposit: Balance = 1 * ROC;
pub const ApprovalDeposit: Balance = 100 * MILLIROC;
pub const AssetsStringLimit: u32 = 50;
pub const MetadataDepositBase: Balance = 1 * ROC;
Expand All @@ -491,6 +493,7 @@ impl pallet_assets::Config for Runtime {
type Freezer = ();
type Extra = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
}

impl pallet_aura::Config for Runtime {
Expand Down
1 change: 1 addition & 0 deletions polkadot-parachains/seedling/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl frame_system::Config for Runtime {
type BlockLength = RuntimeBlockLength;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl pallet_sudo::Config for Runtime {
Expand Down
1 change: 1 addition & 0 deletions polkadot-parachains/shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl frame_system::Config for Runtime {
type BlockLength = RuntimeBlockLength;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
3 changes: 3 additions & 0 deletions polkadot-parachains/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ impl frame_system::Config for Runtime {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -214,6 +215,7 @@ impl pallet_transaction_payment::Config for Runtime {

parameter_types! {
pub const AssetDeposit: Balance = UNITS; // 1 UNIT 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 @@ -241,6 +243,7 @@ impl pallet_assets::Config for Runtime {
type Freezer = ();
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
}

parameter_types! {
Expand Down
3 changes: 3 additions & 0 deletions polkadot-parachains/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ impl frame_system::Config for Runtime {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -226,6 +227,7 @@ impl pallet_transaction_payment::Config for Runtime {

parameter_types! {
pub const AssetDeposit: Balance = 100 * DOLLARS; // 100 DOLLARS 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 @@ -253,6 +255,7 @@ impl pallet_assets::Config for Runtime {
type Freezer = ();
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
}

parameter_types! {
Expand Down
3 changes: 3 additions & 0 deletions polkadot-parachains/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ impl frame_system::Config for Runtime {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -215,6 +216,7 @@ 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 ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
Expand All @@ -239,6 +241,7 @@ impl pallet_assets::Config for Runtime {
type Freezer = ();
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions test/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ impl frame_system::Config for Runtime {
type BlockLength = RuntimeBlockLength;
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down