Skip to content

Commit

Permalink
Adding new configs for pallet instances
Browse files Browse the repository at this point in the history
  • Loading branch information
darkforest0202 committed Oct 20, 2023
1 parent ed05ecb commit fe650fa
Show file tree
Hide file tree
Showing 12 changed files with 363 additions and 312 deletions.
155 changes: 81 additions & 74 deletions cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type CallbackHandle = ();
type AssetAccountDeposit = AssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
type MaxHolds = ConstU32<50>;
type RuntimeHoldReason = RuntimeHoldReason;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
Expand Down Expand Up @@ -323,6 +325,8 @@ impl pallet_assets::Config<PoolAssetsInstance> for Runtime {
type Extra = ();
type WeightInfo = weights::pallet_assets_pool::WeightInfo<Runtime>;
type CallbackHandle = ();
type MaxHolds = ConstU32<50>;
type RuntimeHoldReason = RuntimeHoldReason;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
Expand Down Expand Up @@ -397,6 +401,8 @@ impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type CallbackHandle = ();
type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
type MaxHolds = ConstU32<50>;
type RuntimeHoldReason = RuntimeHoldReason;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = xcm_config::XcmBenchmarkHelper;
}
Expand Down Expand Up @@ -480,97 +486,98 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Any => true,
ProxyType::NonTransfer => !matches!(
c,
RuntimeCall::Balances { .. } |
RuntimeCall::Assets { .. } |
RuntimeCall::NftFractionalization { .. } |
RuntimeCall::Nfts { .. } |
RuntimeCall::Uniques { .. }
RuntimeCall::Balances { .. }
| RuntimeCall::Assets { .. }
| RuntimeCall::NftFractionalization { .. }
| RuntimeCall::Nfts { .. }
| RuntimeCall::Uniques { .. }
),
ProxyType::CancelProxy => matches!(
c,
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
),
ProxyType::Assets => {
matches!(
c,
RuntimeCall::Assets { .. } |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. } |
RuntimeCall::NftFractionalization { .. } |
RuntimeCall::Nfts { .. } | RuntimeCall::Uniques { .. }
RuntimeCall::Assets { .. }
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
| RuntimeCall::NftFractionalization { .. }
| RuntimeCall::Nfts { .. }
| RuntimeCall::Uniques { .. }
)
},
ProxyType::AssetOwner => matches!(
c,
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::create { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::create { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::create { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. })
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
),
ProxyType::AssetManager => matches!(
c,
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::block { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::force_mint { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. }) |
RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::block { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. })
| RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::force_mint { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::mint { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::burn { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. })
| RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. })
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
),
ProxyType::Collator => matches!(
c,
RuntimeCall::CollatorSelection { .. } |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
RuntimeCall::CollatorSelection { .. }
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
),
}
}
Expand Down
Loading

0 comments on commit fe650fa

Please sign in to comment.