Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: trust backed assets naming #81

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions runtime/devnet/src/assets_config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
deposit, AccountId, Assets, Balance, Balances, BlockNumber, Nfts, Runtime, RuntimeEvent,
RuntimeHoldReason, DAYS, EXISTENTIAL_DEPOSIT, UNIT,
deposit, AccountId, Balance, Balances, BlockNumber, Nfts, Runtime, RuntimeEvent,
RuntimeHoldReason, TrustBackedAssets, DAYS, EXISTENTIAL_DEPOSIT, UNIT,
};
use frame_support::{
parameter_types,
Expand Down Expand Up @@ -84,9 +84,9 @@ impl pallet_nft_fractionalization::Config for Runtime {
type StringLimit = AssetsStringLimit;
type NftCollectionId = <Self as pallet_nfts::Config>::CollectionId;
type NftId = <Self as pallet_nfts::Config>::ItemId;
type AssetBalance = <Self as pallet_assets::Config<TrustBackedAssets>>::Balance;
type AssetId = <Self as pallet_assets::Config<TrustBackedAssets>>::AssetId;
type Assets = Assets;
type AssetBalance = <Self as pallet_assets::Config<TrustBackedAssetsInstance>>::Balance;
type AssetId = <Self as pallet_assets::Config<TrustBackedAssetsInstance>>::AssetId;
type Assets = TrustBackedAssets;
type Nfts = Nfts;
type PalletId = NftFractionalizationPalletId;
type WeightInfo = pallet_nft_fractionalization::weights::SubstrateWeight<Self>;
Expand All @@ -95,9 +95,9 @@ impl pallet_nft_fractionalization::Config for Runtime {
type BenchmarkHelper = ();
}

pub type TrustBackedAssets = pallet_assets::Instance1;
pub type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssets>;
impl pallet_assets::Config<TrustBackedAssets> for Runtime {
pub type TrustBackedAssetsInstance = pallet_assets::Instance1;
pub type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = AssetIdForTrustBackedAssets;
Expand Down
2 changes: 1 addition & 1 deletion runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ construct_runtime!(
// Assets
Nfts: pallet_nfts = 50,
NftFractionalization: pallet_nft_fractionalization = 51,
Assets: pallet_assets::<Instance1> = 52,
TrustBackedAssets: pallet_assets::<Instance1> = 52,
}
);

Expand Down
44 changes: 23 additions & 21 deletions runtime/devnet/src/proxy_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::NonTransfer => !matches!(
c,
RuntimeCall::Balances { .. }
| RuntimeCall::Assets { .. }
| RuntimeCall::TrustBackedAssets { .. }
| RuntimeCall::Nfts { .. }
),
ProxyType::CancelProxy => matches!(
Expand All @@ -26,24 +26,26 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Assets => {
matches!(
c,
RuntimeCall::Assets { .. }
RuntimeCall::TrustBackedAssets { .. }
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
| RuntimeCall::Nfts { .. }
)
},
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::TrustBackedAssets(TrustBackedAssetsCall::create { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::start_destroy { .. })
| RuntimeCall::TrustBackedAssets(
TrustBackedAssetsCall::destroy_accounts { .. }
) | RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::destroy_approvals { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::finish_destroy { .. })
| RuntimeCall::TrustBackedAssets(
TrustBackedAssetsCall::transfer_ownership { .. }
) | RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_team { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_metadata { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::clear_metadata { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_min_balance { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::create { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. })
Expand All @@ -56,15 +58,15 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
),
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::TrustBackedAssets(TrustBackedAssetsCall::mint { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::burn { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::freeze { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::block { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::thaw { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::freeze_asset { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::thaw_asset { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::touch_other { .. })
| RuntimeCall::TrustBackedAssets(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 { .. })
Expand Down
16 changes: 8 additions & 8 deletions runtime/testnet/src/assets_config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
deposit, AccountId, Assets, Balance, Balances, BlockNumber, Nfts, Runtime, RuntimeEvent,
RuntimeHoldReason, DAYS, EXISTENTIAL_DEPOSIT, UNIT,
deposit, AccountId, Balance, Balances, BlockNumber, Nfts, Runtime, RuntimeEvent,
RuntimeHoldReason, TrustBackedAssets, DAYS, EXISTENTIAL_DEPOSIT, UNIT,
};
use frame_support::{
parameter_types,
Expand Down Expand Up @@ -84,9 +84,9 @@ impl pallet_nft_fractionalization::Config for Runtime {
type StringLimit = AssetsStringLimit;
type NftCollectionId = <Self as pallet_nfts::Config>::CollectionId;
type NftId = <Self as pallet_nfts::Config>::ItemId;
type AssetBalance = <Self as pallet_assets::Config<TrustBackedAssets>>::Balance;
type AssetId = <Self as pallet_assets::Config<TrustBackedAssets>>::AssetId;
type Assets = Assets;
type AssetBalance = <Self as pallet_assets::Config<TrustBackedAssetsInstance>>::Balance;
type AssetId = <Self as pallet_assets::Config<TrustBackedAssetsInstance>>::AssetId;
type Assets = TrustBackedAssets;
type Nfts = Nfts;
type PalletId = NftFractionalizationPalletId;
type WeightInfo = pallet_nft_fractionalization::weights::SubstrateWeight<Self>;
Expand All @@ -95,9 +95,9 @@ impl pallet_nft_fractionalization::Config for Runtime {
type BenchmarkHelper = ();
}

pub type TrustBackedAssets = pallet_assets::Instance1;
pub type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssets>;
impl pallet_assets::Config<TrustBackedAssets> for Runtime {
pub type TrustBackedAssetsInstance = pallet_assets::Instance1;
pub type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = AssetIdForTrustBackedAssets;
Expand Down
2 changes: 1 addition & 1 deletion runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ construct_runtime!(
// Assets
Nfts: pallet_nfts = 50,
NftFractionalization: pallet_nft_fractionalization = 51,
Assets: pallet_assets::<Instance1> = 52,
TrustBackedAssets: pallet_assets::<Instance1> = 52,
}
);

Expand Down
44 changes: 23 additions & 21 deletions runtime/testnet/src/proxy_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::NonTransfer => !matches!(
c,
RuntimeCall::Balances { .. }
| RuntimeCall::Assets { .. }
| RuntimeCall::TrustBackedAssets { .. }
| RuntimeCall::Nfts { .. }
),
ProxyType::CancelProxy => matches!(
Expand All @@ -26,24 +26,26 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Assets => {
matches!(
c,
RuntimeCall::Assets { .. }
RuntimeCall::TrustBackedAssets { .. }
| RuntimeCall::Utility { .. }
| RuntimeCall::Multisig { .. }
| RuntimeCall::Nfts { .. }
)
},
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::TrustBackedAssets(TrustBackedAssetsCall::create { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::start_destroy { .. })
| RuntimeCall::TrustBackedAssets(
TrustBackedAssetsCall::destroy_accounts { .. }
) | RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::destroy_approvals { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::finish_destroy { .. })
| RuntimeCall::TrustBackedAssets(
TrustBackedAssetsCall::transfer_ownership { .. }
) | RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_team { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_metadata { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::clear_metadata { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::set_min_balance { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::create { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. })
| RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. })
Expand All @@ -56,15 +58,15 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
),
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::TrustBackedAssets(TrustBackedAssetsCall::mint { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::burn { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::freeze { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::block { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::thaw { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::freeze_asset { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::thaw_asset { .. })
| RuntimeCall::TrustBackedAssets(TrustBackedAssetsCall::touch_other { .. })
| RuntimeCall::TrustBackedAssets(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 { .. })
Expand Down
Loading