From 648d0a566e1b828d191806b7782d2abe7983afc3 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Jakabosky Date: Mon, 14 Oct 2024 23:41:10 +0800 Subject: [PATCH] Normalize AssetId (#1736) * Search/replace AssetID with AssetId. * Fix AssetId in Rust integration tests. --- integration/Cargo.lock | 24 +- integration/Cargo.toml | 4 +- integration/src/lib.rs | 4 +- pallets/asset/src/benchmarking.rs | 8 +- pallets/asset/src/checkpoint/benchmarking.rs | 2 +- pallets/asset/src/checkpoint/migrations.rs | 40 +-- pallets/asset/src/checkpoint/mod.rs | 74 ++--- pallets/asset/src/error.rs | 2 +- pallets/asset/src/lib.rs | 308 +++++++++--------- pallets/asset/src/migrations.rs | 82 ++--- pallets/common/src/benchs/asset.rs | 4 +- pallets/common/src/traits/asset.rs | 114 +++---- pallets/common/src/traits/checkpoint.rs | 14 +- .../common/src/traits/compliance_manager.rs | 44 +-- pallets/common/src/traits/external_agents.rs | 22 +- pallets/common/src/traits/nft.rs | 10 +- pallets/common/src/traits/portfolio.rs | 28 +- pallets/common/src/traits/settlement.rs | 18 +- pallets/common/src/traits/statistics.rs | 18 +- .../compliance-manager/src/benchmarking.rs | 10 +- pallets/compliance-manager/src/lib.rs | 60 ++-- pallets/compliance-manager/src/migrations.rs | 10 +- pallets/contracts/src/benchmarking.rs | 4 +- pallets/corporate-actions/src/benchmarking.rs | 10 +- .../src/distribution/benchmarking.rs | 4 +- .../corporate-actions/src/distribution/mod.rs | 10 +- pallets/corporate-actions/src/lib.rs | 70 ++-- pallets/corporate-actions/src/migrations.rs | 22 +- pallets/external-agents/src/benchmarking.rs | 8 +- pallets/external-agents/src/lib.rs | 88 ++--- pallets/external-agents/src/migrations.rs | 20 +- pallets/identity/src/benchmarking.rs | 4 +- pallets/identity/src/ticker_migrations.rs | 2 +- pallets/nft/src/benchmarking.rs | 6 +- pallets/nft/src/lib.rs | 38 +-- pallets/nft/src/migrations.rs | 18 +- pallets/portfolio/src/benchmarking.rs | 4 +- pallets/portfolio/src/lib.rs | 56 ++-- pallets/portfolio/src/migrations.rs | 20 +- pallets/runtime/common/src/runtime.rs | 8 +- .../runtime/tests/src/asset_metadata_test.rs | 4 +- .../src/asset_pallet/link_ticker_to_asset.rs | 10 +- .../runtime/tests/src/asset_pallet/setup.rs | 10 +- .../asset_pallet/unlink_ticker_from_asset.rs | 6 +- pallets/runtime/tests/src/asset_test.rs | 26 +- .../tests/src/compliance_manager_test.rs | 4 +- .../tests/src/corporate_actions_test.rs | 34 +- .../runtime/tests/src/external_agents_test.rs | 4 +- pallets/runtime/tests/src/identity_test.rs | 6 +- pallets/runtime/tests/src/nft.rs | 6 +- pallets/runtime/tests/src/portfolio.rs | 8 +- .../tests/src/settlement_pallet/setup.rs | 4 +- pallets/runtime/tests/src/settlement_test.rs | 36 +- pallets/runtime/tests/src/staking/mock.rs | 12 +- pallets/runtime/tests/src/sto_test.rs | 6 +- .../tests/src/transfer_compliance_test.rs | 4 +- pallets/settlement/src/benchmarking.rs | 2 +- pallets/settlement/src/lib.rs | 40 +-- pallets/settlement/src/migrations.rs | 8 +- pallets/statistics/src/benchmarking.rs | 14 +- pallets/statistics/src/lib.rs | 44 +-- pallets/statistics/src/migrations.rs | 8 +- pallets/sto/src/benchmarking.rs | 4 +- pallets/sto/src/lib.rs | 38 +-- pallets/sto/src/migrations.rs | 16 +- pallets/weights/src/pallet_asset.rs | 28 +- polymesh_schema.json | 28 +- primitives/src/asset.rs | 16 +- primitives/src/authorization.rs | 8 +- primitives/src/identity_claim.rs | 8 +- primitives/src/nft.rs | 22 +- primitives/src/portfolio.rs | 6 +- primitives/src/secondary_key.rs | 18 +- primitives/src/settlement.rs | 10 +- primitives/src/statistics.rs | 8 +- primitives/src/transfer_compliance.rs | 8 +- primitives/src/v6.rs | 4 +- rpc/runtime-api/src/asset.rs | 4 +- rpc/runtime-api/src/compliance.rs | 4 +- rpc/runtime-api/src/statistics.rs | 4 +- rpc/src/asset.rs | 6 +- rpc/src/compliance.rs | 6 +- .../cli/src/interfaces/augment-api-errors.ts | 12 +- .../cli/src/interfaces/augment-api-events.ts | 220 ++++++------- .../cli/src/interfaces/augment-api-query.ts | 208 ++++++------ scripts/cli/src/interfaces/augment-api-tx.ts | 220 ++++++------- scripts/cli/src/interfaces/augment-types.ts | 4 +- scripts/cli/src/interfaces/default/types.ts | 20 +- scripts/cli/src/interfaces/definitions.ts | 2 +- scripts/cli/src/interfaces/lookup.ts | 296 ++++++++--------- scripts/cli/src/interfaces/registry.ts | 6 +- scripts/cli/src/interfaces/types-lookup.ts | 300 ++++++++--------- 92 files changed, 1561 insertions(+), 1561 deletions(-) diff --git a/integration/Cargo.lock b/integration/Cargo.lock index 9537b5bb80..614916bde5 100644 --- a/integration/Cargo.lock +++ b/integration/Cargo.lock @@ -3046,9 +3046,9 @@ dependencies = [ [[package]] name = "polymesh-api" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdce6b09a38bb07125787b84ee439a47c933d3d6a6d0bd85ec393ae621c5aa7" +checksum = "7f1f1242aca2f9e4d29bd6369250769adbbb56d9797c66787a1c63fd54f666ce" dependencies = [ "async-trait", "ink", @@ -3098,9 +3098,9 @@ dependencies = [ [[package]] name = "polymesh-api-client-extras" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13e2fe3ae5d7de51554f5fa16290265f59841964ae5e75c1044458f38336b56" +checksum = "5ac514e14c057b5b35b12212662a597dfdea5c9d69652c946d20b178936268a2" dependencies = [ "parity-scale-codec", "polymesh-api", @@ -3111,9 +3111,9 @@ dependencies = [ [[package]] name = "polymesh-api-codegen" -version = "3.5.0" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6eb79825eef56917dc52430e1c301956a14b46d4a1320a7fd560784c0874fc" +checksum = "ca758383c09cdca43ca252a6ec24b0535f1262a34bb2648c26ac93712746e539" dependencies = [ "frame-metadata 15.1.0", "heck 0.4.1", @@ -3131,9 +3131,9 @@ dependencies = [ [[package]] name = "polymesh-api-codegen-macro" -version = "3.5.0" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d10f5f0de5c40af45dbea4f1f265666a32f2e5de4a989311bc01d56063545f4" +checksum = "50ed4f91e2639099ac0c62b84c5a157ad094375bef04ab5277b774360ead6106" dependencies = [ "darling 0.14.4", "parity-scale-codec", @@ -3146,9 +3146,9 @@ dependencies = [ [[package]] name = "polymesh-api-ink" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72de63407e8102a3c1b69f901bf45fefe036d566a58d95c0e2e32d3e27422e17" +checksum = "3d889e12cf9f93543654cfd8d1269f6ce76e64682e54e94c48b3265a1973a83e" dependencies = [ "hex", "ink", @@ -3161,9 +3161,9 @@ dependencies = [ [[package]] name = "polymesh-api-tester" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af978be051a1223c128105c021a74d6fd3e9091f6b4dbe302bc280fa3ac3a8be" +checksum = "1dfb4f4bcb95bb2a87c428752b390ef8f44901d47a2d6ee8a3eb3b44b42a19df" dependencies = [ "async-trait", "env_logger 0.9.3", diff --git a/integration/Cargo.toml b/integration/Cargo.toml index 7e4157bbe9..e1889e6073 100644 --- a/integration/Cargo.toml +++ b/integration/Cargo.toml @@ -27,5 +27,5 @@ sp-runtime = "29.0" sp-keyring = "29.0" sp-weights = "25.0" -polymesh-api = { version = "3.8.0", features = ["download_metadata"] } -polymesh-api-tester = { version = "0.7.1", default-features = false, features = ["download_metadata", "polymesh_v7"] } +polymesh-api = { version = "3.8.1", features = ["download_metadata"] } +polymesh-api-tester = { version = "0.7.3", default-features = false, features = ["download_metadata", "polymesh_v7"] } diff --git a/integration/src/lib.rs b/integration/src/lib.rs index 3d791558bc..ee685fab94 100644 --- a/integration/src/lib.rs +++ b/integration/src/lib.rs @@ -182,7 +182,7 @@ impl PalletPermissionsBuilder { #[derive(Clone, Default)] pub struct PermissionsBuilder { - asset: SubsetBuilder, + asset: SubsetBuilder, portfolio: SubsetBuilder, extrinsic: PalletPermissionsBuilder, } @@ -204,7 +204,7 @@ impl PermissionsBuilder { } } - pub fn set_asset(&mut self, assets: &[AssetID], these: bool) { + pub fn set_asset(&mut self, assets: &[AssetId], these: bool) { self.asset.set(assets, these); } diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 0f4236d346..e0f52ad524 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -99,7 +99,7 @@ fn set_ticker_registration_config() { } /// Creates a new [`AssetDetails`] considering the worst case scenario. -pub(crate) fn create_sample_asset(asset_owner: &User, divisible: bool) -> AssetID { +pub(crate) fn create_sample_asset(asset_owner: &User, divisible: bool) -> AssetId { let asset_name = AssetName::from(vec![b'N'; T::AssetNameMaxLength::get() as usize].as_slice()); let funding_round_name = FundingRoundName::from(vec![b'F'; T::FundingRoundNameMaxLength::get() as usize].as_slice()); @@ -120,7 +120,7 @@ pub(crate) fn create_sample_asset(asset_owner: &User, divisible: b asset_id } -pub(crate) fn create_and_issue_sample_asset(asset_owner: &User) -> AssetID { +pub(crate) fn create_and_issue_sample_asset(asset_owner: &User) -> AssetId { let asset_id = create_sample_asset::(asset_owner, true); Module::::issue( asset_owner.origin().into(), @@ -143,7 +143,7 @@ pub fn setup_asset_transfer( pause_compliance: bool, pause_restrictions: bool, n_mediators: u8, -) -> (PortfolioId, PortfolioId, Vec>, AssetID) +) -> (PortfolioId, PortfolioId, Vec>, AssetId) where T: Config + TestUtilsFn>, { @@ -217,7 +217,7 @@ pub fn create_portfolio(user: &User, portofolio_name: &str) -> Por /// Moves `amount` from the user's default portfolio to `destination_portfolio`. fn move_from_default_portfolio( user: &User, - asset_id: AssetID, + asset_id: AssetId, amount: Balance, destination_portfolio: PortfolioId, ) { diff --git a/pallets/asset/src/checkpoint/benchmarking.rs b/pallets/asset/src/checkpoint/benchmarking.rs index dfc7055fb0..5896cb9905 100644 --- a/pallets/asset/src/checkpoint/benchmarking.rs +++ b/pallets/asset/src/checkpoint/benchmarking.rs @@ -26,7 +26,7 @@ use crate::benchmarking::create_sample_asset; const CP_BASE: u64 = 2000; -fn init_with_existing(asset_owner: &User, existing: u64) -> AssetID { +fn init_with_existing(asset_owner: &User, existing: u64) -> AssetId { >::set(1000u32.into()); let asset_id = create_sample_asset::(&asset_owner, true); diff --git a/pallets/asset/src/checkpoint/migrations.rs b/pallets/asset/src/checkpoint/migrations.rs index bb919ce759..5c72779170 100644 --- a/pallets/asset/src/checkpoint/migrations.rs +++ b/pallets/asset/src/checkpoint/migrations.rs @@ -10,43 +10,43 @@ mod v1 { decl_storage! { trait Store for Module as Checkpoint { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldTotalSupply get(fn total_supply_at): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) CheckpointId => polymesh_primitives::Balance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldBalance get(fn balance_at_checkpoint): double_map hasher(blake2_128_concat) (Ticker, CheckpointId), hasher(twox_64_concat) IdentityId => polymesh_primitives::Balance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldCheckpointIdSequence get(fn checkpoint_id_sequence): map hasher(blake2_128_concat) Ticker => CheckpointId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldBalanceUpdates get(fn balance_updates): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) IdentityId => Vec; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldTimestamps get(fn timestamps): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) CheckpointId => Moment; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldScheduleIdSequence get(fn schedule_id_sequence): map hasher(blake2_128_concat) Ticker => ScheduleId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldCachedNextCheckpoints get(fn cached_next_checkpoints): map hasher(blake2_128_concat) Ticker => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldScheduledCheckpoints get(fn scheduled_checkpoints): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) ScheduleId => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldScheduleRefCount get(fn schedule_ref_count): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) ScheduleId => u32; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldSchedulePoints get(fn schedule_points): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) ScheduleId => Vec; } @@ -73,7 +73,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); TotalSupply::insert(asset_id, checkpoint_id, balance); }); log::info!("{:?} items migrated", count); @@ -85,7 +85,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); Balance::insert((asset_id, checkpoint_id), did, balance); }); log::info!("{:?} items migrated", count); @@ -100,7 +100,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CheckpointIdSequence::insert(asset_id, checkpoint_id); }); log::info!("{:?} items migrated", count); @@ -115,7 +115,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); BalanceUpdates::insert(asset_id, did, checkpoint_id); }); log::info!("{:?} items migrated", count); @@ -130,7 +130,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); Timestamps::insert(asset_id, checkpoint_id, when); }); log::info!("{:?} items migrated", count); @@ -145,7 +145,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); ScheduleIdSequence::insert(asset_id, schedule_id); }); log::info!("{:?} items migrated", count); @@ -160,7 +160,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CachedNextCheckpoints::insert(asset_id, next_checkpoint); }); log::info!("{:?} items migrated", count); @@ -175,7 +175,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); ScheduledCheckpoints::insert(asset_id, schedule_id, next_checkpoint); }); log::info!("{:?} items migrated", count); @@ -190,7 +190,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); ScheduleRefCount::insert(asset_id, schedule_id, ref_count); }); log::info!("{:?} items migrated", count); @@ -205,7 +205,7 @@ pub(crate) fn migrate_to_v2() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); SchedulePoints::insert(asset_id, schedule_id, checkpoint_id); }); log::info!("{:?} items migrated", count); diff --git a/pallets/asset/src/checkpoint/mod.rs b/pallets/asset/src/checkpoint/mod.rs index e7ac4346ea..1de1666c43 100644 --- a/pallets/asset/src/checkpoint/mod.rs +++ b/pallets/asset/src/checkpoint/mod.rs @@ -65,7 +65,7 @@ use polymesh_common_utilities::{ protocol_fee::{ChargeProtocolFee, ProtocolOp}, GC_DID, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ asset::CheckpointId, storage_migrate_on, storage_migration_ver, IdentityId, Moment, }; @@ -83,38 +83,38 @@ decl_storage! { /// Total supply of the token at the checkpoint. /// - /// ([`AssetID`], checkpointId) -> total supply at given checkpoint + /// ([`AssetId`], checkpointId) -> total supply at given checkpoint pub TotalSupply get(fn total_supply_at): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) CheckpointId => polymesh_primitives::Balance; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) CheckpointId => polymesh_primitives::Balance; /// Balance of a DID at a checkpoint. /// - /// ([`AssetID`], did, checkpoint ID) -> Balance of a DID at a checkpoint + /// ([`AssetId`], did, checkpoint ID) -> Balance of a DID at a checkpoint pub Balance get(fn balance_at_checkpoint): - double_map hasher(blake2_128_concat) (AssetID, CheckpointId), hasher(twox_64_concat) IdentityId => polymesh_primitives::Balance; + double_map hasher(blake2_128_concat) (AssetId, CheckpointId), hasher(twox_64_concat) IdentityId => polymesh_primitives::Balance; // ------------------------ Checkpoint storage ------------------------- /// Checkpoints ID generator sequence. /// ID of first checkpoint is 1 instead of 0. /// - /// ([`AssetID`]) -> no. of checkpoints + /// ([`AssetId`]) -> no. of checkpoints pub CheckpointIdSequence get(fn checkpoint_id_sequence): - map hasher(blake2_128_concat) AssetID => CheckpointId; + map hasher(blake2_128_concat) AssetId => CheckpointId; /// Checkpoints where a DID's balance was updated. - /// ([`AssetID`], did) -> [checkpoint ID where user balance changed] + /// ([`AssetId`], did) -> [checkpoint ID where user balance changed] pub BalanceUpdates get(fn balance_updates): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) IdentityId => Vec; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) IdentityId => Vec; /// Checkpoint timestamps. /// /// Every schedule-originated checkpoint maps its ID to its due time. /// Every checkpoint manually created maps its ID to the time of recording. /// - /// ([`AssetID`]) -> (checkpoint ID) -> checkpoint timestamp + /// ([`AssetId`]) -> (checkpoint ID) -> checkpoint timestamp pub Timestamps get(fn timestamps): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) CheckpointId => Moment; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) CheckpointId => Moment; // -------------------- Checkpoint Schedule storage -------------------- @@ -123,23 +123,23 @@ decl_storage! { /// Checkpoint schedule ID sequence for assets. /// - /// ([`AssetID`]) -> schedule ID + /// ([`AssetId`]) -> schedule ID pub ScheduleIdSequence get(fn schedule_id_sequence): - map hasher(blake2_128_concat) AssetID => ScheduleId; + map hasher(blake2_128_concat) AssetId => ScheduleId; /// Cached next checkpoint for each schedule. /// /// This is used to quickly find the next checkpoint from a asset's schedules. /// - /// ([`AssetID`]) -> next checkpoints + /// ([`AssetId`]) -> next checkpoints pub CachedNextCheckpoints get(fn cached_next_checkpoints): - map hasher(blake2_128_concat) AssetID => Option; + map hasher(blake2_128_concat) AssetId => Option; /// Scheduled checkpoints. /// - /// ([`AssetID`], schedule ID) -> schedule checkpoints + /// ([`AssetId`], schedule ID) -> schedule checkpoints pub ScheduledCheckpoints get(fn scheduled_checkpoints): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) ScheduleId => Option; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) ScheduleId => Option; /// How many "strong" references are there to a given `ScheduleId`? /// @@ -148,15 +148,15 @@ decl_storage! { /// Thus, as long as `strong_ref_count(schedule_id) > 0`, /// `remove_schedule(schedule_id)` will error. /// - /// ([`AssetID`], schedule ID) -> strong ref count + /// ([`AssetId`], schedule ID) -> strong ref count pub ScheduleRefCount get(fn schedule_ref_count): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) ScheduleId => u32; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) ScheduleId => u32; /// All the checkpoints a given schedule originated. /// - /// ([`AssetID`], schedule ID) -> [checkpoint ID] + /// ([`AssetId`], schedule ID) -> [checkpoint ID] pub SchedulePoints get(fn schedule_points): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) ScheduleId => Vec; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) ScheduleId => Vec; /// Storage version. StorageVersion get(fn storage_version) build(|_| Version::new(2)): Version; @@ -186,7 +186,7 @@ decl_module! { /// - `UnauthorizedAgent` if the DID of `origin` isn't a permissioned agent for `asset_id`. /// - `CounterOverflow` if the total checkpoint counter would overflow. #[weight = T::CPWeightInfo::create_checkpoint()] - pub fn create_checkpoint(origin, asset_id: AssetID) { + pub fn create_checkpoint(origin, asset_id: AssetId) { let caller_did = >::ensure_perms(origin, asset_id)?; Self::create_at_by(caller_did, asset_id, Self::now_unix())?; } @@ -227,7 +227,7 @@ decl_module! { #[weight = T::CPWeightInfo::create_schedule()] pub fn create_schedule( origin, - asset_id: AssetID, + asset_id: AssetId, schedule: ScheduleCheckpoints, ) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; @@ -252,7 +252,7 @@ decl_module! { #[weight = T::CPWeightInfo::remove_schedule()] pub fn remove_schedule( origin, - asset_id: AssetID, + asset_id: AssetId, id: ScheduleId, ) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; @@ -280,7 +280,7 @@ decl_error! { impl Module { /// Does checkpoint with ID `cp_id` exist for `asset_id`? - pub fn checkpoint_exists(asset_id: &AssetID, cp: CheckpointId) -> bool { + pub fn checkpoint_exists(asset_id: &AssetId, cp: CheckpointId) -> bool { cp > CheckpointId(0) && cp <= CheckpointIdSequence::get(asset_id) } @@ -294,7 +294,7 @@ impl Module { /// N.B. in case of `None`, you likely want the current balance instead. /// To compute that, use `Asset::get_balance_at(asset_id, did, cp)`, which calls into here. pub fn balance_at( - asset_id: AssetID, + asset_id: AssetId, did: IdentityId, cp: CheckpointId, ) -> Option { @@ -316,7 +316,7 @@ impl Module { /// Advances checkpoints for `asset_id`, /// and for each DID in `updates`, sets their balance to the one provided. pub fn advance_update_balances( - asset_id: &AssetID, + asset_id: &AssetId, updates: &[(IdentityId, polymesh_primitives::Balance)], ) -> DispatchResult { Self::advance_schedules(asset_id)?; @@ -329,7 +329,7 @@ impl Module { /// # Assumption /// /// * When minting, the total supply of `asset_id` is updated **after** this function is called. - fn update_balances(asset_id: &AssetID, updates: &[(IdentityId, polymesh_primitives::Balance)]) { + fn update_balances(asset_id: &AssetId, updates: &[(IdentityId, polymesh_primitives::Balance)]) { let last_cp = CheckpointIdSequence::get(asset_id); if last_cp < CheckpointId(1) { return; @@ -344,7 +344,7 @@ impl Module { } /// Advance all checkpoint schedules for `asset_id`. - fn advance_schedules(asset_id: &AssetID) -> DispatchResult { + fn advance_schedules(asset_id: &AssetId) -> DispatchResult { // Check if there are any pending checkpoints. let mut cached = match CachedNextCheckpoints::try_get(asset_id) { Ok(cached) => cached, @@ -416,7 +416,7 @@ impl Module { /// in the future at either a fixed time or at intervals. pub fn base_create_schedule( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, schedule: ScheduleCheckpoints, ref_count: u32, ) -> Result<(ScheduleId, Moment), DispatchError> { @@ -467,7 +467,7 @@ impl Module { pub fn base_remove_schedule( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, id: ScheduleId, ) -> DispatchResult { // Ensure that the schedule exists. @@ -503,7 +503,7 @@ impl Module { /// The ID of the new checkpoint is returned. fn create_at_by( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, at: Moment, ) -> Result { let id = try_next_pre::(&mut CheckpointIdSequence::get(asset_id))?; @@ -519,14 +519,14 @@ impl Module { /// Creating a checkpoint entails: /// - recording the total supply, /// - mapping the the ID to the `time`. - fn create_at(caller_did: Option, asset_id: AssetID, id: CheckpointId, at: Moment) { + fn create_at(caller_did: Option, asset_id: AssetId, id: CheckpointId, at: Moment) { // Record total supply at checkpoint ID. let supply = >::try_get_asset_details(&asset_id) .map(|t| t.total_supply) .unwrap_or_default(); TotalSupply::insert(asset_id, id, supply); - // Relate AssetID -> ID -> time. + // Relate AssetId -> ID -> time. Timestamps::insert(asset_id, id, at); // Emit event & we're done. @@ -536,18 +536,18 @@ impl Module { } /// Increment the schedule ref count. - pub fn inc_schedule_ref(asset_id: &AssetID, id: ScheduleId) { + pub fn inc_schedule_ref(asset_id: &AssetId, id: ScheduleId) { ScheduleRefCount::mutate(asset_id, id, |c| *c = c.saturating_add(1)); } /// Decrement the schedule ref count. - pub fn dec_schedule_ref(asset_id: &AssetID, id: ScheduleId) { + pub fn dec_schedule_ref(asset_id: &AssetId, id: ScheduleId) { ScheduleRefCount::mutate(asset_id, id, |c| *c = c.saturating_sub(1)); } /// Ensure the schedule exists and get the next checkpoint. pub fn ensure_schedule_next_checkpoint( - asset_id: &AssetID, + asset_id: &AssetId, id: ScheduleId, ) -> Result<(Moment, u64), DispatchError> { let schedule = diff --git a/pallets/asset/src/error.rs b/pallets/asset/src/error.rs index 416876379e..782aa4408f 100644 --- a/pallets/asset/src/error.rs +++ b/pallets/asset/src/error.rs @@ -97,7 +97,7 @@ decl_error! { /// The given ticker is already linked to an asset. TickerIsAlreadyLinkedToAnAsset, /// An unexpected error when generating a new asset ID. - AssetIDGenerationError, + AssetIdGenerationError, /// The ticker doesn't belong to the caller. TickerNotRegisteredToCaller, /// The given asset is already linked to a ticker. diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index da267a2843..613ab74bb6 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -109,7 +109,7 @@ pub use polymesh_common_utilities::traits::asset::{Config, Event, RawEvent, Weig use polymesh_common_utilities::traits::nft::NFTTrait; use polymesh_primitives::agent::AgentGroup; use polymesh_primitives::asset::{ - AssetID, AssetName, AssetType, CheckpointId, CustomAssetTypeId, FundingRoundName, + AssetId, AssetName, AssetType, CheckpointId, CustomAssetTypeId, FundingRoundName, }; use polymesh_primitives::asset_metadata::{ AssetMetadataGlobalKey, AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataName, @@ -142,15 +142,15 @@ decl_storage! { pub UniqueTickerRegistration get(fn unique_ticker_registration): map hasher(blake2_128_concat) Ticker => Option>; /// Returns [`TickerRegistrationConfig`] for assessing if a ticker is valid. pub TickerConfig get(fn ticker_registration_config) config(): TickerRegistrationConfig; - /// Maps each [`AssetID`] to its underling [`AssetDetails`]. - pub Assets get(fn assets_details): map hasher(blake2_128_concat) AssetID => Option; - /// Maps each [`AssetID`] to its underling [`AssetName`]. - pub AssetNames get(fn asset_names): map hasher(blake2_128_concat) AssetID => Option; - /// Tracks the total [`Balance`] for each [`AssetID`] per [`IdentityId`]. + /// Maps each [`AssetId`] to its underling [`AssetDetails`]. + pub Assets get(fn assets_details): map hasher(blake2_128_concat) AssetId => Option; + /// Maps each [`AssetId`] to its underling [`AssetName`]. + pub AssetNames get(fn asset_names): map hasher(blake2_128_concat) AssetId => Option; + /// Tracks the total [`Balance`] for each [`AssetId`] per [`IdentityId`]. // NB: It is safe to use `identity` hasher here because assets can not be distributed to non-existent identities. - pub BalanceOf get(fn balance_of): double_map hasher(blake2_128_concat) AssetID, hasher(identity) IdentityId => Balance; - /// Maps each [`AssetID`] to its asset identifiers ([`AssetIdentifier`]). - pub AssetIdentifiers get(fn asset_identifiers): map hasher(blake2_128_concat) AssetID => Vec; + pub BalanceOf get(fn balance_of): double_map hasher(blake2_128_concat) AssetId, hasher(identity) IdentityId => Balance; + /// Maps each [`AssetId`] to its asset identifiers ([`AssetIdentifier`]). + pub AssetIdentifiers get(fn asset_identifiers): map hasher(blake2_128_concat) AssetId => Vec; /// The next `AssetType::Custom` ID in the sequence. /// @@ -161,30 +161,30 @@ decl_storage! { /// Inverse map of `CustomTypes`, from registered string contents to custom asset type ids. pub CustomTypesInverse get(fn custom_types_inverse): map hasher(blake2_128_concat) Vec => Option; - /// Maps each [`AssetID`] to the name of its founding round ([`FundingRoundName`]). - pub FundingRound get(fn funding_round): map hasher(blake2_128_concat) AssetID => FundingRoundName; + /// Maps each [`AssetId`] to the name of its founding round ([`FundingRoundName`]). + pub FundingRound get(fn funding_round): map hasher(blake2_128_concat) AssetId => FundingRoundName; /// The total [`Balance`] of tokens issued in all recorded funding rounds ([`FundingRoundName`]). - pub IssuedInFundingRound get(fn issued_in_funding_round): map hasher(blake2_128_concat) (AssetID, FundingRoundName) => Balance; - /// Returns `true` if transfers for the token associated to [`AssetID`] are frozen. Otherwise, returns `false`. - pub Frozen get(fn frozen): map hasher(blake2_128_concat) AssetID => bool; + pub IssuedInFundingRound get(fn issued_in_funding_round): map hasher(blake2_128_concat) (AssetId, FundingRoundName) => Balance; + /// Returns `true` if transfers for the token associated to [`AssetId`] are frozen. Otherwise, returns `false`. + pub Frozen get(fn frozen): map hasher(blake2_128_concat) AssetId => bool; /// All [`Document`] attached to an asset. pub AssetDocuments get(fn asset_documents): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) DocumentId => Option; - /// [`DocumentId`] counter per [`AssetID`]. - pub AssetDocumentsIdSequence get(fn asset_documents_id_sequence): map hasher(blake2_128_concat) AssetID => DocumentId; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) DocumentId => Option; + /// [`DocumentId`] counter per [`AssetId`]. + pub AssetDocumentsIdSequence get(fn asset_documents_id_sequence): map hasher(blake2_128_concat) AssetId => DocumentId; /// Metatdata values for an asset. pub AssetMetadataValues get(fn asset_metadata_values): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) AssetMetadataKey => + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) AssetMetadataKey => Option; /// Details for an asset's Metadata values. pub AssetMetadataValueDetails get(fn asset_metadata_value_details): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) AssetMetadataKey => + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) AssetMetadataKey => Option>; /// Asset Metadata Local Name -> Key. pub AssetMetadataLocalNameToKey get(fn asset_metadata_local_name_to_key): - double_map hasher(blake2_128_concat) AssetID, hasher(blake2_128_concat) AssetMetadataName => + double_map hasher(blake2_128_concat) AssetId, hasher(blake2_128_concat) AssetMetadataName => Option; /// Asset Metadata Global Name -> Key. pub AssetMetadataGlobalNameToKey get(fn asset_metadata_global_name_to_key): @@ -192,7 +192,7 @@ decl_storage! { /// Asset Metadata Local Key -> Name. pub AssetMetadataLocalKeyToName get(fn asset_metadata_local_key_to_name): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) AssetMetadataLocalKey => + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) AssetMetadataLocalKey => Option; /// Asset Metadata Global Key -> Name. pub AssetMetadataGlobalKeyToName get(fn asset_metadata_global_key_to_name): @@ -200,7 +200,7 @@ decl_storage! { /// Asset Metadata Local Key specs. pub AssetMetadataLocalSpecs get(fn asset_metadata_local_specs): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) AssetMetadataLocalKey => + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) AssetMetadataLocalKey => Option; /// Asset Metadata Global Key specs. pub AssetMetadataGlobalSpecs get(fn asset_metadata_global_specs): @@ -208,19 +208,19 @@ decl_storage! { /// A list of assets that exempt all users from affirming its receivement. pub AssetsExemptFromAffirmation get(fn assets_exempt_from_affirmation): - map hasher(blake2_128_concat) AssetID => bool; + map hasher(blake2_128_concat) AssetId => bool; /// All assets that don't need an affirmation to be received by an identity. pub PreApprovedAsset get(fn pre_approved_asset): - double_map hasher(identity) IdentityId, hasher(blake2_128_concat) AssetID => bool; + double_map hasher(identity) IdentityId, hasher(blake2_128_concat) AssetId => bool; /// The list of mandatory mediators for every ticker. pub MandatoryMediators get(fn mandatory_mediators): - map hasher(blake2_128_concat) AssetID => BoundedBTreeSet; + map hasher(blake2_128_concat) AssetId => BoundedBTreeSet; - /// The last [`AssetMetadataLocalKey`] used for [`AssetID`]. + /// The last [`AssetMetadataLocalKey`] used for [`AssetId`]. pub CurrentAssetMetadataLocalKey get(fn current_asset_metadata_local_key): - map hasher(blake2_128_concat) AssetID => Option; + map hasher(blake2_128_concat) AssetId => Option; /// The last [`AssetMetadataGlobalKey`] used for a global key. pub CurrentAssetMetadataGlobalKey get(fn current_asset_metadata_global_key): Option; @@ -231,15 +231,15 @@ decl_storage! { /// All security tokens owned by a user. pub SecurityTokensOwnedByUser get(fn security_tokens_owned_by_user): - double_map hasher(identity) IdentityId, hasher(blake2_128_concat) AssetID => bool; + double_map hasher(identity) IdentityId, hasher(blake2_128_concat) AssetId => bool; - /// Maps all [`AssetID`] that are mapped to a [`Ticker`]. - pub AssetIDTicker get(fn asset_id_ticker): map hasher(blake2_128_concat) AssetID => Option; + /// Maps all [`AssetId`] that are mapped to a [`Ticker`]. + pub AssetIdTicker get(fn asset_id_ticker): map hasher(blake2_128_concat) AssetId => Option; - /// Maps all [`Ticker`] that are linked to an [`AssetID`]. - pub TickerAssetID get(fn ticker_asset_id): map hasher(blake2_128_concat) Ticker => Option; + /// Maps all [`Ticker`] that are linked to an [`AssetId`]. + pub TickerAssetId get(fn ticker_asset_id): map hasher(blake2_128_concat) Ticker => Option; - /// A per account nonce that is used for generating an [`AssetID`]. + /// A per account nonce that is used for generating an [`AssetId`]. pub AssetNonce: map hasher(identity) T::AccountId => u64; /// Storage version. @@ -374,12 +374,12 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::freeze()] - pub fn freeze(origin, asset_id: AssetID) -> DispatchResult { + pub fn freeze(origin, asset_id: AssetId) -> DispatchResult { Self::base_set_freeze(origin, asset_id, true) } @@ -387,12 +387,12 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::unfreeze()] - pub fn unfreeze(origin, asset_id: AssetID) -> DispatchResult { + pub fn unfreeze(origin, asset_id: AssetId) -> DispatchResult { Self::base_set_freeze(origin, asset_id, false) } @@ -400,13 +400,13 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `asset_name`: the [`AssetName`] that will be associated to the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::rename_asset(asset_name.len() as u32)] - pub fn rename_asset(origin, asset_id: AssetID, asset_name: AssetName) -> DispatchResult { + pub fn rename_asset(origin, asset_id: AssetId, asset_name: AssetName) -> DispatchResult { Self::base_rename_asset(origin, asset_id, asset_name) } @@ -414,7 +414,7 @@ decl_module! { /// /// # Arguments /// * `origin`: A signer that has permissions to act as an agent of `ticker`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `amount`: The amount of tokens that will be issued. /// * `portfolio_kind`: The [`PortfolioKind`] of the portfolio that will receive the minted tokens. /// @@ -422,7 +422,7 @@ decl_module! { /// * Asset /// * Portfolio #[weight = ::WeightInfo::issue()] - pub fn issue(origin, asset_id: AssetID, amount: Balance, portfolio_kind: PortfolioKind) -> DispatchResult { + pub fn issue(origin, asset_id: AssetId, amount: Balance, portfolio_kind: PortfolioKind) -> DispatchResult { Self::base_issue(origin, asset_id, amount, portfolio_kind) } @@ -430,7 +430,7 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `value`: amount of tokens to redeem. /// * `portfolio_kind`: the [`PortfolioKind`] that will have its balance reduced. /// @@ -438,7 +438,7 @@ decl_module! { /// * Asset /// * Portfolio #[weight = ::WeightInfo::redeem()] - pub fn redeem(origin, asset_id: AssetID, value: Balance, portfolio_kind: PortfolioKind) -> DispatchResult { + pub fn redeem(origin, asset_id: AssetId, value: Balance, portfolio_kind: PortfolioKind) -> DispatchResult { let mut weight_meter = WeightMeter::max_limit_no_minimum(); Self::base_redeem(origin, asset_id, value, portfolio_kind, &mut weight_meter) } @@ -447,12 +447,12 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `ticker`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::make_divisible()] - pub fn make_divisible(origin, asset_id: AssetID) -> DispatchResult { + pub fn make_divisible(origin, asset_id: AssetId) -> DispatchResult { Self::base_make_divisible(origin, asset_id) } @@ -460,13 +460,13 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `docs`: documents to be attached to the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::add_documents(docs.len() as u32)] - pub fn add_documents(origin, docs: Vec, asset_id: AssetID) -> DispatchResult { + pub fn add_documents(origin, docs: Vec, asset_id: AssetId) -> DispatchResult { Self::base_add_documents(origin, docs, asset_id) } @@ -474,13 +474,13 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `docs_id`: a vector of all [`DocumentId`] that will be removed from the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_documents(docs_id.len() as u32)] - pub fn remove_documents(origin, docs_id: Vec, asset_id: AssetID) -> DispatchResult { + pub fn remove_documents(origin, docs_id: Vec, asset_id: AssetId) -> DispatchResult { Self::base_remove_documents(origin, docs_id, asset_id) } @@ -488,13 +488,13 @@ decl_module! { /// /// # Arguments /// * `origin`: a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `founding_round_name`: the [`FoundingRoundName`] of the current funding round. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::set_funding_round(founding_round_name.len() as u32)] - pub fn set_funding_round(origin, asset_id: AssetID, founding_round_name: FundingRoundName) -> DispatchResult { + pub fn set_funding_round(origin, asset_id: AssetId, founding_round_name: FundingRoundName) -> DispatchResult { Self::base_set_funding_round(origin, asset_id, founding_round_name) } @@ -502,7 +502,7 @@ decl_module! { /// /// # Arguments /// * `origin`: a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `asset_identifiers`: a vector of [`AssetIdentifier`] that will be associated to the token. /// /// # Permissions @@ -510,7 +510,7 @@ decl_module! { #[weight = ::WeightInfo::update_identifiers(asset_identifiers.len() as u32)] pub fn update_identifiers( origin, - asset_id: AssetID, + asset_id: AssetId, asset_identifiers: Vec ) -> DispatchResult { Self::base_update_identifiers(origin, asset_id, asset_identifiers) @@ -520,7 +520,7 @@ decl_module! { /// /// # Arguments /// * `origin`: a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `value`: the [`Balance`] of tokens that will be transferred. /// * `from_portfolio`: the [`PortfolioId`] that will have its balance reduced. /// @@ -528,7 +528,7 @@ decl_module! { /// * Asset /// * Portfolio #[weight = ::WeightInfo::controller_transfer()] - pub fn controller_transfer(origin, asset_id: AssetID, value: Balance, from_portfolio: PortfolioId) -> DispatchResult { + pub fn controller_transfer(origin, asset_id: AssetId, value: Balance, from_portfolio: PortfolioId) -> DispatchResult { let mut weight_meter = WeightMeter::max_limit_no_minimum(); Self::base_controller_transfer(origin, asset_id, value, from_portfolio, &mut weight_meter) } @@ -590,7 +590,7 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `key`: the [`AssetMetadataKey`] associated to the token. /// * `value`: the [`AssetMetadataValue`] of the given metadata key. /// * `details`: optional [`AssetMetadataValueDetail`] (expire, lock status). @@ -601,7 +601,7 @@ decl_module! { #[weight = ::WeightInfo::set_asset_metadata()] pub fn set_asset_metadata( origin, - asset_id: AssetID, + asset_id: AssetId, key: AssetMetadataKey, value: AssetMetadataValue, detail: Option> @@ -613,7 +613,7 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `key`: the [`AssetMetadataKey`] associated to the token. /// * `details`: the [`AssetMetadataValueDetail`] (expire, lock status) that will be associated to the token. /// @@ -623,7 +623,7 @@ decl_module! { #[weight = ::WeightInfo::set_asset_metadata_details()] pub fn set_asset_metadata_details( origin, - asset_id: AssetID, + asset_id: AssetId, key: AssetMetadataKey, detail: AssetMetadataValueDetail ) -> DispatchResult { @@ -634,7 +634,7 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `name`: the [`AssetMetadataName`]. /// * `spec`: the asset metadata specifications ([`AssetMetadataSpec`]). /// * `value`: the [`AssetMetadataValue`] of the given metadata key. @@ -646,7 +646,7 @@ decl_module! { #[weight = ::WeightInfo::register_and_set_local_asset_metadata()] pub fn register_and_set_local_asset_metadata( origin, - asset_id: AssetID, + asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, value: AssetMetadataValue, @@ -659,7 +659,7 @@ decl_module! { /// /// # Arguments /// * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `name`: the [`AssetMetadataName`]. /// * `spec`: the asset metadata specifications ([`AssetMetadataSpec`]). /// @@ -669,7 +669,7 @@ decl_module! { #[weight = ::WeightInfo::register_asset_metadata_local_type()] pub fn register_asset_metadata_local_type( origin, - asset_id: AssetID, + asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec ) -> DispatchResult { @@ -698,13 +698,13 @@ decl_module! { /// /// # Arguments /// * `origin`: it contains the secondary key of the sender - /// * `asset_id`: the [`AssetID`] associated to the token. + /// * `asset_id`: the [`AssetId`] associated to the token. /// * `asset_type`: the new [`AssetType`] of the token. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::update_asset_type()] - pub fn update_asset_type(origin, asset_id: AssetID, asset_type: AssetType) -> DispatchResult { + pub fn update_asset_type(origin, asset_id: AssetId, asset_type: AssetType) -> DispatchResult { Self::base_update_asset_type(origin, asset_id, asset_type) } @@ -712,13 +712,13 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] associated to the local metadata key. + /// * `asset_id`: the [`AssetId`] associated to the local metadata key. /// * `local_key`: the [`AssetMetadataLocalKey`] that will be removed. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_local_metadata_key()] - pub fn remove_local_metadata_key(origin, asset_id: AssetID, local_key: AssetMetadataLocalKey) -> DispatchResult { + pub fn remove_local_metadata_key(origin, asset_id: AssetId, local_key: AssetMetadataLocalKey) -> DispatchResult { Self::base_remove_local_metadata_key(origin, asset_id, local_key) } @@ -726,13 +726,13 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] associated to the metadata key. + /// * `asset_id`: the [`AssetId`] associated to the metadata key. /// * `metadata_key`: the [`AssetMetadataKey`] that will have its value deleted. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_metadata_value()] - pub fn remove_metadata_value(origin, asset_id: AssetID, metadata_key: AssetMetadataKey) -> DispatchResult { + pub fn remove_metadata_value(origin, asset_id: AssetId, metadata_key: AssetMetadataKey) -> DispatchResult { Self::base_remove_metadata_value(origin, asset_id, metadata_key) } @@ -740,12 +740,12 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] that will be exempt from affirmation. + /// * `asset_id`: the [`AssetId`] that will be exempt from affirmation. /// /// # Permissions /// * Root #[weight = ::WeightInfo::exempt_asset_affirmation()] - pub fn exempt_asset_affirmation(origin, asset_id: AssetID) -> DispatchResult { + pub fn exempt_asset_affirmation(origin, asset_id: AssetId) -> DispatchResult { Self::base_exempt_asset_affirmation(origin, asset_id) } @@ -753,12 +753,12 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] that will have its exemption removed. + /// * `asset_id`: the [`AssetId`] that will have its exemption removed. /// /// # Permissions /// * Root #[weight = ::WeightInfo::remove_asset_affirmation_exemption()] - pub fn remove_asset_affirmation_exemption(origin, asset_id: AssetID) -> DispatchResult { + pub fn remove_asset_affirmation_exemption(origin, asset_id: AssetId) -> DispatchResult { Self::base_remove_asset_affirmation_exemption(origin, asset_id) } @@ -766,12 +766,12 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] that will be exempt from affirmation. + /// * `asset_id`: the [`AssetId`] that will be exempt from affirmation. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::pre_approve_asset()] - pub fn pre_approve_asset(origin, asset_id: AssetID) -> DispatchResult { + pub fn pre_approve_asset(origin, asset_id: AssetId) -> DispatchResult { Self::base_pre_approve_asset(origin, asset_id) } @@ -779,12 +779,12 @@ decl_module! { /// /// # Arguments /// * `origin` - the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] that will have its exemption removed. + /// * `asset_id`: the [`AssetId`] that will have its exemption removed. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_asset_pre_approval()] - pub fn remove_asset_pre_approval(origin, asset_id: AssetID) -> DispatchResult { + pub fn remove_asset_pre_approval(origin, asset_id: AssetId) -> DispatchResult { Self::base_remove_asset_pre_approval(origin, asset_id) } @@ -792,7 +792,7 @@ decl_module! { /// /// # Arguments /// * `origin`: The secondary key of the sender. - /// * `asset_id`: the [`AssetID`] of the asset that will require the mediators. + /// * `asset_id`: the [`AssetId`] of the asset that will require the mediators. /// * `mediators`: A set of [`IdentityId`] of all the mandatory mediators for the given ticker. /// /// # Permissions @@ -800,7 +800,7 @@ decl_module! { #[weight = ::WeightInfo::add_mandatory_mediators(mediators.len() as u32)] pub fn add_mandatory_mediators( origin, - asset_id: AssetID, + asset_id: AssetId, mediators: BoundedBTreeSet ) { Self::base_add_mandatory_mediators(origin, asset_id, mediators)?; @@ -810,7 +810,7 @@ decl_module! { /// /// # Arguments /// * `origin`: the secondary key of the sender. - /// * `asset_id`: the [`AssetID`] of the asset that will have mediators removed. + /// * `asset_id`: the [`AssetId`] of the asset that will have mediators removed. /// * `mediators`: A set of [`IdentityId`] of all the mediators that will be removed from the mandatory mediators list. /// /// # Permissions @@ -818,23 +818,23 @@ decl_module! { #[weight = ::WeightInfo::remove_mandatory_mediators(mediators.len() as u32)] pub fn remove_mandatory_mediators( origin, - asset_id: AssetID, + asset_id: AssetId, mediators: BoundedBTreeSet ) { Self::base_remove_mandatory_mediators(origin, asset_id, mediators)?; } - /// Establishes a connection between a ticker and an AssetID. + /// Establishes a connection between a ticker and an AssetId. /// /// # Arguments /// * `origin`: the secondary key of the sender. /// * `ticker`: the [`Ticker`] that will be linked to the given `asset_id`. - /// * `asset_id`: the [`AssetID`] that will be connected to `ticker`. + /// * `asset_id`: the [`AssetId`] that will be connected to `ticker`. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::link_ticker_to_asset_id()] - pub fn link_ticker_to_asset_id(origin, ticker: Ticker, asset_id: AssetID) { + pub fn link_ticker_to_asset_id(origin, ticker: Ticker, asset_id: AssetId) { Self::base_link_ticker_to_asset_id(origin, ticker, asset_id)?; } @@ -843,12 +843,12 @@ decl_module! { /// # Arguments /// * `origin`: the secondary key of the sender. /// * `ticker`: the [`Ticker`] that will be unlinked from the given `asset_id`. - /// * `asset_id`: the [`AssetID`] that will be unlink from `ticker`. + /// * `asset_id`: the [`AssetId`] that will be unlink from `ticker`. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::unlink_ticker_from_asset_id()] - pub fn unlink_ticker_from_asset_id(origin, ticker: Ticker, asset_id: AssetID) { + pub fn unlink_ticker_from_asset_id(origin, ticker: Ticker, asset_id: AssetId) { Self::base_unlink_ticker_from_asset_id(origin, ticker, asset_id)?; } } @@ -917,7 +917,7 @@ impl Module { >::ensure_agent_permissioned(&asset_id, auth_by)?; // If the asset is linked to a unique ticker, the ticker registration must be updated. - if let Some(ticker) = AssetIDTicker::get(&asset_id) { + if let Some(ticker) = AssetIdTicker::get(&asset_id) { let ticker_registration = UniqueTickerRegistration::::try_get(&ticker) .map_err(|_| Error::::TickerRegistrationNotFound)?; Self::transfer_ticker(ticker_registration, ticker, caller_did); @@ -968,7 +968,7 @@ impl Module { /// Freezes or unfreezes transfers for the token associated to `asset_id`. fn base_set_freeze( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, freeze: bool, ) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; @@ -991,7 +991,7 @@ impl Module { /// If `asset_name` is valid, updates the [`AssetName`] of the underling token given by `asset_id`. fn base_rename_asset( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, asset_name: AssetName, ) -> DispatchResult { Self::ensure_valid_asset_name(&asset_name)?; @@ -1007,7 +1007,7 @@ impl Module { /// Issues `amount_to_issue` tokens for `asset_id` into the caller's portfolio. fn base_issue( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, amount_to_issue: Balance, portfolio_kind: PortfolioKind, ) -> DispatchResult { @@ -1034,7 +1034,7 @@ impl Module { /// Reduces `value` tokens from `portfolio_kind` and [`AssetDetails::total_supply`]. fn base_redeem( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, value: Balance, portfolio_kind: PortfolioKind, weight_meter: &mut WeightMeter, @@ -1095,7 +1095,7 @@ impl Module { Ok(()) } - fn base_make_divisible(origin: T::RuntimeOrigin, asset_id: AssetID) -> DispatchResult { + fn base_make_divisible(origin: T::RuntimeOrigin, asset_id: AssetId) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; Assets::try_mutate(&asset_id, |asset_details| -> DispatchResult { @@ -1115,7 +1115,7 @@ impl Module { fn base_add_documents( origin: T::RuntimeOrigin, docs: Vec, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { let did = >::ensure_perms(origin, asset_id)?; @@ -1147,7 +1147,7 @@ impl Module { fn base_remove_documents( origin: T::RuntimeOrigin, docs_id: Vec, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; for doc_id in docs_id { @@ -1159,7 +1159,7 @@ impl Module { fn base_set_funding_round( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, funding_round_name: FundingRoundName, ) -> DispatchResult { Self::ensure_valid_funding_round_name(&funding_round_name)?; @@ -1176,7 +1176,7 @@ impl Module { fn base_update_identifiers( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, asset_identifiers: Vec, ) -> DispatchResult { let did = >::ensure_perms(origin, asset_id)?; @@ -1187,7 +1187,7 @@ impl Module { fn base_controller_transfer( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, sender_portfolio: PortfolioId, weight_meter: &mut WeightMeter, @@ -1270,7 +1270,7 @@ impl Module { fn base_set_asset_metadata( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, key: AssetMetadataKey, value: AssetMetadataValue, detail: Option>, @@ -1283,7 +1283,7 @@ impl Module { fn base_set_asset_metadata_details( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, key: AssetMetadataKey, detail: AssetMetadataValueDetail, ) -> DispatchResult { @@ -1319,7 +1319,7 @@ impl Module { fn base_register_and_set_local_asset_metadata( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, value: AssetMetadataValue, @@ -1336,7 +1336,7 @@ impl Module { fn base_register_asset_metadata_local_type( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> DispatchResult { @@ -1375,7 +1375,7 @@ impl Module { fn base_update_asset_type( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, asset_type: AssetType, ) -> DispatchResult { Self::ensure_asset_exists(&asset_id)?; @@ -1397,7 +1397,7 @@ impl Module { fn base_remove_local_metadata_key( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, local_key: AssetMetadataLocalKey, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset @@ -1432,7 +1432,7 @@ impl Module { fn base_remove_metadata_value( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, metadata_key: AssetMetadataKey, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset @@ -1471,7 +1471,7 @@ impl Module { /// Pre-approves the receivement of the asset for all identities. fn base_exempt_asset_affirmation( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { ensure_root(origin)?; AssetsExemptFromAffirmation::insert(&asset_id, true); @@ -1482,7 +1482,7 @@ impl Module { /// Removes the pre-approval of the asset for all identities. fn base_remove_asset_affirmation_exemption( origin: T::RuntimeOrigin, - assset_id: AssetID, + assset_id: AssetId, ) -> DispatchResult { ensure_root(origin)?; AssetsExemptFromAffirmation::remove(&assset_id); @@ -1491,7 +1491,7 @@ impl Module { } /// Pre-approves the receivement of an asset. - fn base_pre_approve_asset(origin: T::RuntimeOrigin, asset_id: AssetID) -> DispatchResult { + fn base_pre_approve_asset(origin: T::RuntimeOrigin, asset_id: AssetId) -> DispatchResult { let caller_did = Identity::::ensure_perms(origin)?; PreApprovedAsset::insert(&caller_did, &asset_id, true); Self::deposit_event(RawEvent::PreApprovedAsset(caller_did, asset_id)); @@ -1501,7 +1501,7 @@ impl Module { /// Removes the pre approval of an asset. fn base_remove_asset_pre_approval( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { let caller_did = Identity::::ensure_perms(origin)?; PreApprovedAsset::remove(&caller_did, &asset_id); @@ -1512,7 +1512,7 @@ impl Module { /// Sets all identities in the `mediators` set as mandatory mediators for any instruction transfering `asset_id`. fn base_add_mandatory_mediators( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, new_mediators: BoundedBTreeSet, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset @@ -1538,7 +1538,7 @@ impl Module { /// Removes all identities in the `mediators` set from the mandatory mediators list for the given `asset_id`. fn base_remove_mandatory_mediators( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, mediators: BoundedBTreeSet, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset @@ -1561,7 +1561,7 @@ impl Module { pub fn base_transfer( from_portfolio: PortfolioId, to_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, instruction_id: Option, instruction_memo: Option, @@ -1599,7 +1599,7 @@ impl Module { pub fn base_link_ticker_to_asset_id( origin: T::RuntimeOrigin, ticker: Ticker, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset let caller_did = >::ensure_perms(origin, asset_id)?; @@ -1630,12 +1630,12 @@ impl Module { Self::ensure_ticker_not_linked(&ticker)?; // The asset can't be linked to any other ticker ensure!( - !AssetIDTicker::contains_key(asset_id), + !AssetIdTicker::contains_key(asset_id), Error::::AssetIsAlreadyLinkedToATicker ); // Links the ticker to the asset - TickerAssetID::insert(ticker, asset_id); - AssetIDTicker::insert(asset_id, ticker); + TickerAssetId::insert(ticker, asset_id); + AssetIdTicker::insert(asset_id, ticker); Self::deposit_event(RawEvent::TickerLinkedToAsset(caller_did, ticker, asset_id)); Ok(()) } @@ -1643,7 +1643,7 @@ impl Module { pub fn base_unlink_ticker_from_asset_id( origin: T::RuntimeOrigin, ticker: Ticker, - asset_id: AssetID, + asset_id: AssetId, ) -> DispatchResult { // Verifies if the caller has the correct permissions for this asset let caller_did = ExternalAgents::::ensure_perms(origin, asset_id)?; @@ -1658,14 +1658,14 @@ impl Module { // The ticker must be linked to the given asset ensure!( - TickerAssetID::get(ticker) == Some(asset_id), + TickerAssetId::get(ticker) == Some(asset_id), Error::::TickerIsNotLinkedToTheAsset ); // Removes the storage links TickersOwnedByUser::remove(caller_did, ticker); - TickerAssetID::remove(ticker); - AssetIDTicker::remove(asset_id); + TickerAssetId::remove(ticker); + AssetIdTicker::remove(asset_id); Ok(()) } @@ -1723,10 +1723,10 @@ impl Module { Ok(()) } - /// Returns `Ok` if `ticker` is not linked to an [`AssetID`]. Otherwise, returns [`Error::TickerIsAlreadyLinkedToAnAsset`]. + /// Returns `Ok` if `ticker` is not linked to an [`AssetId`]. Otherwise, returns [`Error::TickerIsAlreadyLinkedToAnAsset`]. fn ensure_ticker_not_linked(ticker: &Ticker) -> DispatchResult { ensure!( - !TickerAssetID::contains_key(ticker), + !TickerAssetId::contains_key(ticker), Error::::TickerIsAlreadyLinkedToAnAsset ); Ok(()) @@ -1777,7 +1777,7 @@ impl Module { fn validate_asset_creation_rules( caller_did: IdentityId, secondary_key: Option>, - asset_id: &AssetID, + asset_id: &AssetId, asset_name: &AssetName, asset_type: &AssetType, funding_round_name: Option<&FundingRoundName>, @@ -1804,7 +1804,7 @@ impl Module { } /// Returns the [`AssetDetails`] associated to `asset_id`, if one exists. Otherwise, returns [`Error::NoSuchAsset`]. - pub fn try_get_asset_details(asset_id: &AssetID) -> Result { + pub fn try_get_asset_details(asset_id: &AssetId) -> Result { let asset_details = Assets::try_get(asset_id).or(Err(Error::::NoSuchAsset))?; Ok(asset_details) } @@ -1852,7 +1852,7 @@ impl Module { /// of the portfolio. pub fn ensure_origin_asset_and_portfolio_permissions( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, portfolio_kind: PortfolioKind, ensure_custody: bool, ) -> Result { @@ -1884,13 +1884,13 @@ impl Module { } /// Returns `true` if [`AssetDetails::divisible`], otherwise returns `false`. - pub fn is_divisible(asset_id: &AssetID) -> bool { + pub fn is_divisible(asset_id: &AssetId) -> bool { Assets::get(asset_id) .map(|t| t.divisible) .unwrap_or_default() } - pub fn check_asset_metadata_key_exists(asset_id: &AssetID, key: &AssetMetadataKey) -> bool { + pub fn check_asset_metadata_key_exists(asset_id: &AssetId, key: &AssetMetadataKey) -> bool { match key { AssetMetadataKey::Global(key) => AssetMetadataGlobalKeyToName::contains_key(key), AssetMetadataKey::Local(key) => { @@ -1899,7 +1899,7 @@ impl Module { } } - fn is_asset_metadata_locked(asset_id: &AssetID, key: AssetMetadataKey) -> bool { + fn is_asset_metadata_locked(asset_id: &AssetId, key: AssetMetadataKey) -> bool { AssetMetadataValueDetails::::get(asset_id, key).map_or(false, |details| { details.is_locked(>::get()) }) @@ -1938,13 +1938,13 @@ impl Module { /// Returns `None` if there's no asset associated to the given asset_id, /// returns Some(true) if the asset exists and is of type `AssetType::NonFungible`, and returns Some(false) otherwise. - pub fn nft_asset(asset_id: &AssetID) -> Option { + pub fn nft_asset(asset_id: &AssetId) -> Option { let token = Assets::try_get(asset_id).ok()?; Some(token.asset_type.is_non_fungible()) } /// Ensure that the document `doc` exists for `ticker`. - pub fn ensure_doc_exists(asset_id: &AssetID, doc: &DocumentId) -> DispatchResult { + pub fn ensure_doc_exists(asset_id: &AssetId, doc: &DocumentId) -> DispatchResult { ensure!( AssetDocuments::contains_key(asset_id, doc), Error::::NoSuchDoc @@ -1952,13 +1952,13 @@ impl Module { Ok(()) } - pub fn get_balance_at(asset_id: AssetID, did: IdentityId, at: CheckpointId) -> Balance { + pub fn get_balance_at(asset_id: AssetId, did: IdentityId, at: CheckpointId) -> Balance { >::balance_at(asset_id, did, at) .unwrap_or_else(|| Self::balance_of(&asset_id, &did)) } pub fn validate_asset_transfer( - asset_id: AssetID, + asset_id: AssetId, sender_portfolio: &PortfolioId, receiver_portfolio: &PortfolioId, transfer_value: Balance, @@ -2040,7 +2040,7 @@ impl Module { pub fn asset_transfer_report( sender_portfolio: &PortfolioId, receiver_portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, transfer_value: Balance, skip_locked_check: bool, weight_meter: &mut WeightMeter, @@ -2148,7 +2148,7 @@ impl Module { } /// Returns [`AssetDetails::total_supply`] for the given `asset_id`. - pub fn total_supply(asset_id: &AssetID) -> Balance { + pub fn total_supply(asset_id: &AssetId) -> Balance { Assets::get(asset_id) .map(|t| t.total_supply) .unwrap_or_default() @@ -2208,22 +2208,22 @@ impl Module { Ok(()) } - /// Returns `Ok` if there's no token associated to `asset_id`. Otherwise, returns [`Error::AssetIDGenerationError`]. - fn ensure_new_asset_id(asset_id: &AssetID) -> DispatchResult { + /// Returns `Ok` if there's no token associated to `asset_id`. Otherwise, returns [`Error::AssetIdGenerationError`]. + fn ensure_new_asset_id(asset_id: &AssetId) -> DispatchResult { ensure!( !Assets::contains_key(asset_id), - Error::::AssetIDGenerationError + Error::::AssetIdGenerationError ); Ok(()) } /// Returns `Ok` if there's a token associated to `asset_id`. Otherwise, returns [`Error::NoSuchAsset`]. - fn ensure_asset_exists(asset_id: &AssetID) -> DispatchResult { + fn ensure_asset_exists(asset_id: &AssetId) -> DispatchResult { ensure!(Assets::contains_key(asset_id), Error::::NoSuchAsset); Ok(()) } - pub fn generate_asset_id(caller_acc: T::AccountId, update: bool) -> AssetID { + pub fn generate_asset_id(caller_acc: T::AccountId, update: bool) -> AssetId { let genesis_hash = frame_system::Pallet::::block_hash(T::BlockNumber::zero()); let nonce = Self::get_nonce(&caller_acc, update); blake2_128(&(b"modlpy/pallet_asset", genesis_hash, caller_acc, nonce).encode()).into() @@ -2284,7 +2284,7 @@ impl Module { /// Note: two fees are charged ([`ProtocolOp::AssetCreateAsset`] and [`ProtocolOp::AssetRegisterTicker`]). fn unverified_create_asset( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, divisible: bool, asset_name: AssetName, asset_type: AssetType, @@ -2323,7 +2323,7 @@ impl Module { /// Inserts `asset_identifiers` for the given `asset_id` and emits [`RawEvent::IdentifiersUpdated`]. fn unverified_update_asset_identifiers( did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, asset_identifiers: Vec, ) { AssetIdentifiers::insert(asset_id, asset_identifiers.clone()); @@ -2337,7 +2337,7 @@ impl Module { /// All storage writes for issuing a token. /// Note: if `charge_fee`` is `true` [`ProtocolOp::AssetIssue`] is charged. fn unverified_issue_tokens( - asset_id: AssetID, + asset_id: AssetId, asset_details: &mut AssetDetails, issuer_portfolio: PortfolioId, amount_to_issue: Balance, @@ -2401,7 +2401,7 @@ impl Module { pub fn unverified_transfer_asset( sender_portfolio: PortfolioId, receiver_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, instruction_id: Option, instruction_memo: Option, @@ -2488,7 +2488,7 @@ impl Module { fn unverified_set_asset_metadata( did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, key: AssetMetadataKey, value: AssetMetadataValue, detail: Option>, @@ -2524,7 +2524,7 @@ impl Module { fn unverified_register_asset_metadata_local_type( did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> Result { @@ -2571,7 +2571,7 @@ impl Module { /// Adds one to the `AssetMetadataLocalKey` for the given `ticker`. fn update_current_asset_metadata_local_key( - asset_id: &AssetID, + asset_id: &AssetId, ) -> Result { CurrentAssetMetadataLocalKey::try_mutate(asset_id, |current_local_key| { match current_local_key { @@ -2599,27 +2599,27 @@ impl Module { //========================================================================== impl AssetFnTrait for Module { - fn ensure_granular(asset_id: &AssetID, value: Balance) -> DispatchResult { + fn ensure_granular(asset_id: &AssetId, value: Balance) -> DispatchResult { let asset_details = Self::try_get_asset_details(&asset_id)?; Self::ensure_token_granular(&asset_details, &value) } - fn skip_asset_affirmation(identity_id: &IdentityId, asset_id: &AssetID) -> bool { + fn skip_asset_affirmation(identity_id: &IdentityId, asset_id: &AssetId) -> bool { if AssetsExemptFromAffirmation::get(asset_id) { return true; } PreApprovedAsset::get(identity_id, asset_id) } - fn asset_affirmation_exemption(asset_id: &AssetID) -> bool { + fn asset_affirmation_exemption(asset_id: &AssetId) -> bool { AssetsExemptFromAffirmation::get(asset_id) } - fn asset_balance(asset_id: &AssetID, did: &IdentityId) -> Balance { + fn asset_balance(asset_id: &AssetId, did: &IdentityId) -> Balance { BalanceOf::get(asset_id, did) } - fn asset_total_supply(asset_id: &AssetID) -> Result { + fn asset_total_supply(asset_id: &AssetId) -> Result { Ok(Self::try_get_asset_details(&asset_id)?.total_supply) } @@ -2650,7 +2650,7 @@ impl AssetFnTrait for Module { #[cfg(feature = "runtime-benchmarks")] fn issue( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, amount: Balance, portfolio_kind: PortfolioKind, ) -> DispatchResult { @@ -2658,14 +2658,14 @@ impl AssetFnTrait for Module { } #[cfg(feature = "runtime-benchmarks")] - fn generate_asset_id(caller_acc: T::AccountId) -> AssetID { + fn generate_asset_id(caller_acc: T::AccountId) -> AssetId { Self::generate_asset_id(caller_acc, false) } #[cfg(feature = "runtime-benchmarks")] fn register_asset_metadata_type( origin: T::RuntimeOrigin, - asset_id: Option, + asset_id: Option, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> DispatchResult { @@ -2680,7 +2680,7 @@ impl AssetFnTrait for Module { #[cfg(feature = "runtime-benchmarks")] fn add_mandatory_mediators( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, mediators: BTreeSet, ) -> DispatchResult { Self::add_mandatory_mediators(origin, asset_id, mediators.try_into().unwrap_or_default()) diff --git a/pallets/asset/src/migrations.rs b/pallets/asset/src/migrations.rs index 3464e193d6..2eceeb0617 100644 --- a/pallets/asset/src/migrations.rs +++ b/pallets/asset/src/migrations.rs @@ -13,61 +13,61 @@ mod v4 { pub Tickers get(fn ticker_registration): map hasher(blake2_128_concat) Ticker => Option>; - // This storage was renamed to Assets and changed the Ticker key to AssetID. + // This storage was renamed to Assets and changed the Ticker key to AssetId. pub Tokens get(fn tokens): map hasher(blake2_128_concat) Ticker => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetNames get(fn asset_names): map hasher(blake2_128_concat) Ticker => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldBalanceOf get(fn balance_of): double_map hasher(blake2_128_concat) Ticker, hasher(identity) IdentityId => Balance; - // This storage was renamed to AssetIdentifiers and changed the Ticker key to AssetID. + // This storage was renamed to AssetIdentifiers and changed the Ticker key to AssetId. pub Identifiers get(fn identifiers): map hasher(blake2_128_concat) Ticker => Vec; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldFundingRound get(fn funding_round): map hasher(blake2_128_concat) Ticker => FundingRoundName; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldIssuedInFundingRound get(fn issued_in_funding_round): map hasher(blake2_128_concat) (Ticker, FundingRoundName) => Balance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldFrozen get(fn frozen): map hasher(blake2_128_concat) Ticker => bool; // This storage was split into TickersOwnedByUser and SecurityTokensOwnedByUser. pub AssetOwnershipRelations get(fn asset_ownership_relation): double_map hasher(identity) IdentityId, hasher(blake2_128_concat) Ticker => AssetOwnershipRelation; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetDocuments get(fn asset_documents): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) DocumentId => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetDocumentsIdSequence get(fn asset_documents_id_sequence): map hasher(blake2_128_concat) Ticker => DocumentId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetMetadataValues get(fn asset_metadata_values): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) AssetMetadataKey => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetMetadataValueDetails get(fn asset_metadata_value_details): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) AssetMetadataKey => Option>; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetMetadataLocalNameToKey get(fn asset_metadata_local_name_to_key): double_map hasher(blake2_128_concat) Ticker, hasher(blake2_128_concat) AssetMetadataName => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetMetadataLocalKeyToName get(fn asset_metadata_local_key_to_name): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) AssetMetadataLocalKey => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAssetMetadataLocalSpecs get(fn asset_metadata_local_specs): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) AssetMetadataLocalKey => Option; @@ -75,19 +75,19 @@ mod v4 { pub AssetMetadataNextLocalKey get(fn asset_metadata_next_local_key): map hasher(blake2_128_concat) Ticker => AssetMetadataLocalKey; - // This storage was renamed to AssetsExemptFromAffirmation and changed the Ticker key to AssetID. + // This storage was renamed to AssetsExemptFromAffirmation and changed the Ticker key to AssetId. pub TickersExemptFromAffirmation get(fn tickers_exempt_from_affirmation): map hasher(blake2_128_concat) Ticker => bool; - // This storage was renamed to PreApprovedAsset and changed the Ticker key to AssetID. + // This storage was renamed to PreApprovedAsset and changed the Ticker key to AssetId. pub PreApprovedTicker get(fn pre_approved_tickers): double_map hasher(identity) IdentityId, hasher(blake2_128_concat) Ticker => bool; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldMandatoryMediators get(fn mandatory_mediators): map hasher(blake2_128_concat) Ticker => BoundedBTreeSet; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldCurrentAssetMetadataLocalKey get(fn current_asset_metadata_local_key): map hasher(blake2_128_concat) Ticker => Option; @@ -111,7 +111,7 @@ pub(crate) fn migrate_to_v5() { log::info!("Moving items from Tickers to UniqueTickerRegistration"); v4::Tickers::::drain().for_each(|(ticker, ticker_registration)| { count += 1; - let asset_id = AssetID::from(ticker); + let asset_id = AssetId::from(ticker); ticker_to_asset_id.insert(ticker, asset_id); UniqueTickerRegistration::::insert(ticker, ticker_registration); }); @@ -123,7 +123,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); Assets::insert(asset_id, asset_details); }); log::info!("Migrated {:?} Asset.Tokens entries.", count); @@ -138,7 +138,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetNames::insert(asset_id, asset_name); }); log::info!("Migrated {:?} Asset.AssetNames entries.", count); @@ -153,7 +153,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); BalanceOf::insert(asset_id, identity, balance); }); log::info!("Migrated {:?} Asset.BalanceOf entries.", count); @@ -164,7 +164,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetIdentifiers::insert(asset_id, identifiers); }); log::info!("Migrated {:?} Asset.Identifiers entries.", count); @@ -179,7 +179,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); FundingRound::insert(asset_id, name); }); log::info!("Migrated {:?} Asset.FundingRound entries.", count); @@ -194,7 +194,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); IssuedInFundingRound::insert((asset_id, name), balance); }); log::info!("Migrated {:?} Asset.IssuedInFundingRound entries.", count); @@ -206,7 +206,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); Frozen::insert(asset_id, frozen); }); log::info!("Migrated {:?} Asset.Frozen entries.", count); @@ -217,7 +217,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); match ownership_detail { AssetOwnershipRelation::TickerOwned => { @@ -242,7 +242,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetDocuments::insert(asset_id, doc_id, doc); }); @@ -258,7 +258,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetDocumentsIdSequence::insert(asset_id, seq); }); @@ -277,7 +277,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetMetadataValues::insert(asset_id, key, value); }); @@ -293,7 +293,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetMetadataValueDetails::::insert(asset_id, key, value); }); @@ -312,7 +312,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetMetadataLocalNameToKey::insert(asset_id, name, local_key); }); @@ -331,7 +331,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetMetadataLocalKeyToName::insert(asset_id, local_key, name); }); @@ -350,7 +350,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetMetadataLocalSpecs::insert(asset_id, local_key, spec); }); @@ -372,7 +372,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetsExemptFromAffirmation::insert(asset_id, exempt); }); @@ -387,7 +387,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PreApprovedAsset::insert(did, asset_id, approved); }); @@ -403,7 +403,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); MandatoryMediators::::insert(asset_id, mediators); }); @@ -419,7 +419,7 @@ pub(crate) fn migrate_to_v5() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CurrentAssetMetadataLocalKey::insert(asset_id, current_key); }); @@ -432,11 +432,11 @@ pub(crate) fn migrate_to_v5() { log::info!("Adding link from legacy tickers to an asset_id"); for (ticker, asset_id) in ticker_to_asset_id.into_iter() { count += 1; - AssetIDTicker::insert(asset_id, ticker); - TickerAssetID::insert(ticker, asset_id); + AssetIdTicker::insert(asset_id, ticker); + TickerAssetId::insert(ticker, asset_id); } log::info!( - "Added {:?} Asset.TickerAssetID/AssetIDTicker entries", + "Added {:?} Asset.TickerAssetId/AssetIdTicker entries", count ); diff --git a/pallets/common/src/benchs/asset.rs b/pallets/common/src/benchs/asset.rs index d80b1b1ec9..22ff8a2ca2 100644 --- a/pallets/common/src/benchs/asset.rs +++ b/pallets/common/src/benchs/asset.rs @@ -1,6 +1,6 @@ use sp_std::vec; -use polymesh_primitives::asset::{AssetID, AssetName, AssetType}; +use polymesh_primitives::asset::{AssetId, AssetName, AssetType}; use polymesh_primitives::{PortfolioKind, Ticker}; use crate::benchs::User; @@ -28,7 +28,7 @@ pub fn create_and_issue_sample_asset( asset_type: Option, asset_name: &[u8], issue_tokens: bool, -) -> AssetID { +) -> AssetId { let asset_id = T::AssetFn::generate_asset_id(asset_owner.account()); T::AssetFn::create_asset( diff --git a/pallets/common/src/traits/asset.rs b/pallets/common/src/traits/asset.rs index 67d8c0adf7..10ceedc2b9 100644 --- a/pallets/common/src/traits/asset.rs +++ b/pallets/common/src/traits/asset.rs @@ -24,7 +24,7 @@ use sp_std::collections::btree_set::BTreeSet; use sp_std::prelude::Vec; use polymesh_primitives::asset::{ - AssetID, AssetName, AssetType, CustomAssetTypeId, FundingRoundName, + AssetId, AssetName, AssetType, CustomAssetTypeId, FundingRoundName, }; use polymesh_primitives::asset_metadata::{ AssetMetadataGlobalKey, AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataName, @@ -87,14 +87,14 @@ decl_event! { Moment = ::Moment, { /// Event for creation of the asset. - /// caller DID/ owner DID, AssetID, divisibility, asset type, beneficiary DID, asset name, identifiers, funding round - AssetCreated(IdentityId, AssetID, bool, AssetType, IdentityId, AssetName, Vec, Option), + /// caller DID/ owner DID, AssetId, divisibility, asset type, beneficiary DID, asset name, identifiers, funding round + AssetCreated(IdentityId, AssetId, bool, AssetType, IdentityId, AssetName, Vec, Option), /// Event emitted when any token identifiers are updated. - /// caller DID, AssetID, a vector of (identifier type, identifier value) - IdentifiersUpdated(IdentityId, AssetID, Vec), + /// caller DID, AssetId, a vector of (identifier type, identifier value) + IdentifiersUpdated(IdentityId, AssetId, Vec), /// Event for change in divisibility. - /// caller DID, AssetID, divisibility - DivisibilityChanged(IdentityId, AssetID, bool), + /// caller DID, AssetId, divisibility + DivisibilityChanged(IdentityId, AssetId, bool), /// Emit when ticker is registered. /// caller DID / ticker owner did, ticker, ticker owner, expiry TickerRegistered(IdentityId, Ticker, Option), @@ -102,27 +102,27 @@ decl_event! { /// caller DID / ticker transferred to DID, ticker, from TickerTransferred(IdentityId, Ticker, IdentityId), /// Emit when token ownership is transferred. - /// caller DID / token ownership transferred to DID, AssetID, from - AssetOwnershipTransferred(IdentityId, AssetID, IdentityId), + /// caller DID / token ownership transferred to DID, AssetId, from + AssetOwnershipTransferred(IdentityId, AssetId, IdentityId), /// An event emitted when an asset is frozen. - /// Parameter: caller DID, AssetID. - AssetFrozen(IdentityId, AssetID), + /// Parameter: caller DID, AssetId. + AssetFrozen(IdentityId, AssetId), /// An event emitted when an asset is unfrozen. - /// Parameter: caller DID, AssetID. - AssetUnfrozen(IdentityId, AssetID), + /// Parameter: caller DID, AssetId. + AssetUnfrozen(IdentityId, AssetId), /// An event emitted when a token is renamed. - /// Parameters: caller DID, AssetID, new token name. - AssetRenamed(IdentityId, AssetID, AssetName), + /// Parameters: caller DID, AssetId, new token name. + AssetRenamed(IdentityId, AssetId, AssetName), /// An event carrying the name of the current funding round of an asset. - /// Parameters: caller DID, AssetID, funding round name. - FundingRoundSet(IdentityId, AssetID, FundingRoundName), + /// Parameters: caller DID, AssetId, funding round name. + FundingRoundSet(IdentityId, AssetId, FundingRoundName), /// A new document attached to an asset - DocumentAdded(IdentityId, AssetID, DocumentId, Document), + DocumentAdded(IdentityId, AssetId, DocumentId, Document), /// A document removed from an asset - DocumentRemoved(IdentityId, AssetID, DocumentId), + DocumentRemoved(IdentityId, AssetId, DocumentId), /// Event for when a forced transfer takes place. /// caller DID/ controller DID, ExtensionRemoved, Portfolio of token holder, value. - ControllerTransfer(IdentityId, AssetID, PortfolioId, Balance), + ControllerTransfer(IdentityId, AssetId, PortfolioId, Balance), /// A custom asset type already exists on-chain. /// caller DID, the ID of the custom asset type, the string contents registered. CustomAssetTypeExists(IdentityId, CustomAssetTypeId, Vec), @@ -130,58 +130,58 @@ decl_event! { /// caller DID, the ID of the custom asset type, the string contents registered. CustomAssetTypeRegistered(IdentityId, CustomAssetTypeId, Vec), /// Set asset metadata value. - /// (Caller DID, AssetID, metadata value, optional value details) - SetAssetMetadataValue(IdentityId, AssetID, AssetMetadataValue, Option>), + /// (Caller DID, AssetId, metadata value, optional value details) + SetAssetMetadataValue(IdentityId, AssetId, AssetMetadataValue, Option>), /// Set asset metadata value details (expire, lock status). - /// (Caller DID, AssetID, value details) - SetAssetMetadataValueDetails(IdentityId, AssetID, AssetMetadataValueDetail), + /// (Caller DID, AssetId, value details) + SetAssetMetadataValueDetails(IdentityId, AssetId, AssetMetadataValueDetail), /// Register asset metadata local type. - /// (Caller DID, AssetID, Local type name, Local type key, type specs) - RegisterAssetMetadataLocalType(IdentityId, AssetID, AssetMetadataName, AssetMetadataLocalKey, AssetMetadataSpec), + /// (Caller DID, AssetId, Local type name, Local type key, type specs) + RegisterAssetMetadataLocalType(IdentityId, AssetId, AssetMetadataName, AssetMetadataLocalKey, AssetMetadataSpec), /// Register asset metadata global type. /// (Global type name, Global type key, type specs) RegisterAssetMetadataGlobalType(AssetMetadataName, AssetMetadataGlobalKey, AssetMetadataSpec), /// An event emitted when the type of an asset changed. - /// Parameters: caller DID, AssetID, new token type. - AssetTypeChanged(IdentityId, AssetID, AssetType), + /// Parameters: caller DID, AssetId, new token type. + AssetTypeChanged(IdentityId, AssetId, AssetType), /// An event emitted when a local metadata key has been removed. - /// Parameters: caller AssetID, Local type name - LocalMetadataKeyDeleted(IdentityId, AssetID, AssetMetadataLocalKey), + /// Parameters: caller AssetId, Local type name + LocalMetadataKeyDeleted(IdentityId, AssetId, AssetMetadataLocalKey), /// An event emitted when a local metadata value has been removed. - /// Parameters: caller AssetID, Local type name - MetadataValueDeleted(IdentityId, AssetID, AssetMetadataKey), + /// Parameters: caller AssetId, Local type name + MetadataValueDeleted(IdentityId, AssetId, AssetMetadataKey), /// Emitted when Tokens were issued, redeemed or transferred. - /// Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`AssetID`] for the token, the balance that was issued/transferred/redeemed, + /// Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`AssetId`] for the token, the balance that was issued/transferred/redeemed, /// the [`PortfolioId`] of the source, the [`PortfolioId`] of the destination and the [`PortfolioUpdateReason`]. AssetBalanceUpdated( IdentityId, - AssetID, + AssetId, Balance, Option, Option, PortfolioUpdateReason, ), /// An asset has been added to the list of pre aprroved receivement (valid for all identities). - /// Parameters: [`AssetID`] of the pre approved asset. - AssetAffirmationExemption(AssetID), + /// Parameters: [`AssetId`] of the pre approved asset. + AssetAffirmationExemption(AssetId), /// An asset has been removed from the list of pre aprroved receivement (valid for all identities). - /// Parameters: [`AssetID`] of the asset. - RemoveAssetAffirmationExemption(AssetID), + /// Parameters: [`AssetId`] of the asset. + RemoveAssetAffirmationExemption(AssetId), /// An identity has added an asset to the list of pre aprroved receivement. - /// Parameters: [`IdentityId`] of caller, [`AssetID`] of the pre approved asset. - PreApprovedAsset(IdentityId, AssetID), + /// Parameters: [`IdentityId`] of caller, [`AssetId`] of the pre approved asset. + PreApprovedAsset(IdentityId, AssetId), /// An identity has removed an asset to the list of pre aprroved receivement. - /// Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset. - RemovePreApprovedAsset(IdentityId, AssetID), + /// Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset. + RemovePreApprovedAsset(IdentityId, AssetId), /// An identity has added mandatory mediators to an asset. - /// Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset, the identity of all mediators added. - AssetMediatorsAdded(IdentityId, AssetID, BTreeSet), + /// Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset, the identity of all mediators added. + AssetMediatorsAdded(IdentityId, AssetId, BTreeSet), /// An identity has removed mediators from an asset. - /// Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset, the identity of all mediators removed. - AssetMediatorsRemoved(IdentityId, AssetID, BTreeSet), + /// Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset, the identity of all mediators removed. + AssetMediatorsRemoved(IdentityId, AssetId, BTreeSet), /// An identity has linked a ticker to an asset. - /// Parameters: [`IdentityId`] of caller, [`Ticker`] of the asset, the asset identifier [`AssetID`]. - TickerLinkedToAsset(IdentityId, Ticker, AssetID), + /// Parameters: [`IdentityId`] of caller, [`Ticker`] of the asset, the asset identifier [`AssetId`]. + TickerLinkedToAsset(IdentityId, Ticker, AssetId), } } @@ -223,19 +223,19 @@ pub trait WeightInfo { pub trait AssetFnTrait { /// Returns `Ok` if [`AssetDetails::divisible`] or `value` % ONE_UNIT == 0. - fn ensure_granular(asset_id: &AssetID, value: Balance) -> DispatchResult; + fn ensure_granular(asset_id: &AssetId, value: Balance) -> DispatchResult; /// Returns `true` if the given `identity_id` is exempt from affirming the receivement of `asset_id`, otherwise returns `false`. - fn skip_asset_affirmation(identity_id: &IdentityId, asset_id: &AssetID) -> bool; + fn skip_asset_affirmation(identity_id: &IdentityId, asset_id: &AssetId) -> bool; /// Returns `true` if the receivement of `asset_id` is exempt from being affirmed, otherwise returns `false`. - fn asset_affirmation_exemption(asset_id: &AssetID) -> bool; + fn asset_affirmation_exemption(asset_id: &AssetId) -> bool; /// Returns the `did` balance for the given `asset_id`. - fn asset_balance(asset_id: &AssetID, did: &IdentityId) -> Balance; + fn asset_balance(asset_id: &AssetId, did: &IdentityId) -> Balance; /// Returns the total supply for the given `asset_id`. - fn asset_total_supply(asset_id: &AssetID) -> Result; + fn asset_total_supply(asset_id: &AssetId) -> Result; #[cfg(feature = "runtime-benchmarks")] fn register_unique_ticker(origin: Origin, ticker: Ticker) -> DispatchResult; @@ -253,18 +253,18 @@ pub trait AssetFnTrait { #[cfg(feature = "runtime-benchmarks")] fn issue( origin: Origin, - asset_id: AssetID, + asset_id: AssetId, amount: Balance, portfolio_kind: PortfolioKind, ) -> DispatchResult; #[cfg(feature = "runtime-benchmarks")] - fn generate_asset_id(caller_acc: Account) -> AssetID; + fn generate_asset_id(caller_acc: Account) -> AssetId; #[cfg(feature = "runtime-benchmarks")] fn register_asset_metadata_type( origin: Origin, - asset_id: Option, + asset_id: Option, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> DispatchResult; @@ -272,7 +272,7 @@ pub trait AssetFnTrait { #[cfg(feature = "runtime-benchmarks")] fn add_mandatory_mediators( origin: Origin, - asset_id: AssetID, + asset_id: AssetId, mediators: BTreeSet, ) -> DispatchResult; } diff --git a/pallets/common/src/traits/checkpoint.rs b/pallets/common/src/traits/checkpoint.rs index d960cb46f6..2de92d7d5e 100644 --- a/pallets/common/src/traits/checkpoint.rs +++ b/pallets/common/src/traits/checkpoint.rs @@ -1,7 +1,7 @@ use codec::{Decode, Encode}; use frame_support::decl_event; use frame_support::weights::Weight; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::calendar::{CalendarPeriod, CheckpointSchedule}; use polymesh_primitives::{asset::CheckpointId, impl_checked_inc, Balance, IdentityId, Moment}; use scale_info::TypeInfo; @@ -193,8 +193,8 @@ decl_event! { pub enum Event { /// A checkpoint was created. /// - /// (caller DID, AssetID, checkpoint ID, total supply, checkpoint timestamp) - CheckpointCreated(Option, AssetID, CheckpointId, Balance, Moment), + /// (caller DID, AssetId, checkpoint ID, total supply, checkpoint timestamp) + CheckpointCreated(Option, AssetId, CheckpointId, Balance, Moment), /// The maximum complexity for an arbitrary asset's schedule set was changed. /// @@ -203,12 +203,12 @@ decl_event! { /// A checkpoint schedule was created. /// - /// (caller DID, AssetID, schedule id, schedule) - ScheduleCreated(IdentityId, AssetID, ScheduleId, ScheduleCheckpoints), + /// (caller DID, AssetId, schedule id, schedule) + ScheduleCreated(IdentityId, AssetId, ScheduleId, ScheduleCheckpoints), /// A checkpoint schedule was removed. /// - /// (caller DID, AssetID, schedule id, schedule) - ScheduleRemoved(IdentityId, AssetID, ScheduleId, ScheduleCheckpoints), + /// (caller DID, AssetId, schedule id, schedule) + ScheduleRemoved(IdentityId, AssetId, ScheduleId, ScheduleCheckpoints), } } diff --git a/pallets/common/src/traits/compliance_manager.rs b/pallets/common/src/traits/compliance_manager.rs index d21db148ef..71cc44ef32 100644 --- a/pallets/common/src/traits/compliance_manager.rs +++ b/pallets/common/src/traits/compliance_manager.rs @@ -20,7 +20,7 @@ use frame_support::traits::Get; use frame_support::weights::Weight; use sp_std::prelude::*; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::compliance_manager::{AssetComplianceResult, ComplianceRequirement}; use polymesh_primitives::condition::{conditions_total_counts, Condition}; use polymesh_primitives::{IdentityId, TrustedIssuer, WeightMeter}; @@ -50,32 +50,32 @@ pub trait Config: decl_event!( pub enum Event { /// Emitted when new compliance requirement is created. - /// (caller DID, AssetID, ComplianceRequirement). - ComplianceRequirementCreated(IdentityId, AssetID, ComplianceRequirement), + /// (caller DID, AssetId, ComplianceRequirement). + ComplianceRequirementCreated(IdentityId, AssetId, ComplianceRequirement), /// Emitted when a compliance requirement is removed. - /// (caller DID, AssetID, requirement_id). - ComplianceRequirementRemoved(IdentityId, AssetID, u32), + /// (caller DID, AssetId, requirement_id). + ComplianceRequirementRemoved(IdentityId, AssetId, u32), /// Emitted when an asset compliance is replaced. - /// Parameters: caller DID, AssetID, new asset compliance. - AssetComplianceReplaced(IdentityId, AssetID, Vec), + /// Parameters: caller DID, AssetId, new asset compliance. + AssetComplianceReplaced(IdentityId, AssetId, Vec), /// Emitted when an asset compliance of a asset_id is reset. - /// (caller DID, AssetID). - AssetComplianceReset(IdentityId, AssetID), + /// (caller DID, AssetId). + AssetComplianceReset(IdentityId, AssetId), /// Emitted when an asset compliance for a given asset_id gets resume. - /// (caller DID, AssetID). - AssetComplianceResumed(IdentityId, AssetID), + /// (caller DID, AssetId). + AssetComplianceResumed(IdentityId, AssetId), /// Emitted when an asset compliance for a given asset_id gets paused. - /// (caller DID, AssetID). - AssetCompliancePaused(IdentityId, AssetID), + /// (caller DID, AssetId). + AssetCompliancePaused(IdentityId, AssetId), /// Emitted when compliance requirement get modified/change. - /// (caller DID, AssetID, ComplianceRequirement). - ComplianceRequirementChanged(IdentityId, AssetID, ComplianceRequirement), + /// (caller DID, AssetId, ComplianceRequirement). + ComplianceRequirementChanged(IdentityId, AssetId, ComplianceRequirement), /// Emitted when default claim issuer list for a given asset_id gets added. - /// (caller DID, AssetID, Added TrustedIssuer). - TrustedDefaultClaimIssuerAdded(IdentityId, AssetID, TrustedIssuer), + /// (caller DID, AssetId, Added TrustedIssuer). + TrustedDefaultClaimIssuerAdded(IdentityId, AssetId, TrustedIssuer), /// Emitted when default claim issuer list for a given asset_id get removed. - /// (caller DID, AssetID, Removed TrustedIssuer). - TrustedDefaultClaimIssuerRemoved(IdentityId, AssetID, IdentityId), + /// (caller DID, AssetId, Removed TrustedIssuer). + TrustedDefaultClaimIssuerRemoved(IdentityId, AssetId, IdentityId), } ); @@ -83,14 +83,14 @@ pub trait ComplianceFnConfig { /// Returns `true` if there are no requirements or if any requirement is satisfied. /// Otherwise, returns `false`. fn is_compliant( - asset_id: &AssetID, + asset_id: &AssetId, sender_did: IdentityId, receiver_did: IdentityId, weight_meter: &mut WeightMeter, ) -> Result; fn verify_restriction_granular( - asset_id: &AssetID, + asset_id: &AssetId, from_did_opt: Option, to_did_opt: Option, weight_meter: &mut WeightMeter, @@ -99,7 +99,7 @@ pub trait ComplianceFnConfig { #[cfg(feature = "runtime-benchmarks")] fn setup_asset_compliance( caler_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, n: u32, pause_compliance: bool, ); diff --git a/pallets/common/src/traits/external_agents.rs b/pallets/common/src/traits/external_agents.rs index ddacaa0cab..db03600a75 100644 --- a/pallets/common/src/traits/external_agents.rs +++ b/pallets/common/src/traits/external_agents.rs @@ -1,6 +1,6 @@ use frame_support::{decl_event, weights::Weight}; use polymesh_primitives::agent::{AGId, AgentGroup}; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{EventDid, ExtrinsicPermissions, IdentityId}; pub trait WeightInfo { @@ -26,27 +26,27 @@ decl_event! { pub enum Event { /// An Agent Group was created. /// - /// (Caller DID, AG's AssetID, AG's ID, AG's permissions) - GroupCreated(EventDid, AssetID, AGId, ExtrinsicPermissions), + /// (Caller DID, AG's AssetId, AG's ID, AG's permissions) + GroupCreated(EventDid, AssetId, AGId, ExtrinsicPermissions), /// An Agent Group's permissions was updated. /// - /// (Caller DID, AG's AssetID, AG's ID, AG's new permissions) - GroupPermissionsUpdated(EventDid, AssetID, AGId, ExtrinsicPermissions), + /// (Caller DID, AG's AssetId, AG's ID, AG's new permissions) + GroupPermissionsUpdated(EventDid, AssetId, AGId, ExtrinsicPermissions), /// An agent was added. /// - /// (Caller/Agent DID, Agent's AssetID, Agent's group) - AgentAdded(EventDid, AssetID, AgentGroup), + /// (Caller/Agent DID, Agent's AssetId, Agent's group) + AgentAdded(EventDid, AssetId, AgentGroup), /// An agent was removed. /// - /// (Caller DID, Agent's AssetID, Agent's DID) - AgentRemoved(EventDid, AssetID, IdentityId), + /// (Caller DID, Agent's AssetId, Agent's DID) + AgentRemoved(EventDid, AssetId, IdentityId), /// An agent's group was changed. /// - /// (Caller DID, Agent's AssetID, Agent's DID, The new group of the agent) - GroupChanged(EventDid, AssetID, IdentityId, AgentGroup), + /// (Caller DID, Agent's AssetId, Agent's DID, The new group of the agent) + GroupChanged(EventDid, AssetId, IdentityId, AgentGroup), } } diff --git a/pallets/common/src/traits/nft.rs b/pallets/common/src/traits/nft.rs index c8824f6079..9294c796eb 100644 --- a/pallets/common/src/traits/nft.rs +++ b/pallets/common/src/traits/nft.rs @@ -8,7 +8,7 @@ use polymesh_primitives::nft::NFTCollectionKeys; use frame_support::decl_event; use frame_support::traits::Get; use frame_support::weights::Weight; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::asset_metadata::AssetMetadataKey; use polymesh_primitives::nft::{NFTCollectionId, NFTs}; use polymesh_primitives::{IdentityId, NFTId, PortfolioId, PortfolioUpdateReason}; @@ -33,7 +33,7 @@ pub trait Config: decl_event!( pub enum Event { /// Emitted when a new nft collection is created. - NftCollectionCreated(IdentityId, AssetID, NFTCollectionId), + NftCollectionCreated(IdentityId, AssetId, NFTCollectionId), /// Emitted when NFTs were issued, redeemed or transferred. /// Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`NFTs`], the [`PortfolioId`] of the source, the [`PortfolioId`] /// of the destination and the [`PortfolioUpdateReason`]. @@ -57,14 +57,14 @@ pub trait WeightInfo { pub trait NFTTrait { /// Returns `true` if the given `metadata_key` is a mandatory key for the `asset_id` NFT collection. - fn is_collection_key(asset_id: &AssetID, metadata_key: &AssetMetadataKey) -> bool; + fn is_collection_key(asset_id: &AssetId, metadata_key: &AssetMetadataKey) -> bool; /// Updates the NFTOwner storage after moving funds. - fn move_portfolio_owner(asset_id: AssetID, nft_id: NFTId, new_owner_portfolio: PortfolioId); + fn move_portfolio_owner(asset_id: AssetId, nft_id: NFTId, new_owner_portfolio: PortfolioId); #[cfg(feature = "runtime-benchmarks")] fn create_nft_collection( origin: Origin, - asset_id: Option, + asset_id: Option, nft_type: Option, collection_keys: NFTCollectionKeys, ) -> DispatchResult; diff --git a/pallets/common/src/traits/portfolio.rs b/pallets/common/src/traits/portfolio.rs index d3909ab7fe..7463c9ece6 100644 --- a/pallets/common/src/traits/portfolio.rs +++ b/pallets/common/src/traits/portfolio.rs @@ -22,7 +22,7 @@ use frame_support::decl_event; use frame_support::dispatch::DispatchResult; use frame_support::pallet_prelude::Get; use frame_support::weights::Weight; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ Balance, Fund, FundDescription, IdentityId, Memo, NFTId, PortfolioId, PortfolioName, PortfolioNumber, SecondaryKey, @@ -48,20 +48,20 @@ pub trait PortfolioSubTrait { /// /// # Arguments /// * `portfolio` - Portfolio to lock tokens - /// * `asset_id` - [`AssetID`] of the token to lock + /// * `asset_id` - [`AssetId`] of the token to lock /// * `amount` - Amount of tokens to lock - fn lock_tokens(portfolio: &PortfolioId, asset_id: &AssetID, amount: Balance) -> DispatchResult; + fn lock_tokens(portfolio: &PortfolioId, asset_id: &AssetId, amount: Balance) -> DispatchResult; /// Unlocks some tokens of a portfolio /// /// # Arguments /// * `portfolio` - Portfolio to unlock tokens - /// * asset_id` - [`AssetID`] of the token to unlock + /// * asset_id` - [`AssetId`] of the token to unlock /// * `amount` - Amount of tokens to unlock fn unlock_tokens( portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> DispatchResult; @@ -82,21 +82,21 @@ pub trait PortfolioSubTrait { /// /// # Arguments /// * `portfolio_id` - PortfolioId that contains the nft to be locked. - /// asset_id` - [`AssetID`] of the NFT. + /// asset_id` - [`AssetId`] of the NFT. /// * `nft_id` - the id of the nft to be unlocked. - fn lock_nft(portfolio_id: &PortfolioId, asset_id: &AssetID, nft_id: &NFTId) -> DispatchResult; + fn lock_nft(portfolio_id: &PortfolioId, asset_id: &AssetId, nft_id: &NFTId) -> DispatchResult; /// Unlocks the given nft. /// /// # Arguments /// * `portfolio_id` - PortfolioId that contains the locked nft. - /// asset_id` - [`AssetID`] of the NFT. + /// asset_id` - [`AssetId`] of the NFT. /// * `nft_id` - the id of the nft to be unlocked. - fn unlock_nft(portfolio_id: &PortfolioId, asset_id: &AssetID, nft_id: &NFTId) + fn unlock_nft(portfolio_id: &PortfolioId, asset_id: &AssetId, nft_id: &NFTId) -> DispatchResult; /// Returns `true` if the portfolio has pre-approved the receivement of `asset_id`, otherwise returns `false`. - fn skip_portfolio_affirmation(portfolio_id: &PortfolioId, asset_id: &AssetID) -> bool; + fn skip_portfolio_affirmation(portfolio_id: &PortfolioId, asset_id: &AssetId) -> bool; } pub trait WeightInfo { @@ -185,22 +185,22 @@ decl_event! { /// # Parameters /// * [`IdentityId`] of the caller. /// * [`PortfolioId`] that will receive assets without explicit affirmation. - /// * [`AssetID`] of the asset that has been exempt from explicit affirmation. + /// * [`AssetId`] of the asset that has been exempt from explicit affirmation. PreApprovedPortfolio( IdentityId, PortfolioId, - AssetID + AssetId ), /// A portfolio has removed the approval of an asset. /// /// # Parameters /// * [`IdentityId`] of the caller. /// * [`PortfolioId`] that had its pre approval revoked. - /// * [`AssetID`] of the asset that had its pre approval revoked. + /// * [`AssetId`] of the asset that had its pre approval revoked. RevokePreApprovedPortfolio( IdentityId, PortfolioId, - AssetID + AssetId ) } } diff --git a/pallets/common/src/traits/settlement.rs b/pallets/common/src/traits/settlement.rs index 0a598db9e8..7c08635274 100644 --- a/pallets/common/src/traits/settlement.rs +++ b/pallets/common/src/traits/settlement.rs @@ -4,7 +4,7 @@ use frame_support::weights::Weight; use sp_std::collections::btree_set::BTreeSet; use sp_std::vec::Vec; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::settlement::{ AffirmationCount, AssetCount, InstructionId, Leg, LegId, ReceiptMetadata, SettlementType, VenueDetails, VenueId, VenueType, @@ -39,20 +39,20 @@ decl_event!( AccountId, Option, ), - /// Venue filtering has been enabled or disabled for an asset (did, AssetID, filtering_enabled) - VenueFiltering(IdentityId, AssetID, bool), - /// Venues added to allow list (did, AssetID, vec) - VenuesAllowed(IdentityId, AssetID, Vec), - /// Venues added to block list (did, AssetID, vec) - VenuesBlocked(IdentityId, AssetID, Vec), + /// Venue filtering has been enabled or disabled for an asset (did, AssetId, filtering_enabled) + VenueFiltering(IdentityId, AssetId, bool), + /// Venues added to allow list (did, AssetId, vec) + VenuesAllowed(IdentityId, AssetId, Vec), + /// Venues added to block list (did, AssetId, vec) + VenuesBlocked(IdentityId, AssetId, Vec), /// Execution of a leg failed (did, instruction_id, leg_id) LegFailedExecution(IdentityId, InstructionId, LegId), /// Instruction failed execution (did, instruction_id) InstructionFailed(IdentityId, InstructionId), /// Instruction executed successfully(did, instruction_id) InstructionExecuted(IdentityId, InstructionId), - /// Venue not part of the token's allow list (did, AssetID, venue_id) - VenueUnauthorized(IdentityId, AssetID, VenueId), + /// Venue not part of the token's allow list (did, AssetId, venue_id) + VenueUnauthorized(IdentityId, AssetId, VenueId), /// Scheduling of instruction fails. SchedulingFailed(InstructionId, DispatchError), /// Instruction is rescheduled. diff --git a/pallets/common/src/traits/statistics.rs b/pallets/common/src/traits/statistics.rs index 92214b944b..d087b6e306 100644 --- a/pallets/common/src/traits/statistics.rs +++ b/pallets/common/src/traits/statistics.rs @@ -2,7 +2,7 @@ use crate::asset::AssetFnTrait; use frame_support::decl_event; use frame_support::traits::Get; use frame_support::weights::Weight; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ statistics::{StatType, StatUpdate}, transfer_compliance::{TransferCondition, TransferConditionExemptKey}, @@ -52,20 +52,20 @@ decl_event!( pub enum Event { /// Stat types added to asset. /// - /// (Caller DID, AssetID, Stat types) - StatTypesAdded(IdentityId, AssetID, Vec), + /// (Caller DID, AssetId, Stat types) + StatTypesAdded(IdentityId, AssetId, Vec), /// Stat types removed from asset. /// - /// (Caller DID, AssetID, Stat types) - StatTypesRemoved(IdentityId, AssetID, Vec), + /// (Caller DID, AssetId, Stat types) + StatTypesRemoved(IdentityId, AssetId, Vec), /// Asset stats updated. /// - /// (Caller DID, AssetID, Stat type, Updates) - AssetStatsUpdated(IdentityId, AssetID, StatType, Vec), + /// (Caller DID, AssetId, Stat type, Updates) + AssetStatsUpdated(IdentityId, AssetId, StatType, Vec), /// Set Transfer compliance rules for asset. /// - /// (Caller DID, AssetID, Transfer conditions) - SetAssetTransferCompliance(IdentityId, AssetID, Vec), + /// (Caller DID, AssetId, Transfer conditions) + SetAssetTransferCompliance(IdentityId, AssetId, Vec), /// Add `IdentityId`s exempt for transfer conditions matching exempt key. /// /// (Caller DID, Exempt key, Entities) diff --git a/pallets/compliance-manager/src/benchmarking.rs b/pallets/compliance-manager/src/benchmarking.rs index 29b2d04826..e951e3a3fb 100644 --- a/pallets/compliance-manager/src/benchmarking.rs +++ b/pallets/compliance-manager/src/benchmarking.rs @@ -120,7 +120,7 @@ fn split_conditions(count: u32) -> (u32, u32) { pub fn create_and_issue_sample_asset( asset_owner: &User, asset_name: Vec, -) -> AssetID { +) -> AssetId { let asset_id = T::Asset::generate_asset_id(asset_owner.account()); T::Asset::create_asset( asset_owner.origin.clone().into(), @@ -146,7 +146,7 @@ pub fn create_and_issue_sample_asset( /// This struct helps to simplify the parameter copy/pass during the benchmarks. struct ComplianceRequirementInfo { pub owner: User, - pub asset_id: AssetID, + pub asset_id: AssetId, pub sender_conditions: Vec, pub receiver_conditions: Vec, } @@ -249,7 +249,7 @@ fn add_identity_claim(id: IdentityId, claim: Claim, trusted_issuer_id /// Adds `external_agent_id` as an enternal agent for `ticker`. fn add_external_agent( - asset_id: AssetID, + asset_id: AssetId, ticker_owner: IdentityId, external_agent_id: IdentityId, external_agent_origin: T::RuntimeOrigin, @@ -269,7 +269,7 @@ fn add_external_agent( fn setup_is_condition_satisfied( sender: &User, - asset_id: AssetID, + asset_id: AssetId, n_claims: u32, n_issuers: u32, read_trusted_issuers_storage: bool, @@ -316,7 +316,7 @@ where /// Adds `n` requirements for `asset_id` and pauses compliance if `pause_compliance` is true. pub fn setup_asset_compliance( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, n: u32, pause_compliance: bool, ) { diff --git a/pallets/compliance-manager/src/lib.rs b/pallets/compliance-manager/src/lib.rs index 819181dcda..f80f6fcd71 100644 --- a/pallets/compliance-manager/src/lib.rs +++ b/pallets/compliance-manager/src/lib.rs @@ -89,7 +89,7 @@ use polymesh_common_utilities::protocol_fee::{ChargeProtocolFee, ProtocolOp}; pub use polymesh_common_utilities::traits::compliance_manager::{ ComplianceFnConfig, Config, Event, WeightInfo, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::compliance_manager::{ AssetCompliance, AssetComplianceResult, ComplianceReport, ComplianceRequirement, ConditionReport, ConditionResult, RequirementReport, @@ -106,10 +106,10 @@ storage_migration_ver!(1); decl_storage! { trait Store for Module as ComplianceManager { - /// Compliance for an asset ([`AssetID`] -> [`AssetCompliance`]) - pub AssetCompliances get(fn asset_compliance): map hasher(blake2_128_concat) AssetID => AssetCompliance; - /// List of trusted claim issuer [`AssetID`] -> Issuer Identity - pub TrustedClaimIssuer get(fn trusted_claim_issuer): map hasher(blake2_128_concat) AssetID => Vec; + /// Compliance for an asset ([`AssetId`] -> [`AssetCompliance`]) + pub AssetCompliances get(fn asset_compliance): map hasher(blake2_128_concat) AssetId => AssetCompliance; + /// List of trusted claim issuer [`AssetId`] -> Issuer Identity + pub TrustedClaimIssuer get(fn trusted_claim_issuer): map hasher(blake2_128_concat) AssetId => Vec; /// Storage version. StorageVersion get(fn storage_version) build(|_| Version::new(1)): Version; } @@ -164,7 +164,7 @@ decl_module! { #[weight = ::WeightInfo::add_compliance_requirement_full(&sender_conditions, &receiver_conditions)] pub fn add_compliance_requirement( origin, - asset_id: AssetID, + asset_id: AssetId, sender_conditions: Vec, receiver_conditions: Vec ) -> DispatchResult { @@ -182,7 +182,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_compliance_requirement()] - pub fn remove_compliance_requirement(origin, asset_id: AssetID, id: u32) { + pub fn remove_compliance_requirement(origin, asset_id: AssetId, id: u32) { let did = >::ensure_perms(origin, asset_id)?; AssetCompliances::try_mutate(asset_id, |AssetCompliance { requirements, .. }| { @@ -211,7 +211,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::replace_asset_compliance_full(&asset_compliance)] - pub fn replace_asset_compliance(origin, asset_id: AssetID, asset_compliance: Vec) { + pub fn replace_asset_compliance(origin, asset_id: AssetId, asset_compliance: Vec) { let did = >::ensure_perms(origin, asset_id)?; // Ensure `Scope::Custom(..)`s are limited. @@ -244,7 +244,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::reset_asset_compliance()] - pub fn reset_asset_compliance(origin, asset_id: AssetID) { + pub fn reset_asset_compliance(origin, asset_id: AssetId) { let did = >::ensure_perms(origin, asset_id)?; AssetCompliances::remove(asset_id); Self::deposit_event(Event::AssetComplianceReset(did, asset_id)); @@ -259,7 +259,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::pause_asset_compliance()] - pub fn pause_asset_compliance(origin, asset_id: AssetID) { + pub fn pause_asset_compliance(origin, asset_id: AssetId) { let did = Self::pause_resume_asset_compliance(origin, asset_id, true)?; Self::deposit_event(Event::AssetCompliancePaused(did, asset_id)); } @@ -273,7 +273,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::resume_asset_compliance()] - pub fn resume_asset_compliance(origin, asset_id: AssetID) { + pub fn resume_asset_compliance(origin, asset_id: AssetId) { let did = Self::pause_resume_asset_compliance(origin, asset_id, false)?; Self::deposit_event(Event::AssetComplianceResumed(did, asset_id)); } @@ -288,7 +288,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::add_default_trusted_claim_issuer()] - pub fn add_default_trusted_claim_issuer(origin, asset_id: AssetID, issuer: TrustedIssuer) -> DispatchResult { + pub fn add_default_trusted_claim_issuer(origin, asset_id: AssetId, issuer: TrustedIssuer) -> DispatchResult { let caller_did = >::ensure_perms(origin, asset_id)?; Self::base_add_default_trusted_claim_issuer(caller_did, asset_id, issuer) } @@ -303,7 +303,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::remove_default_trusted_claim_issuer()] - pub fn remove_default_trusted_claim_issuer(origin, asset_id: AssetID, issuer: IdentityId) { + pub fn remove_default_trusted_claim_issuer(origin, asset_id: AssetId, issuer: IdentityId) { let did = >::ensure_perms(origin, asset_id)?; TrustedClaimIssuer::try_mutate(asset_id, |issuers| { let len = issuers.len(); @@ -324,7 +324,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::change_compliance_requirement_full(&new_req)] - pub fn change_compliance_requirement(origin, asset_id: AssetID, new_req: ComplianceRequirement) { + pub fn change_compliance_requirement(origin, asset_id: AssetId, new_req: ComplianceRequirement) { let did = >::ensure_perms(origin, asset_id)?; // Ensure `Scope::Custom(..)`s are limited. @@ -356,7 +356,7 @@ impl Module { /// Adds a compliance requirement to the given `asset_id`. fn base_add_compliance_requirement( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, sender_conditions: Vec, receiver_conditions: Vec, ) -> DispatchResult { @@ -394,7 +394,7 @@ impl Module { /// Adds a `issuer` as a default trusted claim issuer for `asset_id`. fn base_add_default_trusted_claim_issuer( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, issuer: TrustedIssuer, ) -> DispatchResult { ensure!( @@ -456,7 +456,7 @@ impl Module { /// or otherwise returns the default trusted issuers for `asset_id`. /// Defaults are cached in `slot`. fn issuers_for<'a>( - asset_id: &AssetID, + asset_id: &AssetId, condition: &'a Condition, slot: &'a mut Option>, ) -> &'a [TrustedIssuer] { @@ -471,7 +471,7 @@ impl Module { /// Default trusted issuers, if fetched, are cached in `slot`. fn fetch_context<'a>( id: IdentityId, - asset_id: &AssetID, + asset_id: &AssetId, slot: &'a mut Option>, condition: &'a Condition, weight_meter: &mut WeightMeter, @@ -532,7 +532,7 @@ impl Module { /// Loads the context for each condition in `conditions` and verifies that all of them evaluate to `true`. fn are_all_conditions_satisfied( - asset_id: &AssetID, + asset_id: &AssetId, did: IdentityId, conditions: &[Condition], weight_meter: &mut WeightMeter, @@ -548,7 +548,7 @@ impl Module { /// Checks whether the given condition is satisfied or not. fn is_condition_satisfied( - asset_id: &AssetID, + asset_id: &AssetId, did: IdentityId, condition: &Condition, slot: &mut Option>, @@ -563,7 +563,7 @@ impl Module { /// As a side-effect, each condition will be updated with its result, /// implying strict (non-lazy) evaluation of the conditions. fn evaluate_conditions( - asset_id: &AssetID, + asset_id: &AssetId, did: IdentityId, conditions: &mut [ConditionResult], weight_meter: &mut WeightMeter, @@ -586,7 +586,7 @@ impl Module { /// Pauses or resumes the asset compliance. fn pause_resume_asset_compliance( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, pause: bool, ) -> Result { let did = >::ensure_perms(origin, asset_id)?; @@ -595,7 +595,7 @@ impl Module { } /// Compute the id of the last requirement in an asset's compliance rules. - fn get_latest_requirement_id(asset_id: AssetID) -> u32 { + fn get_latest_requirement_id(asset_id: AssetId) -> u32 { Self::asset_compliance(asset_id) .requirements .last() @@ -607,7 +607,7 @@ impl Module { /// is within the maximum condition complexity allowed. pub fn verify_compliance_complexity( asset_compliance: &[ComplianceRequirement], - asset_id: AssetID, + asset_id: AssetId, add: usize, ) -> DispatchResult { let count = TrustedClaimIssuer::decode_len(asset_id) @@ -680,7 +680,7 @@ impl Module { // Returns `true` if any requirement is satisfied, otherwise returns `false`. fn is_any_requirement_compliant( - asset_id: &AssetID, + asset_id: &AssetId, requirements: &[ComplianceRequirement], sender_did: IdentityId, receiver_did: IdentityId, @@ -709,7 +709,7 @@ impl Module { impl ComplianceFnConfig for Module { fn is_compliant( - asset_id: &AssetID, + asset_id: &AssetId, sender_did: IdentityId, receiver_did: IdentityId, weight_meter: &mut WeightMeter, @@ -734,7 +734,7 @@ impl ComplianceFnConfig for Module { /// this does not care if the requirements are paused or not. It is meant to be /// called only in failure conditions fn verify_restriction_granular( - asset_id: &AssetID, + asset_id: &AssetId, from_did_opt: Option, to_did_opt: Option, weight_meter: &mut WeightMeter, @@ -764,7 +764,7 @@ impl ComplianceFnConfig for Module { #[cfg(feature = "runtime-benchmarks")] fn setup_asset_compliance( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, n: u32, pause_compliance: bool, ) { @@ -779,7 +779,7 @@ impl ComplianceFnConfig for Module { impl Module { /// Returns a [`ComplianceReport`] for the given `asset_id`. pub fn compliance_report( - asset_id: &AssetID, + asset_id: &AssetId, sender_identity: &IdentityId, receiver_identity: &IdentityId, weight_meter: &mut WeightMeter, @@ -834,7 +834,7 @@ impl Module { /// Returns all [`ConditionReport`] for the given `conditions`. fn get_conditions_report( - asset_id: &AssetID, + asset_id: &AssetId, identity: IdentityId, conditions: Vec, requirement_satisfied: &mut bool, diff --git a/pallets/compliance-manager/src/migrations.rs b/pallets/compliance-manager/src/migrations.rs index 55b886c51c..83892d9b9c 100644 --- a/pallets/compliance-manager/src/migrations.rs +++ b/pallets/compliance-manager/src/migrations.rs @@ -64,12 +64,12 @@ mod v0 { decl_storage! { trait Store for Module as ComplianceManager { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. // The Scope type, which is inside the compliance codition, has also been changed. pub OldAssetCompliances get(fn asset_compliance): map hasher(blake2_128_concat) Ticker => AssetCompliance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldTrustedClaimIssuer get(fn trusted_claim_issuer): map hasher(blake2_128_concat) Ticker => Vec; } @@ -84,7 +84,7 @@ impl From for Scope { fn from(v0_scope: v0::Scope) -> Self { match v0_scope { v0::Scope::Identity(did) => Scope::Identity(did), - v0::Scope::Ticker(ticker) => Scope::Asset(AssetID::from(ticker)), + v0::Scope::Ticker(ticker) => Scope::Asset(AssetId::from(ticker)), v0::Scope::Custom(bytes) => Scope::Custom(bytes), } } @@ -179,7 +179,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AssetCompliances::insert(asset_id, AssetCompliance::from(compliance)); }); log::info!("Migrated {:?} Compliance.AssetCompliances entries.", count); @@ -194,7 +194,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); TrustedClaimIssuer::insert(asset_id, trusted_issuers); }); log::info!( diff --git a/pallets/contracts/src/benchmarking.rs b/pallets/contracts/src/benchmarking.rs index a65f1c0025..9b5c9da51b 100644 --- a/pallets/contracts/src/benchmarking.rs +++ b/pallets/contracts/src/benchmarking.rs @@ -33,7 +33,7 @@ use polymesh_common_utilities::benchs::{cdd_provider, user, AccountIdOf, User, U use polymesh_common_utilities::constants::currency::POLY; use polymesh_common_utilities::group::GroupTrait; use polymesh_common_utilities::TestUtilsFn; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::identity::limits::{ MAX_ASSETS, MAX_EXTRINSICS, MAX_PALLETS, MAX_PORTFOLIOS, }; @@ -160,7 +160,7 @@ fn secondary_key_permission( n_extrinsics: u64, n_pallets: u64, ) -> Permissions { - let asset = AssetPermissions::elems((0..n_assets).map(|i| AssetID::new([i as u8; 16]))); + let asset = AssetPermissions::elems((0..n_assets).map(|i| AssetId::new([i as u8; 16]))); let portfolio = PortfolioPermissions::elems( (0..n_portfolios).map(|did| PortfolioId::user_portfolio(did.into(), PortfolioNumber(0))), ); diff --git a/pallets/corporate-actions/src/benchmarking.rs b/pallets/corporate-actions/src/benchmarking.rs index c0d9076ac6..106d1e6133 100644 --- a/pallets/corporate-actions/src/benchmarking.rs +++ b/pallets/corporate-actions/src/benchmarking.rs @@ -20,7 +20,7 @@ use frame_system::RawOrigin; use pallet_asset::benchmarking::make_document; use polymesh_common_utilities::benchs::{create_and_issue_sample_asset, user, AccountIdOf, User}; use polymesh_common_utilities::TestUtilsFn; -use polymesh_primitives::asset::{AssetID, AssetName}; +use polymesh_primitives::asset::{AssetId, AssetName}; use polymesh_primitives::PortfolioKind; use crate::*; @@ -38,7 +38,7 @@ const RD_SPEC2: Option = Some(RecordDateSpec::Scheduled(3000)); // NOTE(Centril): A non-owner CAA is the less complex code path. // Therefore, in general, we'll be using the owner as the CAA. -fn setup>>() -> (User, AssetID) { +fn setup>>() -> (User, AssetId) { >::set(1000u32.into()); let owner = user("owner", SEED); @@ -72,7 +72,7 @@ pub(crate) fn did_whts>>(n: u32) -> Vec<( } fn init_did_whts>>( - asset_id: AssetID, + asset_id: AssetId, n: u32, ) -> Vec<(IdentityId, Tax)> { let mut whts = did_whts::(n); @@ -88,7 +88,7 @@ fn details(len: u32) -> CADetails { .into() } -fn add_docs(origin: &T::RuntimeOrigin, asset_id: AssetID, n: u32) -> Vec { +fn add_docs(origin: &T::RuntimeOrigin, asset_id: AssetId, n: u32) -> Vec { let ids = (0..n).map(DocumentId).collect::>(); let docs = (0..n).map(|_| make_document()).collect::>(); >::add_documents(origin.clone(), docs, asset_id).unwrap(); @@ -139,7 +139,7 @@ fn attach(owner: &User, ca_id: CAId) { >::attach_ballot(owner.origin().into(), ca_id, range, meta, true).unwrap(); } -pub(crate) fn currency(owner: &User) -> AssetID { +pub(crate) fn currency(owner: &User) -> AssetId { let asset_id = Asset::::generate_asset_id(owner.account(), false); Asset::::create_asset( diff --git a/pallets/corporate-actions/src/distribution/benchmarking.rs b/pallets/corporate-actions/src/distribution/benchmarking.rs index 84ff0b43dd..aea34cb5de 100644 --- a/pallets/corporate-actions/src/distribution/benchmarking.rs +++ b/pallets/corporate-actions/src/distribution/benchmarking.rs @@ -30,7 +30,7 @@ const MAX_DID_WHT_IDS: u32 = 1000; fn portfolio( owner: &User, pnum: PortfolioNumber, - asset_id: AssetID, + asset_id: AssetId, amount: Balance, ) { let did = owner.did(); @@ -48,7 +48,7 @@ fn portfolio( .unwrap(); } -fn dist>>(target_ids: u32) -> (User, CAId, AssetID) { +fn dist>>(target_ids: u32) -> (User, CAId, AssetId) { let (owner, ca_id) = setup_ca::(CAKind::UnpredictableBenefit); let currency = currency::(&owner); diff --git a/pallets/corporate-actions/src/distribution/mod.rs b/pallets/corporate-actions/src/distribution/mod.rs index 39dda9aa96..0fc0f411d5 100644 --- a/pallets/corporate-actions/src/distribution/mod.rs +++ b/pallets/corporate-actions/src/distribution/mod.rs @@ -83,7 +83,7 @@ use polymesh_common_utilities::{ protocol_fee::{ChargeProtocolFee, ProtocolOp}, with_transaction, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ storage_migrate_on, storage_migration_ver, Balance, EventDid, IdentityId, Moment, PortfolioId, PortfolioNumber, SecondaryKey, WeightMeter, @@ -113,7 +113,7 @@ pub struct Distribution { /// The portfolio to distribute from. pub from: PortfolioId, /// The currency that payouts happen in. - pub currency: AssetID, + pub currency: AssetId, /// Amount per share to pay out, in per-million, /// i.e. `1 / 10^6`th of one `currency` token. pub per_share: Balance, @@ -223,7 +223,7 @@ decl_module! { origin, ca_id: CAId, portfolio: Option, - currency: AssetID, + currency: AssetId, per_share: Balance, amount: Balance, payment_at: Moment, @@ -398,7 +398,7 @@ impl Module { origin: T::RuntimeOrigin, ca_id: CAId, portfolio: Option, - currency: AssetID, + currency: AssetId, per_share: Balance, amount: Balance, payment_at: Moment, @@ -629,7 +629,7 @@ impl Module { secondary_key: Option>, ca_id: CAId, portfolio: Option, - currency: AssetID, + currency: AssetId, per_share: Balance, amount: Balance, payment_at: Moment, diff --git a/pallets/corporate-actions/src/lib.rs b/pallets/corporate-actions/src/lib.rs index 6215285079..c2b23bb562 100644 --- a/pallets/corporate-actions/src/lib.rs +++ b/pallets/corporate-actions/src/lib.rs @@ -109,7 +109,7 @@ use polymesh_common_utilities::{ balances::Config as BalancesConfig, identity::Config as IdentityConfig, traits::asset, traits::checkpoint::ScheduleId, with_transaction, GC_DID, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ asset::CheckpointId, impl_checked_inc, storage_migrate_on, storage_migration_ver, Balance, DocumentId, EventDid, IdentityId, Moment, PortfolioNumber, @@ -246,7 +246,7 @@ pub enum RecordDateSpec { } /// Details of a generic CA. -/// The `(AssetID, ID)` denoting a unique identifier for the CA is stored as a key outside. +/// The `(AssetId, ID)` denoting a unique identifier for the CA is stored as a key outside. #[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, Debug)] pub struct CorporateAction { /// The kind of CA that this is. @@ -275,8 +275,8 @@ impl CorporateAction { } } -/// A `AssetID`-local CA ID. -/// By *local*, we mean that the same number might be used for a different `AssetID` +/// A `AssetId`-local CA ID. +/// By *local*, we mean that the same number might be used for a different `AssetId` /// to uniquely identify a different CA. #[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, TypeInfo, Default, Debug)] pub struct LocalCAId(pub u32); @@ -285,15 +285,15 @@ impl_checked_inc!(LocalCAId); /// A unique global identifier for a CA. #[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, TypeInfo, Debug)] pub struct CAId { - /// The `[`AssetID`]` component used to disambiguate the `local` one. - pub asset_id: AssetID, - /// The per-`AssetID` local identifier. + /// The `[`AssetId`]` component used to disambiguate the `local` one. + pub asset_id: AssetId, + /// The per-`AssetId` local identifier. pub local_id: LocalCAId, } #[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, Debug)] pub struct InitiateCorporateActionArgs { - asset_id: AssetID, + asset_id: AssetId, kind: CAKind, decl_date: Moment, record_date: Option, @@ -362,8 +362,8 @@ decl_storage! { /// The identities targeted by default for CAs for this asset, /// either to be excluded or included. /// - /// (AssetID => target identities) - pub DefaultTargetIdentities get(fn default_target_identities): map hasher(blake2_128_concat) AssetID => TargetIdentities; + /// (AssetId => target identities) + pub DefaultTargetIdentities get(fn default_target_identities): map hasher(blake2_128_concat) AssetId => TargetIdentities; /// The default amount of tax to withhold ("withholding tax", WT) for this asset when distributing dividends. /// @@ -372,32 +372,32 @@ decl_storage! { /// Alice lives in Sweden, so Skatteverket (the Swedish tax authority) wants 30% of that. /// Then those 100 * 30% are withheld from Alice, and ACME will send them to Skatteverket. /// - /// (AssetID => % to withhold) - pub DefaultWithholdingTax get(fn default_withholding_tax): map hasher(blake2_128_concat) AssetID => Tax; + /// (AssetId => % to withhold) + pub DefaultWithholdingTax get(fn default_withholding_tax): map hasher(blake2_128_concat) AssetId => Tax; - /// The amount of tax to withhold ("withholding tax", WT) for a certain AssetID x DID. + /// The amount of tax to withhold ("withholding tax", WT) for a certain AssetId x DID. /// If an entry exists for a certain DID, it overrides the default in `DefaultWithholdingTax`. /// - /// (AssetID => [(did, % to withhold)] - pub DidWithholdingTax get(fn did_withholding_tax): map hasher(blake2_128_concat) AssetID => Vec<(IdentityId, Tax)>; + /// (AssetId => [(did, % to withhold)] + pub DidWithholdingTax get(fn did_withholding_tax): map hasher(blake2_128_concat) AssetId => Vec<(IdentityId, Tax)>; - /// The next per-`AssetID` CA ID in the sequence. - /// The full ID is defined as a combination of `AssetID` and a number in this sequence. - pub CAIdSequence get(fn ca_id_sequence): map hasher(blake2_128_concat) AssetID => LocalCAId; + /// The next per-`AssetId` CA ID in the sequence. + /// The full ID is defined as a combination of `AssetId` and a number in this sequence. + pub CAIdSequence get(fn ca_id_sequence): map hasher(blake2_128_concat) AssetId => LocalCAId; /// All recorded CAs thus far. /// Only generic information is stored here. /// Specific `CAKind`s, e.g., benefits and corporate ballots, may use additional on-chain storage. /// - /// (AssetID => local ID => the corporate action) + /// (AssetId => local ID => the corporate action) pub CorporateActions get(fn corporate_actions): - double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) LocalCAId => Option; + double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) LocalCAId => Option; /// Associations from CAs to `Document`s via their IDs. /// (CAId => [DocumentId]) /// - /// The `CorporateActions` map stores `AssetID => LocalId => The CA`, - /// so we can infer `AssetID => CAId`. Therefore, we don't need a double map. + /// The `CorporateActions` map stores `AssetId => LocalId => The CA`, + /// so we can infer `AssetId => CAId`. Therefore, we don't need a double map. pub CADocLink get(fn ca_doc_link): map hasher(blake2_128_concat) CAId => Vec; /// Associates details in free-form text with a CA by its ID. @@ -453,7 +453,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::set_default_targets(targets.identities.len() as u32)] - pub fn set_default_targets(origin, asset_id: AssetID, targets: TargetIdentities) { + pub fn set_default_targets(origin, asset_id: AssetId, targets: TargetIdentities) { let agent = >::ensure_perms(origin, asset_id)?; Self::ensure_target_ids_limited(&targets)?; @@ -479,7 +479,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::set_default_withholding_tax()] - pub fn set_default_withholding_tax(origin, asset_id: AssetID, tax: Tax) { + pub fn set_default_withholding_tax(origin, asset_id: AssetId, tax: Tax) { let agent = >::ensure_perms(origin, asset_id)?; DefaultWithholdingTax::mutate(asset_id, |slot| *slot = tax); Self::deposit_event(Event::DefaultWithholdingTaxChanged(agent, asset_id, tax)); @@ -502,7 +502,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::set_did_withholding_tax(T::MaxDidWhts::get())] - pub fn set_did_withholding_tax(origin, asset_id: AssetID, taxed_did: IdentityId, tax: Option) { + pub fn set_did_withholding_tax(origin, asset_id: AssetId, taxed_did: IdentityId, tax: Option) { let agent = >::ensure_perms(origin, asset_id)?; DidWithholdingTax::try_mutate(asset_id, |whts| -> DispatchResult { // We maintain sorted order, so we get O(log n) search but O(n) insertion/deletion. @@ -554,7 +554,7 @@ decl_module! { #[weight = initiate_corporate_action_weight::(targets, withholding_tax)] pub fn initiate_corporate_action( origin, - asset_id: AssetID, + asset_id: AssetId, kind: CAKind, decl_date: Moment, record_date: Option, @@ -720,7 +720,7 @@ decl_module! { origin, ca_args: InitiateCorporateActionArgs, portfolio: Option, - currency: AssetID, + currency: AssetId, per_share: Balance, amount: Balance, payment_at: Moment, @@ -778,14 +778,14 @@ decl_event! { /// (GC DID, new length) MaxDetailsLengthChanged(IdentityId, u32), /// The set of default `TargetIdentities` for the asset changed. - /// (Agent DID, AssetID, New TargetIdentities) - DefaultTargetIdentitiesChanged(IdentityId, AssetID, TargetIdentities), + /// (Agent DID, AssetId, New TargetIdentities) + DefaultTargetIdentitiesChanged(IdentityId, AssetId, TargetIdentities), /// The default withholding tax for the asset changed. - /// (Agent DID, AssetID, New Tax). - DefaultWithholdingTaxChanged(IdentityId, AssetID, Tax), + /// (Agent DID, AssetId, New Tax). + DefaultWithholdingTaxChanged(IdentityId, AssetId, Tax), /// The withholding tax specific to a DID for the asset changed. - /// (Agent DID, AssetID, Taxed DID, New Tax). - DidWithholdingTaxChanged(IdentityId, AssetID, IdentityId, Option), + /// (Agent DID, AssetId, Taxed DID, New Tax). + DidWithholdingTaxChanged(IdentityId, AssetId, IdentityId, Option), /// A CA was initiated. /// (Agent DID, CA id, the CA, the CA details) CAInitiated(EventDid, CAId, CorporateAction, CADetails), @@ -833,7 +833,7 @@ decl_error! { impl Module { fn unsafe_initiate_corporate_action( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, kind: CAKind, decl_date: Moment, record_date: Option, @@ -996,7 +996,7 @@ impl Module { /// In the process, create a checkpoint schedule if needed. fn handle_record_date( caller_did: IdentityId, - asset_id: AssetID, + asset_id: AssetId, date: RecordDateSpec, ) -> Result { let (date, checkpoint) = match date { diff --git a/pallets/corporate-actions/src/migrations.rs b/pallets/corporate-actions/src/migrations.rs index dca0f9d594..f0fb5dcf82 100644 --- a/pallets/corporate-actions/src/migrations.rs +++ b/pallets/corporate-actions/src/migrations.rs @@ -16,23 +16,23 @@ pub(crate) mod v0 { decl_storage! { trait Store for Module as CorporateAction { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldDefaultTargetIdentities get(fn default_target_identities): map hasher(blake2_128_concat) Ticker => TargetIdentities; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldDefaultWithholdingTax get(fn default_withholding_tax): map hasher(blake2_128_concat) Ticker => Tax; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldDidWithholdingTax get(fn did_withholding_tax): map hasher(blake2_128_concat) Ticker => Vec<(IdentityId, Tax)>; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldCAIdSequence get(fn ca_id_sequence): map hasher(blake2_128_concat) Ticker => LocalCAId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldCorporateActions get(fn corporate_actions): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) LocalCAId => Option; @@ -54,7 +54,7 @@ pub(crate) mod v0 { impl From for CAId { fn from(v0_ca_id: v0::CAId) -> Self { Self { - asset_id: AssetID::from(v0_ca_id.ticker), + asset_id: AssetId::from(v0_ca_id.ticker), local_id: v0_ca_id.local_id, } } @@ -74,7 +74,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); DefaultTargetIdentities::insert(asset_id, target_identities); }); log::info!("Migrated {:?} CA.DefaultTargetIdentities entries.", count); @@ -89,7 +89,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); DefaultWithholdingTax::insert(asset_id, tax); }); log::info!("Migrated {:?} CA.DefaultWithholdingTax entries.", count); @@ -104,7 +104,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); DidWithholdingTax::insert(asset_id, id_tax); }); log::info!("Migrated {:?} CA.DidWithholdingTax entries.", count); @@ -119,7 +119,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CAIdSequence::insert(asset_id, id_tax); }); log::info!("Migrated {:?} CA.CAIdSequence entries.", count); @@ -134,7 +134,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CorporateActions::insert(asset_id, local_id, ca); }); log::info!("Migrated {:?} CA.CorporateActions entries.", count); diff --git a/pallets/external-agents/src/benchmarking.rs b/pallets/external-agents/src/benchmarking.rs index e9ff944643..9790055d6e 100644 --- a/pallets/external-agents/src/benchmarking.rs +++ b/pallets/external-agents/src/benchmarking.rs @@ -24,7 +24,7 @@ use sp_std::prelude::*; pub(crate) const SEED: u32 = 0; const MAX_PALLETS: u32 = 19; -fn setup>>() -> (User, AssetID) { +fn setup>>() -> (User, AssetId) { let owner = user("owner", SEED); let asset_id = create_and_issue_sample_asset::(&owner, true, None, b"SampleAsset", false); (owner, asset_id) @@ -38,7 +38,7 @@ fn perms(n: u32) -> ExtrinsicPermissions { fn add_auth>>( owner: &User, - asset_id: AssetID, + asset_id: AssetId, ) -> (User, u64) { let other = user("other", SEED); let auth_id = pallet_identity::Module::::add_auth( @@ -51,14 +51,14 @@ fn add_auth>>( (other, auth_id) } -fn setup_removal>>() -> (User, User, AssetID) { +fn setup_removal>>() -> (User, User, AssetId) { let (owner, asset_id) = setup::(); let (other, auth_id) = add_auth::(&owner, asset_id); Module::::accept_become_agent(other.origin().into(), auth_id).unwrap(); (owner, other, asset_id) } -fn custom_group(owner: User, asset_id: AssetID) { +fn custom_group(owner: User, asset_id: AssetId) { Module::::create_group(owner.origin().into(), asset_id, <_>::default()).unwrap(); } diff --git a/pallets/external-agents/src/lib.rs b/pallets/external-agents/src/lib.rs index cc66035e85..db94fba58f 100644 --- a/pallets/external-agents/src/lib.rs +++ b/pallets/external-agents/src/lib.rs @@ -65,7 +65,7 @@ use pallet_identity::PermissionedCallOriginData; pub use polymesh_common_utilities::traits::external_agents::{Config, Event, WeightInfo}; use polymesh_common_utilities::with_transaction; use polymesh_primitives::agent::{AGId, AgentGroup}; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ extract_auth, storage_migrate_on, storage_migration_ver, AuthorizationData, EventDid, ExtrinsicPermissions, IdentityId, PalletPermissions, Signatory, SubsetRestriction, @@ -81,35 +81,35 @@ decl_storage! { trait Store for Module as ExternalAgents { /// The next per-asset AG ID in the sequence. /// - /// The full ID is defined as a combination of `AssetID` and a number in this sequence, + /// The full ID is defined as a combination of `AssetId` and a number in this sequence, /// which starts from 1, rather than 0. pub AGIdSequence get(fn agent_group_id_sequence): - map hasher(blake2_128_concat) AssetID + map hasher(blake2_128_concat) AssetId => AGId; /// Maps an agent (`IdentityId`) to all assets they belong to, if any. pub AgentOf get(fn agent_of): double_map hasher(blake2_128_concat) IdentityId, - hasher(blake2_128_concat) AssetID + hasher(blake2_128_concat) AssetId => (); - /// Maps agents (`IdentityId`) for an `AssetID` to what AG they belong to, if any. + /// Maps agents (`IdentityId`) for an `AssetId` to what AG they belong to, if any. pub GroupOfAgent get(fn agents): double_map - hasher(blake2_128_concat) AssetID, + hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) IdentityId => Option; - /// Maps an `AssetID` to the number of `Full` agents for it. + /// Maps an `AssetId` to the number of `Full` agents for it. pub NumFullAgents get(fn num_full_agents): - map hasher(blake2_128_concat) AssetID + map hasher(blake2_128_concat) AssetId => u32; - /// For custom AGs of an `AssetID`, maps to what permissions an agent in that AG would have. + /// For custom AGs of an `AssetId`, maps to what permissions an agent in that AG would have. pub GroupPermissions get(fn permissions): double_map - hasher(blake2_128_concat) AssetID, + hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) AGId => Option; @@ -137,7 +137,7 @@ decl_module! { /// which you can use as `AgentGroup::Custom(id)` when adding agents for `asset_id`. /// /// # Arguments - /// - `assetID` the [`AssetID] to add the custom group for. + /// - `assetID` the [`AssetId] to add the custom group for. /// - `perms` that the new AG will have. /// /// # Errors @@ -149,14 +149,14 @@ decl_module! { /// * Asset /// * Agent #[weight = ::WeightInfo::create_group(perms.complexity() as u32)] - pub fn create_group(origin, asset_id: AssetID, perms: ExtrinsicPermissions) -> DispatchResult { + pub fn create_group(origin, asset_id: AssetId, perms: ExtrinsicPermissions) -> DispatchResult { Self::base_create_group(origin, asset_id, perms).map(drop) } /// Updates the permissions of the custom AG identified by `id`, for the given `asset_id`. /// /// # Arguments - /// - `assetID` the [`AssetID] the custom AG belongs to. + /// - `assetID` the [`AssetId] the custom AG belongs to. /// - `id` for the custom AG within `asset_id`. /// - `perms` to update the custom AG to. /// @@ -169,14 +169,14 @@ decl_module! { /// * Asset /// * Agent #[weight = ::WeightInfo::set_group_permissions(perms.complexity() as u32)] - pub fn set_group_permissions(origin, asset_id: AssetID, id: AGId, perms: ExtrinsicPermissions) -> DispatchResult { + pub fn set_group_permissions(origin, asset_id: AssetId, id: AGId, perms: ExtrinsicPermissions) -> DispatchResult { Self::base_set_group_permissions(origin, asset_id, id, perms) } /// Remove the given `agent` from `asset_id`. /// /// # Arguments - /// - `assetID` the [`AssetID] that has the `agent` to remove. + /// - `assetID` the [`AssetId] that has the `agent` to remove. /// - `agent` of `asset_id` to remove. /// /// # Errors @@ -188,14 +188,14 @@ decl_module! { /// * Asset /// * Agent #[weight = ::WeightInfo::remove_agent()] - pub fn remove_agent(origin, asset_id: AssetID, agent: IdentityId) -> DispatchResult { + pub fn remove_agent(origin, asset_id: AssetId, agent: IdentityId) -> DispatchResult { Self::base_remove_agent(origin, asset_id, agent) } /// Abdicate agentship for `asset_id`. /// /// # Arguments - /// - `assetID` the [`AssetID] of which the caller is an agent. + /// - `assetID` the [`AssetId] of which the caller is an agent. /// /// # Errors /// - `NotAnAgent` if the caller is not an agent of `asset_id`. @@ -204,14 +204,14 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::abdicate()] - pub fn abdicate(origin, asset_id: AssetID) -> DispatchResult { + pub fn abdicate(origin, asset_id: AssetId) -> DispatchResult { Self::base_abdicate(origin, asset_id) } /// Change the agent group that `agent` belongs to in `asset_id`. /// /// # Arguments - /// - `assetID` the [`AssetID] that has the `agent`. + /// - `assetID` the [`AssetId] that has the `agent`. /// - `agent` of `asset_id` to change the group for. /// - `group` that `agent` will belong to in `asset_id`. /// @@ -228,7 +228,7 @@ decl_module! { AgentGroup::Custom(_) => ::WeightInfo::change_group_custom(), _ => ::WeightInfo::change_group_builtin(), }] - pub fn change_group(origin, asset_id: AssetID, agent: IdentityId, group: AgentGroup) -> DispatchResult { + pub fn change_group(origin, asset_id: AssetId, agent: IdentityId, group: AgentGroup) -> DispatchResult { Self::base_change_group(origin, asset_id, agent, group) } @@ -261,7 +261,7 @@ decl_module! { #[weight = ::WeightInfo::create_group_and_add_auth(perms.complexity() as u32)] pub fn create_group_and_add_auth( origin, - asset_id: AssetID, + asset_id: AssetId, perms: ExtrinsicPermissions, target: IdentityId, expiry: Option @@ -277,7 +277,7 @@ decl_module! { #[weight = ::WeightInfo::create_and_change_custom_group(perms.complexity() as u32)] pub fn create_and_change_custom_group( origin, - asset_id: AssetID, + asset_id: AssetId, perms: ExtrinsicPermissions, agent: IdentityId ) -> DispatchResult { @@ -288,13 +288,13 @@ decl_module! { decl_error! { pub enum Error for Module { - /// An AG with the given `AGId` did not exist for the `AssetID`. + /// An AG with the given `AGId` did not exist for the `AssetId`. NoSuchAG, /// The agent is not authorized to call the current extrinsic. UnauthorizedAgent, - /// The provided `agent` is already an agent for the `AssetID`. + /// The provided `agent` is already an agent for the `AssetId`. AlreadyAnAgent, - /// The provided `agent` is not an agent for the `AssetID`. + /// The provided `agent` is not an agent for the `AssetId`. NotAnAgent, /// This agent is the last full one, and it's being removed, /// making the asset orphaned. @@ -324,7 +324,7 @@ impl Module { fn base_create_group( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, perms: ExtrinsicPermissions, ) -> Result<(IdentityId, AGId), DispatchError> { let did = Self::ensure_perms(origin, asset_id)?; @@ -339,7 +339,7 @@ impl Module { fn base_create_group_and_add_auth( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, perms: ExtrinsicPermissions, target: IdentityId, expiry: Option, @@ -356,7 +356,7 @@ impl Module { fn base_set_group_permissions( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, id: AGId, perms: ExtrinsicPermissions, ) -> DispatchResult { @@ -372,7 +372,7 @@ impl Module { fn base_remove_agent( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, agent: IdentityId, ) -> DispatchResult { let did = Self::ensure_perms(origin, asset_id)?.for_event(); @@ -381,7 +381,7 @@ impl Module { Ok(()) } - fn base_abdicate(origin: T::RuntimeOrigin, asset_id: AssetID) -> DispatchResult { + fn base_abdicate(origin: T::RuntimeOrigin, asset_id: AssetId) -> DispatchResult { let did = Self::ensure_asset_perms(origin, asset_id)?.primary_did; Self::try_mutate_agents_group(asset_id, did, None)?; Self::deposit_event(Event::AgentRemoved(did.for_event(), asset_id, did)); @@ -390,7 +390,7 @@ impl Module { fn base_create_and_change_custom_group( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, perms: ExtrinsicPermissions, agent: IdentityId, ) -> DispatchResult { @@ -400,7 +400,7 @@ impl Module { fn base_change_group( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, agent: IdentityId, group: AgentGroup, ) -> DispatchResult { @@ -410,7 +410,7 @@ impl Module { fn unsafe_change_group( did: EventDid, - asset_id: AssetID, + asset_id: AssetId, agent: IdentityId, group: AgentGroup, ) -> DispatchResult { @@ -421,7 +421,7 @@ impl Module { } /// Ensure that `group` is a valid agent group for `asset_id`. - fn ensure_agent_group_valid(asset_id: &AssetID, group: AgentGroup) -> DispatchResult { + fn ensure_agent_group_valid(asset_id: &AssetId, group: AgentGroup) -> DispatchResult { if let AgentGroup::Custom(id) = group { Self::ensure_custom_agent_group_exists(asset_id, &id)?; } @@ -429,7 +429,7 @@ impl Module { } /// Ensure that `id` identifies a custom AG of `asset_id`. - fn ensure_custom_agent_group_exists(asset_id: &AssetID, id: &AGId) -> DispatchResult { + fn ensure_custom_agent_group_exists(asset_id: &AssetId, id: &AGId) -> DispatchResult { ensure!( (AGId(1)..=AGIdSequence::get(&asset_id)).contains(id), Error::::NoSuchAG @@ -439,7 +439,7 @@ impl Module { /// Ensure that `agent` is an agent of `asset_id` and set the group to `group`. fn try_mutate_agents_group( - asset_id: AssetID, + asset_id: AssetId, agent: IdentityId, group: Option, ) -> DispatchResult { @@ -468,7 +468,7 @@ impl Module { } pub fn unchecked_add_agent( - asset_id: AssetID, + asset_id: AssetId, did: IdentityId, group: AgentGroup, ) -> DispatchResult { @@ -482,7 +482,7 @@ impl Module { } /// Decrement the full agent count, or error on < 1. - fn dec_full_count(asset_id: AssetID) -> DispatchResult { + fn dec_full_count(asset_id: AssetId) -> DispatchResult { NumFullAgents::try_mutate(asset_id, |n| { *n = n .checked_sub(1) @@ -493,14 +493,14 @@ impl Module { } /// Increment the full agent count, or error on overflow. - fn inc_full_count(asset_id: AssetID) -> DispatchResult { + fn inc_full_count(asset_id: AssetId) -> DispatchResult { NumFullAgents::try_mutate(asset_id, try_next_post::).map(drop) } /// Ensures that `origin` is a permissioned agent for `asset_id`. pub fn ensure_perms( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> Result { Self::ensure_agent_asset_perms(origin, asset_id).map(|d| d.primary_did) } @@ -508,7 +508,7 @@ impl Module { /// Ensures that `origin` is a permissioned agent for `asset_id`. pub fn ensure_agent_asset_perms( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> Result, DispatchError> { let data = Self::ensure_asset_perms(origin, asset_id)?; Self::ensure_agent_permissioned(&asset_id, data.primary_did)?; @@ -519,7 +519,7 @@ impl Module { /// and the secondary key has relevant asset permissions. pub fn ensure_asset_perms( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> Result, DispatchError> { let data = >::ensure_origin_call_permissions(origin)?; let skey = data.secondary_key.as_ref(); @@ -536,7 +536,7 @@ impl Module { } /// Ensures that `agent` is permissioned for `asset_id`. - pub fn ensure_agent_permissioned(asset_id: &AssetID, agent: IdentityId) -> DispatchResult { + pub fn ensure_agent_permissioned(asset_id: &AssetId, agent: IdentityId) -> DispatchResult { ensure!( Self::agent_permissions(asset_id, agent).sufficient_for( &>::current_pallet_name(), @@ -548,7 +548,7 @@ impl Module { } /// Returns `agent`'s permission set in `asset_id`. - fn agent_permissions(asset_id: &AssetID, agent: IdentityId) -> ExtrinsicPermissions { + fn agent_permissions(asset_id: &AssetId, agent: IdentityId) -> ExtrinsicPermissions { let pallet = |p: &str| PalletPermissions::entire_pallet(p.into()); let in_pallet = |p: &str, dns| PalletPermissions::new(p.into(), dns); match GroupOfAgent::get(asset_id, agent) { diff --git a/pallets/external-agents/src/migrations.rs b/pallets/external-agents/src/migrations.rs index 51d6233a03..7787236e5a 100644 --- a/pallets/external-agents/src/migrations.rs +++ b/pallets/external-agents/src/migrations.rs @@ -10,23 +10,23 @@ mod v0 { decl_storage! { trait Store for Module as ExternalAgents { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAGIdSequence get(fn agent_group_id_sequence): map hasher(blake2_128_concat) Ticker => AGId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldAgentOf get(fn agent_of): double_map hasher(blake2_128_concat) IdentityId, hasher(blake2_128_concat) Ticker => (); - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldGroupOfAgent get(fn agents): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) IdentityId => Option; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldNumFullAgents get(fn num_full_agents): map hasher(blake2_128_concat) Ticker => u32; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldGroupPermissions get(fn permissions): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) AGId => Option; } @@ -52,7 +52,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AGIdSequence::insert(asset_id, ag_id); }); log::info!("Migrated {:?} EA.AGIdSequence entries.", count); @@ -64,7 +64,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); AgentOf::insert(did, asset_id, empty); }); log::info!("Migrated {:?} EA.AgentOf entries.", count); @@ -79,7 +79,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); GroupOfAgent::insert(asset_id, did, group); }); log::info!("Migrated {:?} EA.GroupOfAgent entries.", count); @@ -94,7 +94,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); NumFullAgents::insert(asset_id, n); }); log::info!("Migrated {:?} EA.NumFullAgents entries.", count); @@ -109,7 +109,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); GroupPermissions::insert(asset_id, ag_id, ExtrinsicPermissions::from(ext_perms)); }); log::info!("Migrated {:?} EA.GroupPermissions entries.", count); diff --git a/pallets/identity/src/benchmarking.rs b/pallets/identity/src/benchmarking.rs index 5e3b44e273..5138f73594 100644 --- a/pallets/identity/src/benchmarking.rs +++ b/pallets/identity/src/benchmarking.rs @@ -24,7 +24,7 @@ use polymesh_common_utilities::benchs::{ cdd_provider, user, user_without_did, AccountIdOf, UserBuilder, }; use polymesh_common_utilities::traits::{identity::TargetIdAuthorization, TestUtilsFn}; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::identity::limits::{ MAX_ASSETS, MAX_EXTRINSICS, MAX_PALLETS, MAX_PORTFOLIOS, MAX_SECONDARY_KEYS, }; @@ -303,7 +303,7 @@ benchmarks! { // is covered. let asset = AssetPermissions::elems( - (0..a as u64).map(|a| AssetID::new([a as u8; 16])) + (0..a as u64).map(|a| AssetId::new([a as u8; 16])) ); let portfolio = PortfolioPermissions::elems( (0..p as u128).map(|did| { diff --git a/pallets/identity/src/ticker_migrations.rs b/pallets/identity/src/ticker_migrations.rs index cea52a4970..0ed2f6664d 100644 --- a/pallets/identity/src/ticker_migrations.rs +++ b/pallets/identity/src/ticker_migrations.rs @@ -79,7 +79,7 @@ mod v6 { decl_storage! { trait Store for Module as Identity { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldClaims: double_map hasher(twox_64_concat) Claim1stKey, hasher(blake2_128_concat) Claim2ndKey => Option; pub KeyRecords get(fn key_records): diff --git a/pallets/nft/src/benchmarking.rs b/pallets/nft/src/benchmarking.rs index e230f39b9b..c23679827c 100644 --- a/pallets/nft/src/benchmarking.rs +++ b/pallets/nft/src/benchmarking.rs @@ -23,7 +23,7 @@ use crate::*; const MAX_COLLECTION_KEYS: u32 = 255; /// Creates an NFT collection with `n` global metadata keys. -fn create_collection(collection_owner: &User, n: u32) -> (AssetID, NFTCollectionId) { +fn create_collection(collection_owner: &User, n: u32) -> (AssetId, NFTCollectionId) { let asset_id = create_and_issue_sample_asset::( collection_owner, false, @@ -67,7 +67,7 @@ fn create_collection_issue_nfts( n_keys: u32, n_nfts: u32, portfolio_kind: PortfolioKind, -) -> AssetID { +) -> AssetId { let (asset_id, _) = create_collection::(collection_owner, n_keys); let metadata_attributes: Vec = (1..n_keys + 1) @@ -99,7 +99,7 @@ pub fn setup_nft_transfer( receiver_portolfio_name: Option<&str>, pause_compliance: bool, n_mediators: u8, -) -> (AssetID, PortfolioId, PortfolioId, Vec>) +) -> (AssetId, PortfolioId, PortfolioId, Vec>) where T: Config + TestUtilsFn>, { diff --git a/pallets/nft/src/lib.rs b/pallets/nft/src/lib.rs index 619ab49d88..b23be9cd71 100644 --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -17,7 +17,7 @@ use pallet_base::try_next_pre; use pallet_portfolio::{PortfolioLockedNFT, PortfolioNFT}; use polymesh_common_utilities::compliance_manager::ComplianceFnConfig; pub use polymesh_common_utilities::traits::nft::{Config, Event, NFTTrait, WeightInfo}; -use polymesh_primitives::asset::{AssetID, AssetName, AssetType, NonFungibleType}; +use polymesh_primitives::asset::{AssetId, AssetName, AssetType, NonFungibleType}; use polymesh_primitives::asset_metadata::{AssetMetadataKey, AssetMetadataValue}; use polymesh_primitives::nft::{ NFTCollection, NFTCollectionId, NFTCollectionKeys, NFTCount, NFTId, NFTMetadataAttribute, NFTs, @@ -42,10 +42,10 @@ storage_migration_ver!(4); decl_storage!( trait Store for Module as NFT { /// The total number of NFTs per identity. - pub NumberOfNFTs get(fn balance_of): double_map hasher(blake2_128_concat) AssetID, hasher(identity) IdentityId => NFTCount; + pub NumberOfNFTs get(fn balance_of): double_map hasher(blake2_128_concat) AssetId, hasher(identity) IdentityId => NFTCount; /// The collection id corresponding to each asset. - pub CollectionAsset get(fn collection_asset): map hasher(blake2_128_concat) AssetID => NFTCollectionId; + pub CollectionAsset get(fn collection_asset): map hasher(blake2_128_concat) AssetId => NFTCollectionId; /// All collection details for a given collection id. pub Collection get(fn nft_collection): map hasher(blake2_128_concat) NFTCollectionId => NFTCollection; @@ -58,10 +58,10 @@ decl_storage!( double_map hasher(blake2_128_concat) (NFTCollectionId, NFTId), hasher(blake2_128_concat) AssetMetadataKey => AssetMetadataValue; /// The total number of NFTs in a collection - pub NFTsInCollection get(fn nfts_in_collection): map hasher(blake2_128_concat) AssetID => NFTCount; + pub NFTsInCollection get(fn nfts_in_collection): map hasher(blake2_128_concat) AssetId => NFTCount; /// Tracks the owner of an NFT - pub NFTOwner get(fn nft_owner): double_map hasher(blake2_128_concat) AssetID, hasher(blake2_128_concat) NFTId => Option; + pub NFTOwner get(fn nft_owner): double_map hasher(blake2_128_concat) AssetId, hasher(blake2_128_concat) NFTId => Option; /// The last `NFTId` used for an NFT. pub CurrentNFTId get(fn current_nft_id): map hasher(blake2_128_concat) NFTCollectionId => Option; @@ -96,7 +96,7 @@ decl_module! { /// /// # Arguments /// * `origin` - contains the secondary key of the caller (i.e. who signed the transaction to execute this function). - /// * `asset_id` - optional [`AssetID`] associated to the new collection. `None` will create a new asset. + /// * `asset_id` - optional [`AssetId`] associated to the new collection. `None` will create a new asset. /// * `nft_type` - in case the asset hasn't been created yet, one will be created with the given type. /// * `collection_keys` - all mandatory metadata keys that the tokens in the collection must have. /// @@ -112,7 +112,7 @@ decl_module! { #[weight = ::WeightInfo::create_nft_collection(collection_keys.len() as u32)] pub fn create_nft_collection( origin, - asset_id: Option, + asset_id: Option, nft_type: Option, collection_keys: NFTCollectionKeys ) -> DispatchResult { @@ -123,7 +123,7 @@ decl_module! { /// /// # Arguments /// * `origin` - is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id` - the [`AssetID`] of the NFT collection. + /// * `asset_id` - the [`AssetId`] of the NFT collection. /// * `nft_metadata_attributes` - all mandatory metadata keys and values for the NFT. /// - `portfolio_kind` - the portfolio that will receive the minted nft. /// @@ -137,7 +137,7 @@ decl_module! { /// * Asset /// * Portfolio #[weight = ::WeightInfo::issue_nft(nft_metadata_attributes.len() as u32)] - pub fn issue_nft(origin, asset_id: AssetID, nft_metadata_attributes: Vec, portfolio_kind: PortfolioKind) -> DispatchResult { + pub fn issue_nft(origin, asset_id: AssetId, nft_metadata_attributes: Vec, portfolio_kind: PortfolioKind) -> DispatchResult { Self::base_issue_nft(origin, asset_id, nft_metadata_attributes, portfolio_kind) } @@ -145,7 +145,7 @@ decl_module! { /// /// # Arguments /// * `origin` - is a signer that has permissions to act as an agent of `asset_id`. - /// * `asset_id` - the [`AssetID`] of the NFT collection. + /// * `asset_id` - the [`AssetId`] of the NFT collection. /// * `nft_id` - the id of the NFT to be burned. /// * `portfolio_kind` - the portfolio that contains the nft. /// @@ -164,7 +164,7 @@ decl_module! { )] pub fn redeem_nft( origin, - asset_id: AssetID, + asset_id: AssetId, nft_id: NFTId, portfolio_kind: PortfolioKind, number_of_keys: Option @@ -250,7 +250,7 @@ decl_error! { /// The sender has an invalid CDD. InvalidNFTTransferInvalidSenderCDD, /// There's no asset associated to the given asset_id. - InvalidAssetID, + InvalidAssetId, /// The NFT is locked. NFTIsLocked, /// The number of keys in the collection is greater than the input. @@ -261,7 +261,7 @@ decl_error! { impl Module { fn base_create_nft_collection( origin: T::RuntimeOrigin, - asset_id: Option, + asset_id: Option, nft_type: Option, collection_keys: NFTCollectionKeys, ) -> DispatchResult { @@ -278,7 +278,7 @@ impl Module { .primary_did; (false, caller_did, asset_id) } - None => return Err(Error::::InvalidAssetID.into()), + None => return Err(Error::::InvalidAssetId.into()), }, None => { let caller_data = @@ -347,7 +347,7 @@ impl Module { fn base_issue_nft( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, metadata_attributes: Vec, portfolio_kind: PortfolioKind, ) -> DispatchResult { @@ -419,7 +419,7 @@ impl Module { fn base_redeem_nft( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, nft_id: NFTId, portfolio_kind: PortfolioKind, number_of_keys: Option, @@ -791,7 +791,7 @@ impl Module { } impl NFTTrait for Module { - fn is_collection_key(asset_id: &AssetID, metadata_key: &AssetMetadataKey) -> bool { + fn is_collection_key(asset_id: &AssetId, metadata_key: &AssetMetadataKey) -> bool { match CollectionAsset::try_get(asset_id) { Ok(collection_id) => { let key_set = CollectionKeys::get(&collection_id); @@ -801,14 +801,14 @@ impl NFTTrait for Module { } } - fn move_portfolio_owner(asset_id: AssetID, nft_id: NFTId, new_owner_portfolio: PortfolioId) { + fn move_portfolio_owner(asset_id: AssetId, nft_id: NFTId, new_owner_portfolio: PortfolioId) { NFTOwner::insert(asset_id, nft_id, new_owner_portfolio); } #[cfg(feature = "runtime-benchmarks")] fn create_nft_collection( origin: T::RuntimeOrigin, - asset_id: Option, + asset_id: Option, nft_type: Option, collection_keys: NFTCollectionKeys, ) -> DispatchResult { diff --git a/pallets/nft/src/migrations.rs b/pallets/nft/src/migrations.rs index 41525c440a..7f43853560 100644 --- a/pallets/nft/src/migrations.rs +++ b/pallets/nft/src/migrations.rs @@ -18,23 +18,23 @@ mod v3 { decl_storage! { trait Store for Module as NFT { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldNumberOfNFTs get(fn balance_of): double_map hasher(blake2_128_concat) Ticker, hasher(identity) IdentityId => NFTCount; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub CollectionTicker get(fn collection_ticker): map hasher(blake2_128_concat) Ticker => NFTCollectionId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub Collection get(fn nft_collection): map hasher(blake2_128_concat) NFTCollectionId => NFTCollection; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldNFTsInCollection get(fn nfts_in_collection): map hasher(blake2_128_concat) Ticker => NFTCount; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldNFTOwner get(fn nft_owner): double_map hasher(blake2_128_concat) Ticker, hasher(blake2_128_concat) NFTId => Option; @@ -73,7 +73,7 @@ pub(crate) fn migrate_to_v4() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); NumberOfNFTs::insert(asset_id, did, n); }); log::info!("Migrated {:?} NFT.NumberOfNFTs entries.", count); @@ -84,7 +84,7 @@ pub(crate) fn migrate_to_v4() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); CollectionAsset::insert(asset_id, id); }); log::info!("Migrated {:?} NFT.CollectionTicker entries.", count); @@ -107,7 +107,7 @@ pub(crate) fn migrate_to_v4() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); NFTsInCollection::insert(asset_id, n); }); log::info!("Migrated {:?} NFT.NFTsInCollection entries.", count); @@ -119,7 +119,7 @@ pub(crate) fn migrate_to_v4() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); NFTOwner::insert(asset_id, nft_id, portfolio); }); log::info!("Migrated {:?} NFT.NFTOwner entries.", count); diff --git a/pallets/portfolio/src/benchmarking.rs b/pallets/portfolio/src/benchmarking.rs index ff51ac9457..38f4f464e8 100644 --- a/pallets/portfolio/src/benchmarking.rs +++ b/pallets/portfolio/src/benchmarking.rs @@ -139,7 +139,7 @@ benchmarks! { let alice_custom_portfolio = PortfolioId { did: alice.did(), kind: PortfolioKind::User(PortfolioNumber(1)) }; Module::::create_portfolio(alice.clone().origin().into(), PortfolioName(b"MyOwnPortfolio".to_vec())).unwrap(); // Simulates minting - Adding the NFT pallet causes cyclic dependency - let nft_asset_id = AssetID::new([0; 16]); + let nft_asset_id = AssetId::new([0; 16]); (1..n + 1).for_each(|id| PortfolioNFT::insert(alice_default_portfolio, (nft_asset_id, NFTId(id.into())), true)); let nfts = NFTs::new_unverified(nft_asset_id, (1..n + 1).map(|id| NFTId(id.into())).collect()); @@ -166,7 +166,7 @@ benchmarks! { let alice = UserBuilder::::default().generate_did().build("Alice"); let alice_custom_portfolio = PortfolioId { did: alice.did(), kind: PortfolioKind::User(PortfolioNumber(1)) }; - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); Module::::create_portfolio(alice.clone().origin().into(), PortfolioName(b"MyOwnPortfolio".to_vec())).unwrap(); Module::::pre_approve_portfolio(alice.clone().origin().into(), asset_id, alice_custom_portfolio).unwrap(); }: _(alice.origin, asset_id, alice_custom_portfolio) diff --git a/pallets/portfolio/src/lib.rs b/pallets/portfolio/src/lib.rs index 52d66553bf..8ad23ca97c 100644 --- a/pallets/portfolio/src/lib.rs +++ b/pallets/portfolio/src/lib.rs @@ -60,7 +60,7 @@ pub use polymesh_common_utilities::portfolio::{Config, Event, WeightInfo}; use polymesh_common_utilities::traits::asset::AssetFnTrait; use polymesh_common_utilities::traits::nft::NFTTrait; use polymesh_common_utilities::traits::portfolio::PortfolioSubTrait; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ extract_auth, identity_id::PortfolioValidityResult, storage_migrate_on, storage_migration_ver, Balance, Fund, FundDescription, IdentityId, NFTId, PortfolioId, PortfolioKind, PortfolioName, @@ -94,12 +94,12 @@ decl_storage! { /// The asset balances of portfolios. pub PortfolioAssetBalances get(fn portfolio_asset_balances): - double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetID => Balance; + double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetId => Balance; /// Amount of assets locked in a portfolio. /// These assets show up in portfolio balance but can not be transferred away. pub PortfolioLockedAssets get(fn locked_assets): - double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetID => Balance; + double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetId => Balance; /// The custodian of a particular portfolio. None implies that the identity owner is the custodian. pub PortfolioCustodian get(fn portfolio_custodian): @@ -113,15 +113,15 @@ decl_storage! { /// The nft associated to the portfolio. pub PortfolioNFT get(fn portfolio_nft): - double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (AssetID, NFTId) => bool; + double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (AssetId, NFTId) => bool; /// All locked nft for a given portfolio. pub PortfolioLockedNFT get(fn portfolio_locked_nft): - double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (AssetID, NFTId) => bool; + double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (AssetId, NFTId) => bool; - /// All portfolios that don't need to affirm the receivement of a given [`AssetID`]. + /// All portfolios that don't need to affirm the receivement of a given [`AssetId`]. pub PreApprovedPortfolios get(fn pre_approved_portfolios): - double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetID => bool; + double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) AssetId => bool; /// Custodians allowed to create and take custody of portfolios on an id's behalf. pub AllowedCustodians get(fn allowed_custodians): @@ -350,13 +350,13 @@ decl_module! { /// /// # Arguments /// * `origin` - the secondary key of the sender. - /// * `asset_id` - the [`AssetID`] that will be exempt from affirmation. + /// * `asset_id` - the [`AssetId`] that will be exempt from affirmation. /// * `portfolio_id` - the [`PortfolioId`] that can receive `asset_id` without affirmation. /// /// # Permissions /// * Portfolio #[weight = ::WeightInfo::pre_approve_portfolio()] - pub fn pre_approve_portfolio(origin, asset_id: AssetID, portfolio_id: PortfolioId) -> DispatchResult { + pub fn pre_approve_portfolio(origin, asset_id: AssetId, portfolio_id: PortfolioId) -> DispatchResult { Self::base_pre_approve_portfolio(origin, asset_id, portfolio_id) } @@ -364,13 +364,13 @@ decl_module! { /// /// # Arguments /// * `origin` - the secondary key of the sender. - /// * `asset_id` - the [`AssetID`] that will be exempt from affirmation. + /// * `asset_id` - the [`AssetId`] that will be exempt from affirmation. /// * `portfolio_id` - the [`PortfolioId`] that can receive `asset_id` without affirmation. /// /// # Permissions /// * Portfolio #[weight = ::WeightInfo::remove_portfolio_pre_approval()] - pub fn remove_portfolio_pre_approval(origin, asset_id: AssetID, portfolio_id: PortfolioId) -> DispatchResult { + pub fn remove_portfolio_pre_approval(origin, asset_id: AssetId, portfolio_id: PortfolioId) -> DispatchResult { Self::base_remove_portfolio_pre_approval(origin, asset_id, portfolio_id) } @@ -446,7 +446,7 @@ impl Module { } /// Returns the asset balance of the identity's default portfolio. - pub fn default_portfolio_balance(did: IdentityId, asset_id: &AssetID) -> Balance { + pub fn default_portfolio_balance(did: IdentityId, asset_id: &AssetId) -> Balance { Self::portfolio_asset_balances(PortfolioId::default_portfolio(did), asset_id) } @@ -454,13 +454,13 @@ impl Module { pub fn user_portfolio_balance( did: IdentityId, num: PortfolioNumber, - asset_id: &AssetID, + asset_id: &AssetId, ) -> Balance { Self::portfolio_asset_balances(PortfolioId::user_portfolio(did, num), asset_id) } /// Sets the asset balance of the a portfolio to `new`. - pub fn set_portfolio_balance(pid: PortfolioId, asset_id: &AssetID, new: Balance) { + pub fn set_portfolio_balance(pid: PortfolioId, asset_id: &AssetId, new: Balance) { PortfolioAssetBalances::mutate(&pid, asset_id, |old| { Self::transition_asset_count(&pid, *old, new); *old = new; @@ -488,7 +488,7 @@ impl Module { pub fn unchecked_transfer_portfolio_balance( from: &PortfolioId, to: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) { PortfolioAssetBalances::mutate(from, asset_id, |balance| { @@ -568,7 +568,7 @@ impl Module { pub fn ensure_portfolio_transfer_validity( from_portfolio: &PortfolioId, to_portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> DispatchResult { // Transfers between the same identity should call move_portfolio_funds @@ -589,7 +589,7 @@ impl Module { pub fn ensure_portfolio_transfer_validity_granular( from_portfolio: &PortfolioId, to_portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> PortfolioValidityResult { let receiver_is_same_portfolio = from_portfolio.did == to_portfolio.did; @@ -615,7 +615,7 @@ impl Module { /// Throws an error if enough free balance is not available. pub fn reduce_portfolio_balance( pid: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> DispatchResult { // Ensure portfolio has enough free balance @@ -647,7 +647,7 @@ impl Module { /// Ensure `portfolio` has sufficient balance of `asset_id` to lock/withdraw `amount`. pub fn ensure_sufficient_balance( portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> DispatchResult { T::Asset::ensure_granular(asset_id, amount)?; @@ -661,7 +661,7 @@ impl Module { /// Locks `amount` of `asset_id` in `portfolio` without checking that this is sane. /// /// Locks are stacked so if there were X tokens already locked, there will now be X + N tokens locked - pub fn unchecked_lock_tokens(portfolio: &PortfolioId, asset_id: &AssetID, amount: Balance) { + pub fn unchecked_lock_tokens(portfolio: &PortfolioId, asset_id: &AssetId, amount: Balance) { PortfolioLockedAssets::mutate(portfolio, asset_id, |l| *l = l.saturating_add(amount)); } @@ -750,7 +750,7 @@ impl Module { /// Verifies if the portfolio has the nfts and if they are not locked. fn ensure_valid_nfts( portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, nft_ids: &[NFTId], ) -> DispatchResult { for nft_id in nft_ids { @@ -810,7 +810,7 @@ impl Module { fn base_pre_approve_portfolio( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, portfolio_id: PortfolioId, ) -> DispatchResult { let origin_data = Identity::::ensure_origin_call_permissions(origin)?; @@ -832,7 +832,7 @@ impl Module { fn base_remove_portfolio_pre_approval( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, portfolio_id: PortfolioId, ) -> DispatchResult { let origin_data = Identity::::ensure_origin_call_permissions(origin)?; @@ -906,7 +906,7 @@ impl PortfolioSubTrait for Module { /// /// # Errors /// * `InsufficientPortfolioBalance` if the portfolio does not have enough free balance to lock - fn lock_tokens(portfolio: &PortfolioId, asset_id: &AssetID, amount: Balance) -> DispatchResult { + fn lock_tokens(portfolio: &PortfolioId, asset_id: &AssetId, amount: Balance) -> DispatchResult { Self::ensure_sufficient_balance(portfolio, asset_id, amount)?; Self::unchecked_lock_tokens(portfolio, asset_id, amount); Ok(()) @@ -921,7 +921,7 @@ impl PortfolioSubTrait for Module { /// * `InsufficientTokensLocked` if the portfolio does not have enough locked tokens to unlock fn unlock_tokens( portfolio: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, amount: Balance, ) -> DispatchResult { // 1. Ensure portfolio has enough locked tokens @@ -958,7 +958,7 @@ impl PortfolioSubTrait for Module { /// # Errors /// * `NFTAlreadyLocked` if the given nft is already locked. /// * `NFTNotFoundInPortfolio` if the given nft was not found in the portfolio. - fn lock_nft(portfolio_id: &PortfolioId, asset_id: &AssetID, nft_id: &NFTId) -> DispatchResult { + fn lock_nft(portfolio_id: &PortfolioId, asset_id: &AssetId, nft_id: &NFTId) -> DispatchResult { // Verifies if the portfolio contains the NFT ensure!( PortfolioNFT::contains_key(portfolio_id, (asset_id, nft_id)), @@ -980,7 +980,7 @@ impl PortfolioSubTrait for Module { /// * `NFTNotFoundInPortfolio` if the given nft was not found in the portfolio. fn unlock_nft( portfolio_id: &PortfolioId, - asset_id: &AssetID, + asset_id: &AssetId, nft_id: &NFTId, ) -> DispatchResult { // Verifies if the locked NFT exist. @@ -992,7 +992,7 @@ impl PortfolioSubTrait for Module { Ok(()) } - fn skip_portfolio_affirmation(portfolio_id: &PortfolioId, asset_id: &AssetID) -> bool { + fn skip_portfolio_affirmation(portfolio_id: &PortfolioId, asset_id: &AssetId) -> bool { if Self::portfolio_custodian(portfolio_id).is_some() { if T::Asset::asset_affirmation_exemption(asset_id) { return true; diff --git a/pallets/portfolio/src/migrations.rs b/pallets/portfolio/src/migrations.rs index d9ff32d80e..ea89ad05e5 100644 --- a/pallets/portfolio/src/migrations.rs +++ b/pallets/portfolio/src/migrations.rs @@ -10,23 +10,23 @@ mod v2 { decl_storage! { trait Store for Module as Portfolio { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldPortfolioAssetBalances get(fn portfolio_asset_balances): double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) Ticker => Balance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldPortfolioLockedAssets get(fn locked_assets): double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) Ticker => Balance; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldPortfolioNFT get(fn portfolio_nft): double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (Ticker, NFTId) => bool; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldPortfolioLockedNFT get(fn portfolio_locked_nft): double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) (Ticker, NFTId) => bool; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub OldPreApprovedPortfolios get(fn pre_approved_portfolios): double_map hasher(twox_64_concat) PortfolioId, hasher(blake2_128_concat) Ticker => bool; } @@ -53,7 +53,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PortfolioAssetBalances::insert(portfolio, asset_id, balance); }); log::info!( @@ -71,7 +71,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PortfolioLockedAssets::insert(portfolio, asset_id, balance); }); log::info!( @@ -89,7 +89,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PortfolioNFT::insert(portfolio, (asset_id, nft_id), v); }); log::info!("Migrated {:?} Portoflio.PortfolioNFT entries.", count); @@ -104,7 +104,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PortfolioLockedNFT::insert(portfolio, (asset_id, nft_id), v); }); log::info!("Migrated {:?} Portoflio.PortfolioLockedNFT entries.", count); @@ -119,7 +119,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); PreApprovedPortfolios::insert(portfolio, asset_id, v); }); log::info!( diff --git a/pallets/runtime/common/src/runtime.rs b/pallets/runtime/common/src/runtime.rs index 7780b9ed22..7808e6fbcb 100644 --- a/pallets/runtime/common/src/runtime.rs +++ b/pallets/runtime/common/src/runtime.rs @@ -666,7 +666,7 @@ macro_rules! runtime_apis { use pallet_identity::types::{AssetDidResult, CddStatus, RpcDidRecords, DidStatus, KeyIdentityData}; use pallet_pips::{Vote, VoteCount}; use pallet_protocol_fee_rpc_runtime_api::CappedFee; - use polymesh_primitives::asset::AssetID; + use polymesh_primitives::asset::AssetId; use polymesh_primitives::settlement::{InstructionId, ExecuteInstructionInfo, AffirmationCount}; use polymesh_primitives::transfer_compliance::TransferCondition; use polymesh_primitives::compliance_manager::{AssetComplianceResult, ComplianceReport}; @@ -1036,7 +1036,7 @@ macro_rules! runtime_apis { fn transfer_report( sender_portfolio: PortfolioId, receiver_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, skip_locked_check: bool, ) -> Vec { @@ -1118,7 +1118,7 @@ macro_rules! runtime_apis { impl node_rpc_runtime_api::compliance::ComplianceApi for Runtime { #[inline] fn compliance_report( - asset_id: &AssetID, + asset_id: &AssetId, sender_identity: &IdentityId, receiver_identity: &IdentityId, ) -> FrameResult { @@ -1135,7 +1135,7 @@ macro_rules! runtime_apis { impl node_rpc_runtime_api::statistics::StatisticsApi for Runtime { #[inline] fn transfer_restrictions_report( - asset_id: AssetID, + asset_id: AssetId, sender_did: &IdentityId, receiver_did: &IdentityId, transfer_amount: Balance, diff --git a/pallets/runtime/tests/src/asset_metadata_test.rs b/pallets/runtime/tests/src/asset_metadata_test.rs index b658b1b8d4..c3eb529f8c 100644 --- a/pallets/runtime/tests/src/asset_metadata_test.rs +++ b/pallets/runtime/tests/src/asset_metadata_test.rs @@ -6,7 +6,7 @@ use super::{ ExtBuilder, }; use frame_support::{assert_noop, assert_ok, dispatch::DispatchError}; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::asset_metadata::{ AssetMetadataKey, AssetMetadataLockStatus, AssetMetadataName, AssetMetadataSpec, AssetMetadataValue, AssetMetadataValueDetail, @@ -75,7 +75,7 @@ fn make_metadata_type(name: &str) -> (AssetMetadataName, AssetMetadataSpec) { } /// Helper to register metadata type with the give name. -fn register_metadata_type(owner: User, asset_id: Option, name: &str) -> AssetMetadataKey { +fn register_metadata_type(owner: User, asset_id: Option, name: &str) -> AssetMetadataKey { let (name, spec) = make_metadata_type(name); if let Some(asset_id) = asset_id { diff --git a/pallets/runtime/tests/src/asset_pallet/link_ticker_to_asset.rs b/pallets/runtime/tests/src/asset_pallet/link_ticker_to_asset.rs index 4a68498e29..48fb8fe034 100644 --- a/pallets/runtime/tests/src/asset_pallet/link_ticker_to_asset.rs +++ b/pallets/runtime/tests/src/asset_pallet/link_ticker_to_asset.rs @@ -2,7 +2,7 @@ use frame_support::StorageMap; use frame_support::{assert_noop, assert_ok}; use sp_keyring::AccountKeyring; -use pallet_asset::{AssetIDTicker, TickerAssetID}; +use pallet_asset::{AssetIdTicker, TickerAssetId}; use polymesh_primitives::Ticker; use crate::asset_test::{now, set_timestamp}; @@ -37,8 +37,8 @@ fn link_ticker_to_asset_id_successfully() { asset_id )); - assert_eq!(TickerAssetID::get(ticker), Some(asset_id)); - assert_eq!(AssetIDTicker::get(asset_id), Some(ticker)); + assert_eq!(TickerAssetId::get(ticker), Some(asset_id)); + assert_eq!(AssetIdTicker::get(asset_id), Some(ticker)); }); } @@ -232,7 +232,7 @@ fn link_ticker_to_asset_id_after_unlink() { asset_id )); - assert_eq!(TickerAssetID::get(ticker_1), Some(asset_id)); - assert_eq!(AssetIDTicker::get(asset_id), Some(ticker_1)); + assert_eq!(TickerAssetId::get(ticker_1), Some(asset_id)); + assert_eq!(AssetIdTicker::get(asset_id), Some(ticker_1)); }); } diff --git a/pallets/runtime/tests/src/asset_pallet/setup.rs b/pallets/runtime/tests/src/asset_pallet/setup.rs index 05a079bedc..084178cf87 100644 --- a/pallets/runtime/tests/src/asset_pallet/setup.rs +++ b/pallets/runtime/tests/src/asset_pallet/setup.rs @@ -1,6 +1,6 @@ use frame_support::assert_ok; -use polymesh_primitives::asset::{AssetID, AssetType, FundingRoundName, NonFungibleType}; +use polymesh_primitives::asset::{AssetId, AssetType, FundingRoundName, NonFungibleType}; use polymesh_primitives::{AssetIdentifier, Balance, PortfolioKind, Ticker}; use crate::storage::User; @@ -19,7 +19,7 @@ pub fn register_unique_ticker(ticker_owner: &User, ticker: Ticker) { /// Creates a divisible asset where all values for its attributes are set to their default values. /// The [`AssetDetails::total_supply`] will be set to [`ISSUE_AMOUNT`]. -pub fn create_and_issue_sample_asset(asset_owner: &User) -> AssetID { +pub fn create_and_issue_sample_asset(asset_owner: &User) -> AssetId { let asset_id = Asset::generate_asset_id(asset_owner.acc(), false); assert_ok!(Asset::create_asset( @@ -45,7 +45,7 @@ pub fn create_and_issue_sample_asset(asset_owner: &User) -> AssetID { pub fn create_and_issue_sample_asset_linked_to_ticker( asset_owner: &User, ticker: Ticker, -) -> AssetID { +) -> AssetId { register_unique_ticker(asset_owner, ticker); let asset_id = create_and_issue_sample_asset(asset_owner); @@ -59,7 +59,7 @@ pub fn create_and_issue_sample_asset_linked_to_ticker( } /// Creates an NFT collection and mints one token. All values for its attributes are set to their default values. -pub fn create_and_issue_sample_nft(asset_owner: &User) -> AssetID { +pub fn create_and_issue_sample_nft(asset_owner: &User) -> AssetId { let asset_id = Asset::generate_asset_id(asset_owner.acc(), false); assert_ok!(Asset::create_asset( @@ -99,7 +99,7 @@ pub fn create_asset( funding_round_name: Option, issue_tokens: bool, issue_portfolio: Option, -) -> AssetID { +) -> AssetId { let asset_id = Asset::generate_asset_id(asset_owner.acc(), false); assert_ok!(Asset::create_asset( diff --git a/pallets/runtime/tests/src/asset_pallet/unlink_ticker_from_asset.rs b/pallets/runtime/tests/src/asset_pallet/unlink_ticker_from_asset.rs index e3816ca72f..0c952af29a 100644 --- a/pallets/runtime/tests/src/asset_pallet/unlink_ticker_from_asset.rs +++ b/pallets/runtime/tests/src/asset_pallet/unlink_ticker_from_asset.rs @@ -2,7 +2,7 @@ use frame_support::{assert_noop, assert_ok}; use frame_support::{StorageDoubleMap, StorageMap}; use sp_keyring::AccountKeyring; -use pallet_asset::{AssetIDTicker, TickerAssetID, TickersOwnedByUser, UniqueTickerRegistration}; +use pallet_asset::{AssetIdTicker, TickerAssetId, TickersOwnedByUser, UniqueTickerRegistration}; use polymesh_primitives::agent::AgentGroup; use polymesh_primitives::{AuthorizationData, Signatory, Ticker}; @@ -45,8 +45,8 @@ fn unlink_ticker_from_asset_id_successfully() { asset_id )); - assert_eq!(TickerAssetID::get(ticker), None); - assert_eq!(AssetIDTicker::get(asset_id), None); + assert_eq!(TickerAssetId::get(ticker), None); + assert_eq!(AssetIdTicker::get(asset_id), None); assert_eq!(UniqueTickerRegistration::::get(ticker), None); assert_eq!(TickersOwnedByUser::get(alice.did, ticker), false); }); diff --git a/pallets/runtime/tests/src/asset_test.rs b/pallets/runtime/tests/src/asset_test.rs index 6fd15f3447..726050efbf 100644 --- a/pallets/runtime/tests/src/asset_test.rs +++ b/pallets/runtime/tests/src/asset_test.rs @@ -29,7 +29,7 @@ use polymesh_common_utilities::traits::checkpoint::{ }; use polymesh_primitives::agent::AgentGroup; use polymesh_primitives::asset::{ - AssetID, AssetName, AssetType, CheckpointId, CustomAssetTypeId, FundingRoundName, + AssetId, AssetName, AssetType, CheckpointId, CustomAssetTypeId, FundingRoundName, NonFungibleType, }; use polymesh_primitives::asset_metadata::{ @@ -115,7 +115,7 @@ macro_rules! assert_too_long { }; } -pub(crate) fn statistics_investor_count(asset_id: AssetID) -> u128 { +pub(crate) fn statistics_investor_count(asset_id: AssetId) -> u128 { AssetStats::get( Stat1stKey::investor_count(asset_id), Stat2ndKey::NoClaimStat, @@ -123,7 +123,7 @@ pub(crate) fn statistics_investor_count(asset_id: AssetID) -> u128 { } /// Returns the [`AssetDetails`] associated to the given `asset_id`. -pub(crate) fn get_asset_details(asset_id: &AssetID) -> AssetDetails { +pub(crate) fn get_asset_details(asset_id: &AssetId) -> AssetDetails { Assets::get(asset_id).unwrap() } @@ -132,7 +132,7 @@ pub(crate) fn sample_security_token(token_owner_did: IdentityId) -> AssetDetails AssetDetails::new(TOTAL_SUPPLY, token_owner_did, true, AssetType::default()) } -fn enable_investor_count(asset_id: AssetID, owner: User) { +fn enable_investor_count(asset_id: AssetId, owner: User) { assert_ok!(Statistics::set_active_asset_stats( owner.origin(), asset_id, @@ -142,7 +142,7 @@ fn enable_investor_count(asset_id: AssetID, owner: User) { /// Transfers `amount` from `sender` default portfolio to `receiver` default portfolio. pub(crate) fn transfer( - asset_id: AssetID, + asset_id: AssetId, sender: User, receiver: User, amount: u128, @@ -176,13 +176,13 @@ fn exceeded_funding_round_name() -> FundingRoundName { .into() } -pub fn next_schedule_id(asset_id: AssetID) -> ScheduleId { +pub fn next_schedule_id(asset_id: AssetId) -> ScheduleId { let ScheduleId(id) = Checkpoint::schedule_id_sequence(asset_id); ScheduleId(id + 1) } #[track_caller] -pub fn check_schedules(asset_id: AssetID, schedules: &[(ScheduleId, ScheduleCheckpoints)]) { +pub fn check_schedules(asset_id: AssetId, schedules: &[(ScheduleId, ScheduleCheckpoints)]) { let mut cached = NextCheckpoints::default(); for (id, schedule) in schedules { assert_eq!( @@ -801,12 +801,12 @@ fn non_recurring_schedule_works_we() { }); } -fn checkpoint_ats(asset_id: AssetID) -> Vec { +fn checkpoint_ats(asset_id: AssetId) -> Vec { let cached = Checkpoint::cached_next_checkpoints(asset_id).unwrap_or_default(); cached.schedules.values().copied().collect() } -fn next_checkpoints(asset_id: AssetID) -> Vec> { +fn next_checkpoints(asset_id: AssetId) -> Vec> { let ScheduleId(id) = Checkpoint::schedule_id_sequence(asset_id); (1..=id) .into_iter() @@ -947,7 +947,7 @@ fn secondary_key_not_authorized_for_asset_test() { let eve = User::new_with(alice.did, AccountKeyring::Eve); let asset_id = create_and_issue_sample_asset(&alice); let eve_permissions = Permissions { - asset: AssetPermissions::elems(vec![AssetID::new([0; 16])]), + asset: AssetPermissions::elems(vec![AssetId::new([0; 16])]), ..Default::default() }; @@ -1726,7 +1726,7 @@ fn redeem_token_assigned_custody() { #[test] fn pre_approve_asset() { ExtBuilder::default().build().execute_with(|| { - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); let alice = User::new(AccountKeyring::Alice); Asset::pre_approve_asset(alice.origin(), asset_id).unwrap(); @@ -1739,7 +1739,7 @@ fn pre_approve_asset() { #[test] fn remove_asset_pre_approval() { ExtBuilder::default().build().execute_with(|| { - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); let alice = User::new(AccountKeyring::Alice); Asset::pre_approve_asset(alice.origin(), asset_id).unwrap(); Asset::remove_asset_pre_approval(alice.origin(), asset_id).unwrap(); @@ -1753,7 +1753,7 @@ fn remove_asset_pre_approval() { #[test] fn unauthorized_custodian_ticker_exemption() { ExtBuilder::default().build().execute_with(|| { - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); let alice = User::new(AccountKeyring::Alice); assert_noop!( diff --git a/pallets/runtime/tests/src/compliance_manager_test.rs b/pallets/runtime/tests/src/compliance_manager_test.rs index a02948a698..c5c5542999 100644 --- a/pallets/runtime/tests/src/compliance_manager_test.rs +++ b/pallets/runtime/tests/src/compliance_manager_test.rs @@ -6,7 +6,7 @@ use sp_std::prelude::*; use pallet_compliance_manager::Error as CMError; use polymesh_common_utilities::compliance_manager::ComplianceFnConfig; use polymesh_primitives::agent::AgentGroup; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::compliance_manager::{ ComplianceReport, ComplianceRequirement, ComplianceRequirementResult, }; @@ -70,7 +70,7 @@ macro_rules! assert_add_claim { }; } -fn get_latest_requirement_id(asset_id: AssetID) -> u32 { +fn get_latest_requirement_id(asset_id: AssetId) -> u32 { ComplianceManager::asset_compliance(asset_id) .requirements .last() diff --git a/pallets/runtime/tests/src/corporate_actions_test.rs b/pallets/runtime/tests/src/corporate_actions_test.rs index 25ff007fc0..7dc0e988c5 100644 --- a/pallets/runtime/tests/src/corporate_actions_test.rs +++ b/pallets/runtime/tests/src/corporate_actions_test.rs @@ -24,7 +24,7 @@ use polymesh_common_utilities::{ constants::currency::ONE_UNIT, traits::checkpoint::{ScheduleCheckpoints, ScheduleId}, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ agent::AgentGroup, asset::CheckpointId, AuthorizationData, Claim, ClaimType, Condition, ConditionType, CountryCode, Document, DocumentId, IdentityId, Moment, PortfolioId, @@ -64,7 +64,7 @@ const P50: Permill = Permill::from_percent(50); const P75: Permill = Permill::from_percent(75); #[track_caller] -fn test(logic: impl FnOnce(AssetID, [User; 3])) { +fn test(logic: impl FnOnce(AssetId, [User; 3])) { ExtBuilder::default() .cdd_providers(vec![CDDP.to_account_id()]) .build() @@ -85,7 +85,7 @@ fn test(logic: impl FnOnce(AssetID, [User; 3])) { } #[track_caller] -fn currency_test(logic: impl FnOnce(AssetID, AssetID, [User; 3])) { +fn currency_test(logic: impl FnOnce(AssetId, AssetId, [User; 3])) { test(|asset_id, users @ [owner, ..]| { set_schedule_complexity(); @@ -96,17 +96,17 @@ fn currency_test(logic: impl FnOnce(AssetID, AssetID, [User; 3])) { }); } -fn transfer_amount(asset_id: &AssetID, from: User, to: User, amount: u128) { +fn transfer_amount(asset_id: &AssetId, from: User, to: User, amount: u128) { assert_ok!(crate::asset_test::transfer(*asset_id, from, to, amount)); } const AMOUNT: u128 = 500; -fn transfer(asset_id: &AssetID, from: User, to: User) { +fn transfer(asset_id: &AssetId, from: User, to: User) { transfer_amount(asset_id, from, to, AMOUNT); } -fn add_caa_auth(asset_id: AssetID, from: User, to: User) -> u64 { +fn add_caa_auth(asset_id: AssetId, from: User, to: User) -> u64 { let sig: Signatory<_> = to.did.into(); let data = AuthorizationData::BecomeAgent(asset_id, AgentGroup::Full); assert_ok!(Identity::add_authorization( @@ -121,7 +121,7 @@ fn add_caa_auth(asset_id: AssetID, from: User, to: User) -> u64 { .auth_id } -fn transfer_caa(asset_id: AssetID, from: User, to: User) -> DispatchResult { +fn transfer_caa(asset_id: AssetId, from: User, to: User) -> DispatchResult { let auth_id = add_caa_auth(asset_id, from, to); ExternalAgents::accept_become_agent(to.origin(), auth_id)?; ExternalAgents::abdicate(from.origin(), asset_id)?; @@ -136,7 +136,7 @@ fn get_ca(id: CAId) -> Option { fn init_ca( owner: User, - asset_id: AssetID, + asset_id: AssetId, kind: CAKind, date: Option, details: String, @@ -164,7 +164,7 @@ fn init_ca( fn basic_ca( owner: User, - asset_id: AssetID, + asset_id: AssetId, targets: Option, default_wht: Option, wht: Option>, @@ -181,11 +181,11 @@ fn basic_ca( ) } -fn dated_ca(owner: User, asset_id: AssetID, kind: CAKind, rd: Option) -> CAResult { +fn dated_ca(owner: User, asset_id: AssetId, kind: CAKind, rd: Option) -> CAResult { init_ca(owner, asset_id, kind, rd, <_>::default(), None, None, None) } -fn moment_ca(owner: User, asset_id: AssetID, kind: CAKind, rd: Option) -> CAResult { +fn moment_ca(owner: User, asset_id: AssetId, kind: CAKind, rd: Option) -> CAResult { dated_ca(owner, asset_id, kind, rd.map(RecordDateSpec::Scheduled)) } @@ -194,7 +194,7 @@ fn set_schedule_complexity() { assert_ok!(Checkpoint::set_schedules_max_complexity(root(), 1000)); } -fn next_ca_id(asset_id: AssetID) -> CAId { +fn next_ca_id(asset_id: AssetId) -> CAId { let local_id = CA::ca_id_sequence(asset_id); CAId { asset_id, local_id } } @@ -702,7 +702,7 @@ fn initiate_corporate_action_targets() { }); } -fn add_doc(owner: User, asset_id: AssetID) { +fn add_doc(owner: User, asset_id: AssetId) { let doc = Document { name: b"foo".into(), uri: b"https://example.com".into(), @@ -1089,7 +1089,7 @@ fn attach_ballot_only_notice() { }); } -fn notice_ca(owner: User, asset_id: AssetID, rd: Option) -> Result { +fn notice_ca(owner: User, asset_id: AssetId, rd: Option) -> Result { let id = next_ca_id(asset_id); moment_ca(owner, asset_id, CAKind::IssuerNotice, rd)?; Ok(id) @@ -1674,7 +1674,7 @@ fn vote_works() { }); } -fn vote_cp_test(mk_ca: impl FnOnce(AssetID, User) -> CAId) { +fn vote_cp_test(mk_ca: impl FnOnce(AssetId, User) -> CAId) { test(|asset_id, [owner, other, voter]| { set_schedule_complexity(); @@ -1728,7 +1728,7 @@ fn vote_scheduled_checkpoint() { vote_cp_test(|asset_id, owner| notice_ca(owner, asset_id, Some(2000)).unwrap()); } -fn dist_ca(owner: User, asset_id: AssetID, rd: Option) -> Result { +fn dist_ca(owner: User, asset_id: AssetId, rd: Option) -> Result { let id = next_ca_id(asset_id); moment_ca(owner, asset_id, CAKind::UnpredictableBenefit, rd)?; Ok(id) @@ -2252,7 +2252,7 @@ fn dist_claim_no_remaining() { }); } -fn dist_claim_cp_test(mk_ca: impl FnOnce(AssetID, User) -> CAId) { +fn dist_claim_cp_test(mk_ca: impl FnOnce(AssetId, User) -> CAId) { currency_test(|asset_id, currency, [owner, other, claimant]| { // Owner ==[500]==> Voter. transfer(&asset_id, owner, claimant); diff --git a/pallets/runtime/tests/src/external_agents_test.rs b/pallets/runtime/tests/src/external_agents_test.rs index 1ac62ab962..a1bf2a9a16 100644 --- a/pallets/runtime/tests/src/external_agents_test.rs +++ b/pallets/runtime/tests/src/external_agents_test.rs @@ -8,7 +8,7 @@ use frame_support::{ }; use pallet_external_agents::{AGIdSequence, AgentOf, GroupOfAgent, NumFullAgents}; use pallet_permissions::StoreCallMetadata; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ agent::{AGId, AgentGroup}, AuthorizationData, ExtrinsicPermissions, PalletPermissions, Signatory, @@ -32,7 +32,7 @@ fn make_perms(pallet: &str) -> ExtrinsicPermissions { } fn add_become_agent( - asset_id: AssetID, + asset_id: AssetId, from: User, to: User, group: AgentGroup, diff --git a/pallets/runtime/tests/src/identity_test.rs b/pallets/runtime/tests/src/identity_test.rs index f4afd41095..5ad0487f4c 100644 --- a/pallets/runtime/tests/src/identity_test.rs +++ b/pallets/runtime/tests/src/identity_test.rs @@ -31,7 +31,7 @@ use polymesh_common_utilities::{ }, SystematicIssuers, GC_DID, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ AccountId, AssetPermissions, AuthorizationData, AuthorizationType, Claim, ClaimType, CustomClaimTypeId, ExtrinsicName, ExtrinsicPermissions, IdentityClaim, IdentityId, KeyRecord, @@ -285,7 +285,7 @@ fn do_add_permissions_to_multiple_tokens() { // Create some tokens. let max_tokens = 20; - let tokens: Vec = (0..max_tokens) + let tokens: Vec = (0..max_tokens) .map(|_| create_and_issue_sample_asset(&alice)) .collect(); @@ -993,7 +993,7 @@ pub(crate) fn test_with_bad_perms(did: IdentityId, test: impl Fn(Permissions)) { test(Permissions { asset: SubsetRestriction::elems( (0..=MAX_ASSETS) - .map(|i| AssetID::new([i.to_le_bytes(), [0; 8]].concat().try_into().unwrap())), + .map(|i| AssetId::new([i.to_le_bytes(), [0; 8]].concat().try_into().unwrap())), ), ..<_>::default() }); diff --git a/pallets/runtime/tests/src/nft.rs b/pallets/runtime/tests/src/nft.rs index 47f898a9b0..ca6531dae9 100644 --- a/pallets/runtime/tests/src/nft.rs +++ b/pallets/runtime/tests/src/nft.rs @@ -9,7 +9,7 @@ use pallet_nft::{ use pallet_portfolio::PortfolioNFT; use polymesh_common_utilities::traits::nft::Event; use polymesh_common_utilities::with_transaction; -use polymesh_primitives::asset::{AssetID, AssetName, AssetType, NonFungibleType}; +use polymesh_primitives::asset::{AssetId, AssetName, AssetType, NonFungibleType}; use polymesh_primitives::asset_metadata::{ AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataName, AssetMetadataSpec, AssetMetadataValue, @@ -177,7 +177,7 @@ pub(crate) fn create_nft_collection( owner: User, asset_type: AssetType, collection_keys: NFTCollectionKeys, -) -> AssetID { +) -> AssetId { let asset_id = Asset::generate_asset_id(owner.acc(), false); Asset::create_asset( owner.origin(), @@ -430,7 +430,7 @@ fn mint_nft_successfully() { pub(crate) fn mint_nft( user: User, - asset_id: AssetID, + asset_id: AssetId, metadata_atributes: Vec, portfolio_kind: PortfolioKind, ) { diff --git a/pallets/runtime/tests/src/portfolio.rs b/pallets/runtime/tests/src/portfolio.rs index a373b5aa50..48199ba29e 100644 --- a/pallets/runtime/tests/src/portfolio.rs +++ b/pallets/runtime/tests/src/portfolio.rs @@ -7,7 +7,7 @@ use pallet_portfolio::{ PortfolioNFT, Portfolios, PreApprovedPortfolios, }; use polymesh_common_utilities::portfolio::PortfolioSubTrait; -use polymesh_primitives::asset::{AssetID, AssetType, NonFungibleType}; +use polymesh_primitives::asset::{AssetId, AssetType, NonFungibleType}; use polymesh_primitives::asset_metadata::{ AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataValue, }; @@ -961,7 +961,7 @@ fn pre_approve_portfolio() { let alice_user_porfolio = PortfolioId::user_portfolio(alice.did, PortfolioNumber(1)); Portfolio::create_portfolio(alice.origin(), b"AliceUserPortfolio".into()).unwrap(); - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); Portfolio::pre_approve_portfolio(alice.origin(), asset_id, alice_default_portfolio) .unwrap(); @@ -989,7 +989,7 @@ fn remove_portfolio_pre_approval() { let alice_user_porfolio = PortfolioId::user_portfolio(alice.did, PortfolioNumber(1)); Portfolio::create_portfolio(alice.origin(), b"AliceUserPortfolio".into()).unwrap(); - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); Portfolio::pre_approve_portfolio(alice.origin(), asset_id, alice_default_portfolio) .unwrap(); Portfolio::remove_portfolio_pre_approval(alice.origin(), asset_id, alice_default_portfolio) @@ -1020,7 +1020,7 @@ fn unauthorized_custodian_pre_approval() { let alice_user_porfolio = PortfolioId::user_portfolio(alice.did, PortfolioNumber(1)); Portfolio::create_portfolio(alice.origin(), b"AliceUserPortfolio".into()).unwrap(); - let asset_id = AssetID::new([0; 16]); + let asset_id = AssetId::new([0; 16]); assert_noop!( Portfolio::pre_approve_portfolio(bob.origin(), asset_id, alice_user_porfolio), Error::UnauthorizedCustodian diff --git a/pallets/runtime/tests/src/settlement_pallet/setup.rs b/pallets/runtime/tests/src/settlement_pallet/setup.rs index 54524ba18f..bf60ca0f79 100644 --- a/pallets/runtime/tests/src/settlement_pallet/setup.rs +++ b/pallets/runtime/tests/src/settlement_pallet/setup.rs @@ -1,6 +1,6 @@ use frame_support::assert_ok; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::settlement::{VenueDetails, VenueId, VenueType}; use crate::asset_pallet::setup::create_and_issue_sample_asset; @@ -12,7 +12,7 @@ type Nft = pallet_nft::Module; type Settlement = pallet_settlement::Module; /// Calls [`create_and_issue_sample_asset`] and creates a venue for `asset_owner`. -pub fn create_and_issue_sample_asset_with_venue(asset_owner: &User) -> (AssetID, Option) { +pub fn create_and_issue_sample_asset_with_venue(asset_owner: &User) -> (AssetId, Option) { let asset_id = create_and_issue_sample_asset(&asset_owner); let venue_id = Settlement::venue_counter(); diff --git a/pallets/runtime/tests/src/settlement_test.rs b/pallets/runtime/tests/src/settlement_test.rs index 5f1e59bfb9..f7cc44ce57 100644 --- a/pallets/runtime/tests/src/settlement_test.rs +++ b/pallets/runtime/tests/src/settlement_test.rs @@ -22,7 +22,7 @@ use pallet_settlement::{ UserVenues, VenueInstructions, }; use polymesh_common_utilities::constants::currency::ONE_UNIT; -use polymesh_primitives::asset::{AssetID, AssetType, NonFungibleType}; +use polymesh_primitives::asset::{AssetId, AssetType, NonFungibleType}; use polymesh_primitives::asset_metadata::{ AssetMetadataKey, AssetMetadataLocalKey, AssetMetadataValue, }; @@ -85,11 +85,11 @@ macro_rules! assert_affirm_instruction { struct UserWithBalance { user: User, - init_balances: Vec<(AssetID, Balance)>, + init_balances: Vec<(AssetId, Balance)>, } impl UserWithBalance { - fn new(user: User, assets: &[AssetID]) -> Self { + fn new(user: User, assets: &[AssetId]) -> Self { Self { init_balances: assets .iter() @@ -106,7 +106,7 @@ impl UserWithBalance { } #[track_caller] - fn init_balance(&self, asset_id: &AssetID) -> Balance { + fn init_balance(&self, asset_id: &AssetId) -> Balance { self.init_balances .iter() .find(|bs| bs.0 == *asset_id) @@ -122,22 +122,22 @@ impl UserWithBalance { } #[track_caller] - fn assert_balance_unchanged(&self, asset_id: &AssetID) { + fn assert_balance_unchanged(&self, asset_id: &AssetId) { assert_balance(asset_id, &self.user, self.init_balance(asset_id)); } #[track_caller] - fn assert_balance_increased(&self, asset_id: &AssetID, amount: Balance) { + fn assert_balance_increased(&self, asset_id: &AssetId, amount: Balance) { assert_balance(asset_id, &self.user, self.init_balance(asset_id) + amount); } #[track_caller] - fn assert_balance_decreased(&self, asset_id: &AssetID, amount: Balance) { + fn assert_balance_decreased(&self, asset_id: &AssetId, amount: Balance) { assert_balance(asset_id, &self.user, self.init_balance(asset_id) - amount); } #[track_caller] - fn assert_portfolio_bal(&self, num: PortfolioNumber, balance: Balance, asset_id: &AssetID) { + fn assert_portfolio_bal(&self, num: PortfolioNumber, balance: Balance, asset_id: &AssetId) { assert_eq!( Portfolio::user_portfolio_balance(self.user.did, num, asset_id), balance, @@ -145,7 +145,7 @@ impl UserWithBalance { } #[track_caller] - fn assert_default_portfolio_bal(&self, balance: Balance, asset_id: &AssetID) { + fn assert_default_portfolio_bal(&self, balance: Balance, asset_id: &AssetId) { assert_eq!( Portfolio::default_portfolio_balance(self.user.did, asset_id), balance, @@ -153,17 +153,17 @@ impl UserWithBalance { } #[track_caller] - fn assert_default_portfolio_bal_unchanged(&self, asset_id: &AssetID) { + fn assert_default_portfolio_bal_unchanged(&self, asset_id: &AssetId) { self.assert_default_portfolio_bal(self.init_balance(asset_id), asset_id); } #[track_caller] - fn assert_default_portfolio_bal_decreased(&self, amount: Balance, asset_id: &AssetID) { + fn assert_default_portfolio_bal_decreased(&self, amount: Balance, asset_id: &AssetId) { self.assert_default_portfolio_bal(self.init_balance(asset_id) - amount, asset_id); } #[track_caller] - fn assert_default_portfolio_bal_increased(&self, amount: Balance, asset_id: &AssetID) { + fn assert_default_portfolio_bal_increased(&self, amount: Balance, asset_id: &AssetId) { self.assert_default_portfolio_bal(self.init_balance(asset_id) + amount, asset_id); } } @@ -1025,8 +1025,8 @@ fn basic_fuzzing() { } fn check_locked_assets( - locked_assets: &HashMap<(IdentityId, AssetID), i32>, - assets: &Vec, + locked_assets: &HashMap<(IdentityId, AssetId), i32>, + assets: &Vec, users: &Vec, ) { for ((did, asset_id), balance) in locked_assets { @@ -2285,7 +2285,7 @@ fn create_instruction( alice: &User, bob: &User, venue_counter: Option, - asset_id: AssetID, + asset_id: AssetId, amount: u128, ) -> InstructionId { let instruction_id = Settlement::instruction_counter(); @@ -3127,7 +3127,7 @@ fn add_instruction_with_offchain_assets() { let bob = User::new(AccountKeyring::Bob); let bob_default_portfolio = PortfolioId::default_portfolio(bob.did); let (asset_id, venue) = create_and_issue_sample_asset_with_venue(&alice); - let asset_id2 = AssetID::new([0; 16]); + let asset_id2 = AssetId::new([0; 16]); let instruction_memo = Some(Memo::default()); Portfolio::create_portfolio(bob.origin(), b"BobUserPortfolio".into()).unwrap(); @@ -4222,7 +4222,7 @@ fn assert_instruction_status( } #[track_caller] -fn assert_balance(asset_id: &AssetID, user: &User, balance: Balance) { +fn assert_balance(asset_id: &AssetId, user: &User, balance: Balance) { assert_eq!(Asset::balance_of(asset_id, user.did), balance); } @@ -4262,7 +4262,7 @@ fn assert_affirms_pending(instruction_id: InstructionId, pending: u64) { } #[track_caller] -fn assert_locked_assets(asset_id: &AssetID, user: &User, num_of_assets: Balance) { +fn assert_locked_assets(asset_id: &AssetId, user: &User, num_of_assets: Balance) { assert_eq!( Portfolio::locked_assets(PortfolioId::default_portfolio(user.did), asset_id), num_of_assets diff --git a/pallets/runtime/tests/src/staking/mock.rs b/pallets/runtime/tests/src/staking/mock.rs index 0b155d9fb6..e1af443f52 100644 --- a/pallets/runtime/tests/src/staking/mock.rs +++ b/pallets/runtime/tests/src/staking/mock.rs @@ -49,7 +49,7 @@ use polymesh_common_utilities::traits::portfolio::PortfolioSubTrait; use polymesh_common_utilities::traits::relayer::SubsidiserTrait; use polymesh_common_utilities::traits::CommonConfig; use polymesh_common_utilities::transaction_payment::ChargeTxFee; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::identity_id::GenesisIdentityRecord; use polymesh_primitives::{ Authorization, AuthorizationData, Claim, IdentityId, Moment, NFTId, Permissions, PortfolioId, @@ -454,11 +454,11 @@ impl PortfolioSubTrait for Test { unimplemented!() } - fn lock_tokens(_: &PortfolioId, _: &AssetID, _: Balance) -> DispatchResult { + fn lock_tokens(_: &PortfolioId, _: &AssetId, _: Balance) -> DispatchResult { unimplemented!() } - fn unlock_tokens(_: &PortfolioId, _: &AssetID, _: Balance) -> DispatchResult { + fn unlock_tokens(_: &PortfolioId, _: &AssetId, _: Balance) -> DispatchResult { unimplemented!() } @@ -470,15 +470,15 @@ impl PortfolioSubTrait for Test { unimplemented!() } - fn lock_nft(_: &PortfolioId, _: &AssetID, _: &NFTId) -> DispatchResult { + fn lock_nft(_: &PortfolioId, _: &AssetId, _: &NFTId) -> DispatchResult { unimplemented!() } - fn unlock_nft(_: &PortfolioId, _: &AssetID, _: &NFTId) -> DispatchResult { + fn unlock_nft(_: &PortfolioId, _: &AssetId, _: &NFTId) -> DispatchResult { unimplemented!() } - fn skip_portfolio_affirmation(_: &PortfolioId, _: &AssetID) -> bool { + fn skip_portfolio_affirmation(_: &PortfolioId, _: &AssetId) -> bool { unimplemented!() } } diff --git a/pallets/runtime/tests/src/sto_test.rs b/pallets/runtime/tests/src/sto_test.rs index af2596bee7..122224c85e 100644 --- a/pallets/runtime/tests/src/sto_test.rs +++ b/pallets/runtime/tests/src/sto_test.rs @@ -5,7 +5,7 @@ use pallet_sto::{ Fundraiser, FundraiserId, FundraiserName, FundraiserStatus, FundraiserTier, PriceTier, MAX_TIERS, }; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::checked_inc::CheckedInc; use polymesh_primitives::settlement::{InstructionStatus, VenueDetails, VenueId, VenueType}; use polymesh_primitives::{IdentityId, PortfolioId, WeightMeter}; @@ -75,8 +75,8 @@ struct RaiseContext { alice_portfolio: PortfolioId, bob: User, bob_portfolio: PortfolioId, - offering_asset: AssetID, - raise_asset: Option, + offering_asset: AssetId, + raise_asset: Option, } fn init_raise_context() -> RaiseContext { diff --git a/pallets/runtime/tests/src/transfer_compliance_test.rs b/pallets/runtime/tests/src/transfer_compliance_test.rs index d889e614d7..f5057c34c2 100644 --- a/pallets/runtime/tests/src/transfer_compliance_test.rs +++ b/pallets/runtime/tests/src/transfer_compliance_test.rs @@ -7,7 +7,7 @@ use frame_support::{ dispatch::{DispatchError, DispatchResult}, }; use pallet_external_agents::Event; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{ asset::AssetType, jurisdiction::CountryCode, statistics::*, transfer_compliance::*, AccountId, Balance, Claim, ClaimType, IdentityId, PortfolioId, PortfolioKind, Scope, WeightMeter, @@ -119,7 +119,7 @@ struct Batch { #[derive(Clone)] struct AssetTracker { name: String, - asset_id: AssetID, + asset_id: AssetId, total_supply: Balance, issuers: HashMap, owner_id: u64, diff --git a/pallets/settlement/src/benchmarking.rs b/pallets/settlement/src/benchmarking.rs index 88df935a77..d97dcfeb73 100644 --- a/pallets/settlement/src/benchmarking.rs +++ b/pallets/settlement/src/benchmarking.rs @@ -88,7 +88,7 @@ fn create_venue_(did: IdentityId, signers: Vec) -> Venu venue_counter } -pub fn create_asset_(owner: &User) -> AssetID { +pub fn create_asset_(owner: &User) -> AssetId { create_and_issue_sample_asset::(owner, true, None, b"MyAsset", true) } diff --git a/pallets/settlement/src/lib.rs b/pallets/settlement/src/lib.rs index ec9f2b3f53..ded062b57d 100644 --- a/pallets/settlement/src/lib.rs +++ b/pallets/settlement/src/lib.rs @@ -76,7 +76,7 @@ pub use polymesh_common_utilities::traits::settlement::{Event, RawEvent, WeightI use polymesh_common_utilities::traits::{asset, compliance_manager, identity, nft, CommonConfig}; use polymesh_common_utilities::with_transaction; use polymesh_common_utilities::SystematicIssuers::Settlement as SettlementDID; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::settlement::{ AffirmationCount, AffirmationStatus, AssetCount, ExecuteInstructionInfo, FilteredLegs, Instruction, InstructionId, InstructionInfo, InstructionStatus, Leg, LegId, LegStatus, @@ -197,7 +197,7 @@ decl_error! { MaxNumberOfOffChainAssetsExceeded, /// The given number of fungible transfers was underestimated. NumberOfFungibleTransfersUnderestimated, - /// AssetID could not be found on chain. + /// AssetId could not be found on chain. UnexpectedOFFChainAsset, /// Off-Chain assets cannot be locked. OffChainAssetCantBeLocked, @@ -281,11 +281,11 @@ decl_storage! { double_map hasher(twox_64_concat) PortfolioId, hasher(twox_64_concat) InstructionId => AffirmationStatus; /// Tracks redemption of receipts. (signer, receipt_uid) -> receipt_used ReceiptsUsed get(fn receipts_used): double_map hasher(twox_64_concat) T::AccountId, hasher(blake2_128_concat) u64 => bool; - /// Tracks if a token has enabled filtering venues that can create instructions involving their token. AssetID -> filtering_enabled - VenueFiltering get(fn venue_filtering): map hasher(blake2_128_concat) AssetID => bool; + /// Tracks if a token has enabled filtering venues that can create instructions involving their token. AssetId -> filtering_enabled + VenueFiltering get(fn venue_filtering): map hasher(blake2_128_concat) AssetId => bool; /// Venues that are allowed to create instructions involving a particular asset. Only used if filtering is enabled. - /// ([`AssetID`], venue_id) -> allowed - VenueAllowList get(fn venue_allow_list): double_map hasher(blake2_128_concat) AssetID, hasher(twox_64_concat) VenueId => bool; + /// ([`AssetId`], venue_id) -> allowed + VenueAllowList get(fn venue_allow_list): double_map hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) VenueId => bool; /// Number of venues in the system (It's one more than the actual number) VenueCounter get(fn venue_counter) build(|_| VenueId(1u64)): VenueId; /// Number of instructions in the system (It's one more than the actual number) @@ -422,13 +422,13 @@ decl_module! { /// Enables or disabled venue filtering for a token. /// /// # Arguments - /// * `asset_id` - AssetID of the token in question. + /// * `asset_id` - AssetId of the token in question. /// * `enabled` - Boolean that decides if the filtering should be enabled. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::set_venue_filtering()] - pub fn set_venue_filtering(origin, asset_id: AssetID, enabled: bool) { + pub fn set_venue_filtering(origin, asset_id: AssetId, enabled: bool) { let did = >::ensure_perms(origin, asset_id)?; if enabled { VenueFiltering::insert(asset_id, enabled); @@ -440,13 +440,13 @@ decl_module! { /// Allows additional venues to create instructions involving an asset. /// - /// * `asset_id` - AssetID of the token in question. + /// * `asset_id` - AssetId of the token in question. /// * `venues` - Array of venues that are allowed to create instructions for the token in question. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::allow_venues(venues.len() as u32)] - pub fn allow_venues(origin, asset_id: AssetID, venues: Vec) { + pub fn allow_venues(origin, asset_id: AssetId, venues: Vec) { let did = >::ensure_perms(origin, asset_id)?; for venue in &venues { VenueAllowList::insert(&asset_id, venue, true); @@ -456,13 +456,13 @@ decl_module! { /// Revokes permission given to venues for creating instructions involving a particular asset. /// - /// * `asset_id` - AssetID of the token in question. + /// * `asset_id` - AssetId of the token in question. /// * `venues` - Array of venues that are no longer allowed to create instructions for the token in question. /// /// # Permissions /// * Asset #[weight = ::WeightInfo::disallow_venues(venues.len() as u32)] - pub fn disallow_venues(origin, asset_id: AssetID, venues: Vec) { + pub fn disallow_venues(origin, asset_id: AssetId, venues: Vec) { let did = >::ensure_perms(origin, asset_id)?; for venue in &venues { VenueAllowList::remove(&asset_id, venue); @@ -1980,7 +1980,7 @@ impl Module { ) -> DispatchResult { if let Some(_) = venue_id { // Avoids reading the storage multiple times for the same asset_id - let mut tickers: BTreeSet = BTreeSet::new(); + let mut tickers: BTreeSet = BTreeSet::new(); for (_, leg) in instruction_legs { if let Some(asset_id) = leg.asset_id() { Self::ensure_venue_filtering(&mut tickers, *asset_id, &venue_id)?; @@ -1992,8 +1992,8 @@ impl Module { /// If `tickers` doesn't contain the given `asset_id` and venue_filtering is enabled, ensures that venue_id is in the allowed list fn ensure_venue_filtering( - tickers: &mut BTreeSet, - asset_id: AssetID, + tickers: &mut BTreeSet, + asset_id: AssetId, venue_id: &Option, ) -> DispatchResult { if let Some(venue_id) = venue_id { @@ -2024,7 +2024,7 @@ impl Module { fn ensure_valid_leg( leg: &Leg, venue_id: &Option, - tickers: &mut BTreeSet, + tickers: &mut BTreeSet, instruction_asset_count: &mut AssetCount, ) -> DispatchResult { match leg { @@ -2072,8 +2072,8 @@ impl Module { /// Ensures all checks needed for a fungible leg hold. This includes making sure that the `amount` being /// transferred is not zero, that `asset_id` exists on chain and that `venue_id` is allowed. fn ensure_valid_fungible_leg( - tickers: &mut BTreeSet, - asset_id: AssetID, + tickers: &mut BTreeSet, + asset_id: AssetId, amount: Balance, venue_id: &Option, ) -> DispatchResult { @@ -2090,7 +2090,7 @@ impl Module { /// transferred is within the defined limits, that there are no duplicate NFTs in the same leg, that `asset_id` exists on chain, /// and that `venue_id` is allowed. fn ensure_valid_nft_leg( - tickers: &mut BTreeSet, + tickers: &mut BTreeSet, nfts: &NFTs, venue_id: &Option, ) -> DispatchResult { @@ -2138,7 +2138,7 @@ impl Module { } /// Returns true if the asset_id is on-chain and false otherwise. - fn is_on_chain_asset(asset_id: &AssetID) -> bool { + fn is_on_chain_asset(asset_id: &AssetId) -> bool { pallet_asset::Assets::contains_key(asset_id) } diff --git a/pallets/settlement/src/migrations.rs b/pallets/settlement/src/migrations.rs index b9f9be972d..fdaa54ca11 100644 --- a/pallets/settlement/src/migrations.rs +++ b/pallets/settlement/src/migrations.rs @@ -50,11 +50,11 @@ mod v2 { decl_storage! { trait Store for Module as Settlement { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub(crate) OldVenueFiltering get(fn venue_filtering): map hasher(blake2_128_concat) Ticker => bool; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub(crate) OldVenueAllowList get(fn venue_allow_list): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) VenueId => bool; @@ -139,7 +139,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); VenueFiltering::insert(asset_id, v); }); log::info!("Migrated {:?} Settlement.VenueFiltering entries.", count); @@ -154,7 +154,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); VenueAllowList::insert(asset_id, id, v); }); log::info!("Migrated {:?} Settlement.VenueAllowList entries.", count); diff --git a/pallets/statistics/src/benchmarking.rs b/pallets/statistics/src/benchmarking.rs index 30eeed327f..ed6124d5de 100644 --- a/pallets/statistics/src/benchmarking.rs +++ b/pallets/statistics/src/benchmarking.rs @@ -82,7 +82,7 @@ fn make_transfer_conditions(stats: &BTreeSet, count: u32) -> BTreeSet< .collect() } -fn init_asset>>() -> (User, AssetID) { +fn init_asset>>() -> (User, AssetId) { let owner = UserBuilder::::default().generate_did().build("OWNER"); let asset_id = create_and_issue_sample_asset::(&owner, true, None, b"MyAsset", true); (owner, asset_id) @@ -93,7 +93,7 @@ fn init_transfer_conditions>>( count_conditions: u32, ) -> ( User, - AssetID, + AssetId, BTreeSet, BTreeSet, ) { @@ -119,7 +119,7 @@ fn init_exempts>>( /// Exempts `exempt_user_id` to follow a transfer condition of claim type `Accredited` for `ticker`. pub fn set_transfer_exception( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, exempt_user_id: IdentityId, ) { let transfer_exception = TransferConditionExemptKey { @@ -152,7 +152,7 @@ pub fn add_identity_claim(id: IdentityId, claim: Claim, issuer_id: Id pub fn setup_transfer_restrictions( origin: T::RuntimeOrigin, sender_id: IdentityId, - asset_id: AssetID, + asset_id: AssetId, n: u32, pause_restrictions: bool, ) { @@ -461,7 +461,7 @@ benchmarks! { let bob = UserBuilder::::default().generate_did().build("Bob"); let alice = UserBuilder::::default().generate_did().build("Alice"); - let asset_id = AssetID::new([i as u8; 16]); + let asset_id = AssetId::new([i as u8; 16]); let mut weight_meter = WeightMeter::max_limit_no_minimum(); let transfer_conditions: BTreeSet = (0..i) @@ -488,7 +488,7 @@ benchmarks! { let a in 1..T::MaxStatsPerAsset::get(); let alice = UserBuilder::::default().generate_did().build("Alice"); - let asset_id = AssetID::new([a as u8; 16]); + let asset_id = AssetId::new([a as u8; 16]); let statistics: BTreeSet = (0..a) .map(|a| StatType { @@ -505,7 +505,7 @@ benchmarks! { is_exempt { let alice = UserBuilder::::default().generate_did().build("Alice"); let bob = UserBuilder::::default().generate_did().build("Bob"); - let asset_id = AssetID::new([0 as u8; 16]); + let asset_id = AssetId::new([0 as u8; 16]); let statistic_claim = StatClaim::Jurisdiction(Some(CountryCode::BR)); let transfer_condition = TransferCondition::ClaimOwnership(statistic_claim, alice.did(), Permill::zero(), Permill::zero()); TransferConditionExemptEntities::insert(transfer_condition.get_exempt_key(asset_id.clone()), bob.did(), true); diff --git a/pallets/statistics/src/lib.rs b/pallets/statistics/src/lib.rs index 727021363c..53afcce1c2 100644 --- a/pallets/statistics/src/lib.rs +++ b/pallets/statistics/src/lib.rs @@ -28,7 +28,7 @@ use sp_std::{collections::btree_set::BTreeSet, vec, vec::Vec}; use polymesh_common_utilities::asset::AssetFnTrait; pub use polymesh_common_utilities::traits::statistics::{Config, Event, WeightInfo}; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::statistics::{ Percentage, Stat1stKey, Stat2ndKey, StatOpType, StatType, StatUpdate, }; @@ -46,17 +46,17 @@ storage_migration_ver!(3); decl_storage! { trait Store for Module as Statistics { - /// Maps a set of [`StatType`] for each [`AssetID`]. + /// Maps a set of [`StatType`] for each [`AssetId`]. pub ActiveAssetStats get(fn active_asset_stats): - map hasher(blake2_128_concat) AssetID => BoundedBTreeSet; + map hasher(blake2_128_concat) AssetId => BoundedBTreeSet; /// Asset stats. pub AssetStats get(fn asset_stats): double_map hasher(blake2_128_concat) Stat1stKey, hasher(blake2_128_concat) Stat2ndKey => u128; - /// The [`AssetTransferCompliance`] for each [`AssetID`]. + /// The [`AssetTransferCompliance`] for each [`AssetId`]. pub AssetTransferCompliances get(fn asset_transfer_compliance): - map hasher(blake2_128_concat) AssetID => AssetTransferCompliance; + map hasher(blake2_128_concat) AssetId => AssetTransferCompliance; /// Entities exempt from a Transfer Compliance rule. pub TransferConditionExemptEntities get(fn transfer_condition_exempt_entities): @@ -88,7 +88,7 @@ decl_module! { /// /// # Arguments /// - `origin` - a signer that has permissions to act as an agent of `asset_id`. - /// - `asset_id` - the [`AssetID`] to change the active stats on. + /// - `asset_id` - the [`AssetId`] to change the active stats on. /// - `stat_types` - the new stat types to replace any existing types. /// /// # Errors @@ -100,7 +100,7 @@ decl_module! { /// - Agent /// - Asset #[weight = ::WeightInfo::set_active_asset_stats(stat_types.len() as u32)] - pub fn set_active_asset_stats(origin, asset_id: AssetID, stat_types: BTreeSet) { + pub fn set_active_asset_stats(origin, asset_id: AssetId, stat_types: BTreeSet) { Self::base_set_active_asset_stats(origin, asset_id, stat_types)?; } @@ -108,7 +108,7 @@ decl_module! { /// /// # Arguments /// - `origin` - a signer that has permissions to act as an agent of `asset_id`. - /// - `asset_id` - the [`AssetID`] to change the active stats on. + /// - `asset_id` - the [`AssetId`] to change the active stats on. /// - `stat_type` - stat type to update. /// - `values` - Updated values for `stat_type`. /// @@ -120,7 +120,7 @@ decl_module! { /// - Agent /// - Asset #[weight = ::WeightInfo::batch_update_asset_stats(values.len() as u32)] - pub fn batch_update_asset_stats(origin, asset_id: AssetID, stat_type: StatType, values: BTreeSet) { + pub fn batch_update_asset_stats(origin, asset_id: AssetId, stat_type: StatType, values: BTreeSet) { Self::base_batch_update_asset_stats(origin, asset_id, stat_type, values)?; } @@ -128,7 +128,7 @@ decl_module! { /// /// # Arguments /// - `origin` - a signer that has permissions to act as an agent of `asset_id`. - /// - `asset_id` - the [`AssetID`] to change the active stats on. + /// - `asset_id` - the [`AssetId`] to change the active stats on. /// - `transfer_conditions` - the new transfer condition to replace any existing conditions. /// /// # Errors @@ -140,7 +140,7 @@ decl_module! { /// - Agent /// - Asset #[weight = ::WeightInfo::set_asset_transfer_compliance(transfer_conditions.len() as u32)] - pub fn set_asset_transfer_compliance(origin, asset_id: AssetID, transfer_conditions: BTreeSet) { + pub fn set_asset_transfer_compliance(origin, asset_id: AssetId, transfer_conditions: BTreeSet) { Self::base_set_asset_transfer_compliance(origin, asset_id, transfer_conditions)?; } @@ -168,18 +168,18 @@ decl_module! { impl Module { fn ensure_asset_perms( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, ) -> Result { >::ensure_perms(origin, asset_id) } - fn is_asset_stat_active(asset_id: &AssetID, stat_type: &StatType) -> bool { + fn is_asset_stat_active(asset_id: &AssetId, stat_type: &StatType) -> bool { Self::active_asset_stats(asset_id).contains(stat_type) } fn base_set_active_asset_stats( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, stat_types: BTreeSet, ) -> DispatchResult { // Check EA permissions for asset. @@ -240,7 +240,7 @@ impl Module { fn base_batch_update_asset_stats( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, stat_type: StatType, values: BTreeSet, ) -> DispatchResult { @@ -278,7 +278,7 @@ impl Module { fn base_set_asset_transfer_compliance( origin: T::RuntimeOrigin, - asset_id: AssetID, + asset_id: AssetId, transfer_conditions: BTreeSet, ) -> DispatchResult { // Check EA permissions for asset. @@ -486,7 +486,7 @@ impl Module { /// Update asset stats. pub fn update_asset_stats( - asset_id: AssetID, + asset_id: AssetId, from_did: Option<&IdentityId>, to_did: Option<&IdentityId>, from_balance: Option, @@ -751,7 +751,7 @@ impl Module { /// Check transfer condition. fn check_transfer_condition( condition: &TransferCondition, - asset_id: AssetID, + asset_id: AssetId, from_did: &IdentityId, to_did: &IdentityId, to_balance: Balance, @@ -820,7 +820,7 @@ impl Module { /// is in the exemption list or if [`TransferCondition`] operation is of type [`StatOpType::Balance`] and /// `receiver_did` is in the exemption list, otherwise returns `false`. fn is_exempt( - asset_id: AssetID, + asset_id: AssetId, transfer_condition: &TransferCondition, sender_did: &IdentityId, receiver_did: &IdentityId, @@ -841,7 +841,7 @@ impl Module { /// Verify transfer restrictions for a transfer. pub fn verify_transfer_restrictions( - asset_id: AssetID, + asset_id: AssetId, sender_did: &IdentityId, receiver_did: &IdentityId, sender_balance: Balance, @@ -873,7 +873,7 @@ impl Module { /// Returns `true` if all `requirements` are met, otherwise returns `false`. fn verify_requirements>( transfer_conditions: &BoundedBTreeSet, - asset_id: AssetID, + asset_id: AssetId, sender_did: &IdentityId, receiver_did: &IdentityId, sender_balance: Balance, @@ -910,7 +910,7 @@ impl Module { /// Returns a vector containing all [`TransferCondition`] that are not being respected for the transfer. An empty vec means there's no error. pub fn transfer_restrictions_report( - asset_id: AssetID, + asset_id: AssetId, sender_did: &IdentityId, receiver_did: &IdentityId, transfer_amount: Balance, diff --git a/pallets/statistics/src/migrations.rs b/pallets/statistics/src/migrations.rs index 0d57c5b2c5..b6c3141cf0 100644 --- a/pallets/statistics/src/migrations.rs +++ b/pallets/statistics/src/migrations.rs @@ -63,8 +63,8 @@ mod v2 { } } -impl From for AssetID { - fn from(v2_asset_scope: v2::AssetScope) -> AssetID { +impl From for AssetId { + fn from(v2_asset_scope: v2::AssetScope) -> AssetId { match v2_asset_scope { v2::AssetScope::Ticker(ticker) => ticker.into(), } @@ -114,7 +114,7 @@ pub(crate) fn migrate_to_v3() { count += 1; let set: BTreeSet = set.into_iter().map(|v| v.into()).collect(); let bounded_set = BoundedBTreeSet::try_from(set).unwrap_or_default(); - ActiveAssetStats::::insert(AssetID::from(scope), bounded_set); + ActiveAssetStats::::insert(AssetId::from(scope), bounded_set); }); log::info!("Migrated {:?} Statistics.ActiveAssetStats entries.", count); @@ -138,7 +138,7 @@ pub(crate) fn migrate_to_v3() { ); v2::OldAssetTransferCompliances::::drain().for_each(|(scope, compliance)| { count += 1; - AssetTransferCompliances::::insert(AssetID::from(scope), compliance); + AssetTransferCompliances::::insert(AssetId::from(scope), compliance); }); log::info!( "Migrated {:?} Statistics.AssetTransferCompliances entries.", diff --git a/pallets/sto/src/benchmarking.rs b/pallets/sto/src/benchmarking.rs index afba3bf6b0..2770fd31b1 100644 --- a/pallets/sto/src/benchmarking.rs +++ b/pallets/sto/src/benchmarking.rs @@ -22,8 +22,8 @@ struct SetupPortfolios { pub investor_offering_portfolio: PortfolioId, pub fundraiser_raising_portfolio: PortfolioId, pub investor_raising_portfolio: PortfolioId, - pub offering_asset_id: AssetID, - pub raising_asset_id: AssetID, + pub offering_asset_id: AssetId, + pub raising_asset_id: AssetId, } fn create_assets_and_compliance(fundraiser: &User, investor: &User) -> SetupPortfolios diff --git a/pallets/sto/src/lib.rs b/pallets/sto/src/lib.rs index a8a07c00ad..452b3d0593 100644 --- a/pallets/sto/src/lib.rs +++ b/pallets/sto/src/lib.rs @@ -42,7 +42,7 @@ use pallet_settlement::VenueInfo; use polymesh_common_utilities::portfolio::PortfolioSubTrait; use polymesh_common_utilities::traits::{identity, portfolio}; use polymesh_common_utilities::with_transaction; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::impl_checked_inc; use polymesh_primitives::settlement::{Leg, ReceiptDetails, SettlementType, VenueId, VenueType}; use polymesh_primitives::{ @@ -59,7 +59,7 @@ type Portfolio = pallet_portfolio::Module; type Settlement = pallet_settlement::Module; type Timestamp = pallet_timestamp::Pallet; -/// The per-AssetID ID of a fundraiser. +/// The per-AssetId ID of a fundraiser. #[derive(Encode, Decode, TypeInfo)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default, Debug)] pub struct FundraiserId(pub u64); @@ -94,11 +94,11 @@ pub struct Fundraiser { /// Portfolio containing the asset being offered. pub offering_portfolio: PortfolioId, /// Asset being offered. - pub offering_asset: AssetID, + pub offering_asset: AssetId, /// Portfolio receiving funds raised. pub raising_portfolio: PortfolioId, /// Asset to receive payment in. - pub raising_asset: AssetID, + pub raising_asset: AssetId, /// Tiers of the fundraiser. /// Each tier has a set amount of tokens available at a fixed price. /// The sum of the tiers is the total amount available in this fundraiser. @@ -192,7 +192,7 @@ decl_event!( FundraiserCreated(IdentityId, FundraiserId, FundraiserName, Fundraiser), /// An investor invested in the fundraiser. /// (Investor, fundraiser_id, offering token, raise token, offering_token_amount, raise_token_amount) - Invested(IdentityId, FundraiserId, AssetID, AssetID, Balance, Balance), + Invested(IdentityId, FundraiserId, AssetId, AssetId, Balance, Balance), /// A fundraiser has been frozen. /// (Agent DID, fundraiser id) FundraiserFrozen(IdentityId, FundraiserId), @@ -250,23 +250,23 @@ storage_migration_ver!(1); decl_storage! { trait Store for Module as Sto { /// All fundraisers that are currently running. - /// (AssetID, fundraiser_id) -> Fundraiser + /// (AssetId, fundraiser_id) -> Fundraiser Fundraisers get(fn fundraisers): double_map - hasher(blake2_128_concat) AssetID, + hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) FundraiserId => Option>; /// Total fundraisers created for a token. FundraiserCount get(fn fundraiser_count): - map hasher(blake2_128_concat) AssetID + map hasher(blake2_128_concat) AssetId => FundraiserId; /// Name for the Fundraiser. Only used offchain. - /// (AssetID, fundraiser_id) -> Fundraiser name + /// (AssetId, fundraiser_id) -> Fundraiser name FundraiserNames get(fn fundraiser_name): double_map - hasher(blake2_128_concat) AssetID, + hasher(blake2_128_concat) AssetId, hasher(twox_64_concat) FundraiserId => Option; @@ -308,9 +308,9 @@ decl_module! { pub fn create_fundraiser( origin, offering_portfolio: PortfolioId, - offering_asset: AssetID, + offering_asset: AssetId, raising_portfolio: PortfolioId, - raising_asset: AssetID, + raising_asset: AssetId, tiers: Vec, venue_id: VenueId, start: Option, @@ -396,7 +396,7 @@ decl_module! { origin, investment_portfolio: PortfolioId, funding_portfolio: PortfolioId, - offering_asset: AssetID, + offering_asset: AssetId, id: FundraiserId, purchase_amount: Balance, max_price: Option, @@ -533,7 +533,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::freeze_fundraiser()] - pub fn freeze_fundraiser(origin, offering_asset: AssetID, id: FundraiserId) -> DispatchResult { + pub fn freeze_fundraiser(origin, offering_asset: AssetId, id: FundraiserId) -> DispatchResult { Self::set_frozen(origin, offering_asset, id, true) } @@ -545,7 +545,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::unfreeze_fundraiser()] - pub fn unfreeze_fundraiser(origin, offering_asset: AssetID, id: FundraiserId) -> DispatchResult { + pub fn unfreeze_fundraiser(origin, offering_asset: AssetId, id: FundraiserId) -> DispatchResult { Self::set_frozen(origin, offering_asset, id, false) } @@ -561,7 +561,7 @@ decl_module! { #[weight = ::WeightInfo::modify_fundraiser_window()] pub fn modify_fundraiser_window( origin, - offering_asset: AssetID, + offering_asset: AssetId, id: FundraiserId, start: T::Moment, end: Option, @@ -592,7 +592,7 @@ decl_module! { /// # Permissions /// * Asset #[weight = ::WeightInfo::stop()] - pub fn stop(origin, offering_asset: AssetID, id: FundraiserId) { + pub fn stop(origin, offering_asset: AssetId, id: FundraiserId) { let mut fundraiser = Self::ensure_fundraiser(offering_asset, id)?; let did = >::ensure_asset_perms(origin, offering_asset)?.primary_did; @@ -621,7 +621,7 @@ decl_module! { impl Module { fn set_frozen( origin: T::RuntimeOrigin, - offering_asset: AssetID, + offering_asset: AssetId, id: FundraiserId, frozen: bool, ) -> DispatchResult { @@ -640,7 +640,7 @@ impl Module { } fn ensure_fundraiser( - asset_id: AssetID, + asset_id: AssetId, id: FundraiserId, ) -> Result, DispatchError> { Fundraisers::::get(asset_id, id).ok_or_else(|| Error::::FundraiserNotFound.into()) diff --git a/pallets/sto/src/migrations.rs b/pallets/sto/src/migrations.rs index 0338298779..0b5c5be027 100644 --- a/pallets/sto/src/migrations.rs +++ b/pallets/sto/src/migrations.rs @@ -25,15 +25,15 @@ mod v0 { decl_storage! { trait Store for Module as Sto { - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub(crate) OldFundraisers get(fn fundraisers): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) FundraiserId => Option>; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub(crate) OldFundraiserCount get(fn fundraiser_count): map hasher(blake2_128_concat) Ticker => FundraiserId; - // This storage changed the Ticker key to AssetID. + // This storage changed the Ticker key to AssetId. pub(crate) OldFundraiserNames get(fn fundraiser_name): double_map hasher(blake2_128_concat) Ticker, hasher(twox_64_concat) FundraiserId => Option; } @@ -49,9 +49,9 @@ impl From> for Fundraiser { Fundraiser { creator: v0_fundraiser.creator, offering_portfolio: v0_fundraiser.offering_portfolio, - offering_asset: AssetID::from(v0_fundraiser.offering_asset), + offering_asset: AssetId::from(v0_fundraiser.offering_asset), raising_portfolio: v0_fundraiser.raising_portfolio, - raising_asset: AssetID::from(v0_fundraiser.raising_asset), + raising_asset: AssetId::from(v0_fundraiser.raising_asset), tiers: v0_fundraiser.tiers, venue_id: v0_fundraiser.venue_id, start: v0_fundraiser.start, @@ -78,7 +78,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); Fundraisers::::insert(asset_id, id, Fundraiser::from(fundraiser)); }); log::info!("Migrated {:?} Sto.Fundraiser entries.", count); @@ -93,7 +93,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); FundraiserCount::insert(asset_id, id); }); log::info!("Migrated {:?} Sto.FundraiserCount entries.", count); @@ -108,7 +108,7 @@ pub(crate) fn migrate_to_v1() { count += 1; let asset_id = ticker_to_asset_id .entry(ticker) - .or_insert(AssetID::from(ticker)); + .or_insert(AssetId::from(ticker)); FundraiserNames::insert(asset_id, id, name); }); log::info!("Migrated {:?} Sto.FundraiserNames entries.", count); diff --git a/pallets/weights/src/pallet_asset.rs b/pallets/weights/src/pallet_asset.rs index 1c52d6ab5b..d5949da4ad 100644 --- a/pallets/weights/src/pallet_asset.rs +++ b/pallets/weights/src/pallet_asset.rs @@ -57,8 +57,8 @@ impl pallet_asset::WeightInfo for SubstrateWeight { // Proof Skipped: Identity KeyRecords (max_values: None, max_size: None, mode: Measured) // Storage: Asset TickerConfig (r:1 w:0) // Proof Skipped: Asset TickerConfig (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Asset TickerAssetID (r:1 w:0) - // Proof Skipped: Asset TickerAssetID (max_values: None, max_size: None, mode: Measured) + // Storage: Asset TickerAssetId (r:1 w:0) + // Proof Skipped: Asset TickerAssetId (max_values: None, max_size: None, mode: Measured) // Storage: Asset UniqueTickerRegistration (r:1 w:1) // Proof Skipped: Asset UniqueTickerRegistration (max_values: None, max_size: None, mode: Measured) // Storage: Timestamp Now (r:1 w:0) @@ -83,8 +83,8 @@ impl pallet_asset::WeightInfo for SubstrateWeight { // Proof Skipped: Identity Authorizations (max_values: None, max_size: None, mode: Measured) // Storage: Identity OutdatedAuthorizations (r:1 w:0) // Proof Skipped: Identity OutdatedAuthorizations (max_values: None, max_size: None, mode: Measured) - // Storage: Asset TickerAssetID (r:1 w:0) - // Proof Skipped: Asset TickerAssetID (max_values: None, max_size: None, mode: Measured) + // Storage: Asset TickerAssetId (r:1 w:0) + // Proof Skipped: Asset TickerAssetId (max_values: None, max_size: None, mode: Measured) // Storage: Asset UniqueTickerRegistration (r:1 w:1) // Proof Skipped: Asset UniqueTickerRegistration (max_values: None, max_size: None, mode: Measured) // Storage: Identity NumberOfGivenAuths (r:1 w:1) @@ -113,8 +113,8 @@ impl pallet_asset::WeightInfo for SubstrateWeight { // Proof Skipped: Permissions CurrentPalletName (max_values: Some(1), max_size: None, mode: Measured) // Storage: Permissions CurrentDispatchableName (r:1 w:0) // Proof Skipped: Permissions CurrentDispatchableName (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Asset AssetIDTicker (r:1 w:0) - // Proof Skipped: Asset AssetIDTicker (max_values: None, max_size: None, mode: Measured) + // Storage: Asset AssetIdTicker (r:1 w:0) + // Proof Skipped: Asset AssetIdTicker (max_values: None, max_size: None, mode: Measured) // Storage: Asset UniqueTickerRegistration (r:1 w:1) // Proof Skipped: Asset UniqueTickerRegistration (max_values: None, max_size: None, mode: Measured) // Storage: Identity NumberOfGivenAuths (r:1 w:1) @@ -730,10 +730,10 @@ impl pallet_asset::WeightInfo for SubstrateWeight { // Proof Skipped: Asset UniqueTickerRegistration (max_values: None, max_size: None, mode: Measured) // Storage: Timestamp Now (r:1 w:0) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - // Storage: Asset TickerAssetID (r:1 w:1) - // Proof Skipped: Asset TickerAssetID (max_values: None, max_size: None, mode: Measured) - // Storage: Asset AssetIDTicker (r:0 w:1) - // Proof Skipped: Asset AssetIDTicker (max_values: None, max_size: None, mode: Measured) + // Storage: Asset TickerAssetId (r:1 w:1) + // Proof Skipped: Asset TickerAssetId (max_values: None, max_size: None, mode: Measured) + // Storage: Asset AssetIdTicker (r:0 w:1) + // Proof Skipped: Asset AssetIdTicker (max_values: None, max_size: None, mode: Measured) fn link_ticker_to_asset_id() -> Weight { // Minimum execution time: 50_587 nanoseconds. Weight::from_ref_time(53_381_000) @@ -750,12 +750,12 @@ impl pallet_asset::WeightInfo for SubstrateWeight { // Proof Skipped: Permissions CurrentDispatchableName (max_values: Some(1), max_size: None, mode: Measured) // Storage: Asset UniqueTickerRegistration (r:1 w:1) // Proof Skipped: Asset UniqueTickerRegistration (max_values: None, max_size: None, mode: Measured) - // Storage: Asset TickerAssetID (r:1 w:1) - // Proof Skipped: Asset TickerAssetID (max_values: None, max_size: None, mode: Measured) + // Storage: Asset TickerAssetId (r:1 w:1) + // Proof Skipped: Asset TickerAssetId (max_values: None, max_size: None, mode: Measured) // Storage: Asset TickersOwnedByUser (r:0 w:1) // Proof Skipped: Asset TickersOwnedByUser (max_values: None, max_size: None, mode: Measured) - // Storage: Asset AssetIDTicker (r:0 w:1) - // Proof Skipped: Asset AssetIDTicker (max_values: None, max_size: None, mode: Measured) + // Storage: Asset AssetIdTicker (r:0 w:1) + // Proof Skipped: Asset AssetIdTicker (max_values: None, max_size: None, mode: Measured) fn unlink_ticker_from_asset_id() -> Weight { // Minimum execution time: 50_587 nanoseconds. Weight::from_ref_time(53_381_000) diff --git a/polymesh_schema.json b/polymesh_schema.json index be3e701ac9..7250ef6f52 100644 --- a/polymesh_schema.json +++ b/polymesh_schema.json @@ -1,6 +1,6 @@ { "types": { - "AssetID": "[u8; 16]", + "AssetId": "[u8; 16]", "IdentityId": "[u8; 32]", "Ticker": "[u8; 12]", "CddId": "[u8; 32]", @@ -9,8 +9,8 @@ "AssetPermissions": { "_enum": { "Whole": "", - "These": "Vec", - "Except": "Vec" + "These": "Vec", + "Except": "Vec" } }, "PortfolioPermissions": { @@ -313,7 +313,7 @@ "Scope": { "_enum": { "Identity": "IdentityId", - "Asset": "AssetID", + "Asset": "AssetId", "Custom": "Vec" } }, @@ -399,10 +399,10 @@ "RotatePrimaryKey": "", "TransferTicker": "Ticker", "AddMultiSigSigner": "AccountId", - "TransferAssetOwnership": "AssetID", + "TransferAssetOwnership": "AssetId", "JoinIdentity": "Permissions", "PortfolioCustody": "PortfolioId", - "BecomeAgent": "(AssetID, AgentGroup)", + "BecomeAgent": "(AssetId, AgentGroup)", "AddRelayerPayingKey": "(AccountId, AccountId, Balance)", "RotatePrimaryKeyToSecondary": "Permissions" } @@ -570,13 +570,13 @@ }, "NFTId": "u64", "NFTs": { - "asset_id": "AssetID", + "asset_id": "AssetId", "ids": "Vec" }, "FungibleLeg": { "sender": "PortfolioId", "receiver": "PortfolioId", - "asset_id": "AssetID", + "asset_id": "AssetId", "amount": "Balance" }, "NonFungibleLeg": { @@ -587,7 +587,7 @@ "OffChainLeg": { "sender_identity": "IdentityId", "receiver_identity": "IdentityId", - "asset_id": "AssetID", + "asset_id": "AssetId", "amount": "Balance" }, "Leg": { @@ -846,7 +846,7 @@ }, { "name": "asset_id", - "type": "AssetID", + "type": "AssetId", "isOptional": false }, { @@ -994,7 +994,7 @@ "params": [ { "name": "asset_id", - "type": "AssetID" + "type": "AssetId" }, { "name": "sender_identity", @@ -1026,7 +1026,7 @@ }, { "name": "asset_id", - "type": "AssetID" + "type": "AssetId" }, { "name": "transfer_value", @@ -1301,7 +1301,7 @@ "params": [ { "name": "asset_id", - "type": "AssetID" + "type": "AssetId" }, { "name": "sender_identity", @@ -1326,7 +1326,7 @@ "params": [ { "name": "asset_id", - "type": "AssetID" + "type": "AssetId" }, { "name": "sender_did", diff --git a/primitives/src/asset.rs b/primitives/src/asset.rs index 5dee07e7f6..53f5dd5b76 100644 --- a/primitives/src/asset.rs +++ b/primitives/src/asset.rs @@ -29,32 +29,32 @@ use polymesh_primitives_derive::VecU8StrongTyped; #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[derive(Decode, Encode, TypeInfo)] #[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct AssetID([u8; 16]); +pub struct AssetId([u8; 16]); -impl From<[u8; 16]> for AssetID { +impl From<[u8; 16]> for AssetId { fn from(mut value: [u8; 16]) -> Self { // Version 8. value[6] = (value[6] & 0x0f) | 0x80; // Standard RFC4122 variant (bits 10xx) value[8] = (value[8] & 0x3f) | 0x80; - AssetID(value) + AssetId(value) } } -impl AssetID { - /// Creates a new [`AssetID`] instance; +impl AssetId { + /// Creates a new [`AssetId`] instance; pub fn new(value: [u8; 16]) -> Self { value.into() } - /// Converts [`AssetID`] type into a shared reference of bytes. + /// Converts [`AssetId`] type into a shared reference of bytes. pub fn as_ref(&self) -> &[u8] { self.0.as_ref() } } -impl From for AssetID { - fn from(ticker: Ticker) -> AssetID { +impl From for AssetId { + fn from(ticker: Ticker) -> AssetId { blake2_128(&(b"legacy_ticker", ticker).encode()).into() } } diff --git a/primitives/src/authorization.rs b/primitives/src/authorization.rs index e6d575c379..f604c87ff1 100644 --- a/primitives/src/authorization.rs +++ b/primitives/src/authorization.rs @@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize}; use sp_std::prelude::*; use crate::agent::AgentGroup; -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::identity_id::IdentityId; use crate::secondary_key::Permissions; use crate::{Balance, PortfolioId, Ticker}; @@ -42,14 +42,14 @@ pub enum AuthorizationData { AddMultiSigSigner(AccountId), /// Authorization to transfer a token's ownership /// Must be issued by the current owner of the asset - TransferAssetOwnership(AssetID), + TransferAssetOwnership(AssetId), /// Authorization to join an Identity /// Must be issued by the identity which is being joined JoinIdentity(Permissions), /// Authorization to take custody of a portfolio PortfolioCustody(PortfolioId), - /// Authorization to become an agent of the `AssetID` with the `AgentGroup`. - BecomeAgent(AssetID, AgentGroup), + /// Authorization to become an agent of the `AssetId` with the `AgentGroup`. + BecomeAgent(AssetId, AgentGroup), /// Add Relayer paying key to user key /// Must be issued by the paying key. /// `AddRelayerPayingKey(user_key, paying_key, polyx_limit)` diff --git a/primitives/src/identity_claim.rs b/primitives/src/identity_claim.rs index 0ae0e079d6..3768792415 100644 --- a/primitives/src/identity_claim.rs +++ b/primitives/src/identity_claim.rs @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::{identity_id::IdentityId, impl_checked_inc, CddId, Moment}; use codec::{Decode, Encode}; @@ -39,7 +39,7 @@ pub enum Scope { /// Scoped to an Identity Identity(IdentityId), /// Scoped to an asset. - Asset(AssetID), + Asset(AssetId), /// Scoped to arbitrary bytes Custom(Vec), } @@ -50,8 +50,8 @@ impl From for Scope { } } -impl From for Scope { - fn from(asset_id: AssetID) -> Self { +impl From for Scope { + fn from(asset_id: AssetId) -> Self { Self::Asset(asset_id) } } diff --git a/primitives/src/nft.rs b/primitives/src/nft.rs index 336652f7d7..dd720c5c25 100644 --- a/primitives/src/nft.rs +++ b/primitives/src/nft.rs @@ -7,7 +7,7 @@ use sp_std::collections::btree_set::BTreeSet; use sp_std::vec::IntoIter; use sp_std::vec::Vec; -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::asset_metadata::{AssetMetadataKey, AssetMetadataValue}; use crate::impl_checked_inc; @@ -31,12 +31,12 @@ impl_checked_inc!(NFTId); #[derive(Clone, Debug, Decode, Default, Encode, PartialEq, TypeInfo)] pub struct NFTCollection { id: NFTCollectionId, - asset_id: AssetID, + asset_id: AssetId, } impl NFTCollection { /// Creates a new `NFTCollection`. - pub fn new(id: NFTCollectionId, asset_id: AssetID) -> Self { + pub fn new(id: NFTCollectionId, asset_id: AssetId) -> Self { Self { id, asset_id } } @@ -45,28 +45,28 @@ impl NFTCollection { &self.id } - /// Returns a reference to the [`AssetID`] associated with the collection. - pub fn asset_id(&self) -> &AssetID { + /// Returns a reference to the [`AssetId`] associated with the collection. + pub fn asset_id(&self) -> &AssetId { &self.asset_id } } -/// Represent all NFT being transferred for a given [`AssetID`]. +/// Represent all NFT being transferred for a given [`AssetId`]. #[derive(Clone, Debug, Decode, Default, Encode, Eq, PartialEq, TypeInfo)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct NFTs { - asset_id: AssetID, + asset_id: AssetId, ids: Vec, } impl NFTs { /// Creates an `NFTs` instance without checking for duplicate ids. - pub fn new_unverified(asset_id: AssetID, ids: Vec) -> Self { + pub fn new_unverified(asset_id: AssetId, ids: Vec) -> Self { NFTs { asset_id, ids } } /// Creates an `NFTs` instance. - pub fn new(asset_id: AssetID, ids: Vec) -> Result { + pub fn new(asset_id: AssetId, ids: Vec) -> Result { let unique_ids: BTreeSet<&NFTId> = ids.iter().collect(); if unique_ids.len() != ids.len() { return Err("No duplicate NFTIds are allowed"); @@ -74,8 +74,8 @@ impl NFTs { Ok(NFTs { asset_id, ids }) } - /// Returns a reference to the [`AssetID`] of the `NFTs`. - pub fn asset_id(&self) -> &AssetID { + /// Returns a reference to the [`AssetId`] of the `NFTs`. + pub fn asset_id(&self) -> &AssetId { &self.asset_id } diff --git a/primitives/src/portfolio.rs b/primitives/src/portfolio.rs index fc435de526..f4bb9cbf0d 100644 --- a/primitives/src/portfolio.rs +++ b/primitives/src/portfolio.rs @@ -16,7 +16,7 @@ use codec::{Decode, Encode}; use scale_info::TypeInfo; -use crate::asset::{AssetID, FundingRoundName}; +use crate::asset::{AssetId, FundingRoundName}; use crate::settlement::InstructionId; use crate::{Balance, Memo, NFTs}; @@ -34,8 +34,8 @@ pub struct Fund { pub enum FundDescription { /// Fungible token. Fungible { - /// The [`AssetID`] of the token. - asset_id: AssetID, + /// The [`AssetId`] of the token. + asset_id: AssetId, /// The Balance being transfered. amount: Balance, }, diff --git a/primitives/src/secondary_key.rs b/primitives/src/secondary_key.rs index 8f52bf4dd1..4ceb62cc85 100644 --- a/primitives/src/secondary_key.rs +++ b/primitives/src/secondary_key.rs @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::{ExtrinsicName, IdentityId, PalletName, PortfolioId, SubsetRestriction}; use codec::{Decode, Encode}; use scale_info::TypeInfo; @@ -39,7 +39,7 @@ fn name_complexity(name: &str) -> usize { } /// Asset permissions. -pub type AssetPermissions = SubsetRestriction; +pub type AssetPermissions = SubsetRestriction; /// A permission to call: /// @@ -251,7 +251,7 @@ impl Permissions { let cost = self.extrinsic.complexity(); // Asset permissions complexity cost. - cost.saturating_add(self.asset.complexity().saturating_mul(size_of::())) + cost.saturating_add(self.asset.complexity().saturating_mul(size_of::())) // Portfolio permissions complexity cost. .saturating_add( self.portfolio @@ -462,7 +462,7 @@ impl SecondaryKey { } /// Checks if the given key has permission to access the given asset. - pub fn has_asset_permission(&self, asset: AssetID) -> bool { + pub fn has_asset_permission(&self, asset: AssetId) -> bool { self.permissions.asset.ge(&SubsetRestriction::elem(asset)) } @@ -487,7 +487,7 @@ mod tests { use super::{ ExtrinsicPermissions, Permissions, PortfolioId, SecondaryKey, Signatory, SubsetRestriction, }; - use crate::{asset::AssetID, IdentityId}; + use crate::{asset::AssetId, IdentityId}; use sp_core::sr25519::Public; use std::convert::{From, TryFrom}; @@ -499,7 +499,7 @@ mod tests { assert_eq!(rk1, rk2); let rk3_permissions = Permissions { - asset: SubsetRestriction::elem(AssetID::new([0; 16])), + asset: SubsetRestriction::elem(AssetId::new([0; 16])), extrinsic: ExtrinsicPermissions::Whole, portfolio: SubsetRestriction::elem(PortfolioId::default_portfolio(IdentityId::from( 1u128, @@ -516,12 +516,12 @@ mod tests { #[test] fn has_permission_test() { let key = Public::from_raw([b'A'; 32]); - let asset_id = AssetID::new([0; 16]); - let asset_id2 = AssetID::new([1; 16]); + let asset_id = AssetId::new([0; 16]); + let asset_id2 = AssetId::new([1; 16]); let portfolio1 = PortfolioId::user_portfolio(IdentityId::default(), 1.into()); let portfolio2 = PortfolioId::user_portfolio(IdentityId::default(), 2.into()); let permissions = Permissions { - asset: SubsetRestriction::elem(AssetID::new([0; 16])), + asset: SubsetRestriction::elem(AssetId::new([0; 16])), extrinsic: ExtrinsicPermissions::Whole, portfolio: SubsetRestriction::elem(portfolio1), }; diff --git a/primitives/src/settlement.rs b/primitives/src/settlement.rs index dfd69eb68c..2f5635952b 100644 --- a/primitives/src/settlement.rs +++ b/primitives/src/settlement.rs @@ -28,7 +28,7 @@ use sp_std::vec::Vec; use polymesh_primitives_derive::{SliceU8StrongTyped, VecU8StrongTyped}; -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::constants::SETTLEMENT_INSTRUCTION_EXECUTION; use crate::{impl_checked_inc, Balance, IdentityId, NFTs, PortfolioId, Ticker}; @@ -167,8 +167,8 @@ pub enum Leg { sender: PortfolioId, /// The [`PortfolioId`] of the receiver. receiver: PortfolioId, - /// The [`AssetID`] of the fungible token. - asset_id: AssetID, + /// The [`AssetId`] of the fungible token. + asset_id: AssetId, /// The amount being transferred. amount: Balance, }, @@ -203,8 +203,8 @@ impl Leg { false } - /// Returns the [`AssetID`] of the asset in the given leg. - pub fn asset_id(&self) -> Option<&AssetID> { + /// Returns the [`AssetId`] of the asset in the given leg. + pub fn asset_id(&self) -> Option<&AssetId> { match self { Leg::Fungible { asset_id, .. } => Some(asset_id), Leg::NonFungible { nfts, .. } => Some(nfts.asset_id()), diff --git a/primitives/src/statistics.rs b/primitives/src/statistics.rs index 2849045360..388cf4743b 100644 --- a/primitives/src/statistics.rs +++ b/primitives/src/statistics.rs @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::{Claim, ClaimType, CountryCode, IdentityId, Scope}; use codec::{Decode, Encode}; use scale_info::TypeInfo; @@ -69,8 +69,8 @@ impl StatType { #[derive(Decode, Encode, TypeInfo)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct Stat1stKey { - /// The [`AssetID`] of the token. - pub asset_id: AssetID, + /// The [`AssetId`] of the token. + pub asset_id: AssetId, /// The [`StatType`] of the statistic. pub stat_type: StatType, } @@ -78,7 +78,7 @@ pub struct Stat1stKey { impl Stat1stKey { /// Returns a [`Stat1stKey`] instance where [`Stat1stKey::asset_id`] is set to `asset_id` and /// [`Stat1stKey::stat_type`] is set to [`StatType::investor_count`]. - pub fn investor_count(asset_id: AssetID) -> Self { + pub fn investor_count(asset_id: AssetId) -> Self { Self { asset_id, stat_type: StatType::investor_count(), diff --git a/primitives/src/transfer_compliance.rs b/primitives/src/transfer_compliance.rs index 2265b70247..89efb15253 100644 --- a/primitives/src/transfer_compliance.rs +++ b/primitives/src/transfer_compliance.rs @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::statistics::{v1, Percentage, StatClaim, StatOpType, StatType}; use crate::{ClaimType, IdentityId}; use codec::{Decode, Encode}; @@ -67,7 +67,7 @@ impl TransferCondition { } /// Get TransferConditionExemptKey needed by this transfer condition. - pub fn get_exempt_key(&self, asset_id: AssetID) -> TransferConditionExemptKey { + pub fn get_exempt_key(&self, asset_id: AssetId) -> TransferConditionExemptKey { let (op, claim_type) = match self { Self::MaxInvestorCount(_) => (StatOpType::Count, None), Self::MaxInvestorOwnership(_) => (StatOpType::Balance, None), @@ -117,8 +117,8 @@ impl From for TransferConditionResult { #[derive(Decode, Encode, TypeInfo)] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct TransferConditionExemptKey { - /// The [`AssetID`] of the token. - pub asset_id: AssetID, + /// The [`AssetId`] of the token. + pub asset_id: AssetId, /// Stats operation type. pub op: StatOpType, /// Claim type. diff --git a/primitives/src/v6.rs b/primitives/src/v6.rs index fe6e9763b1..bf4fb00dc3 100644 --- a/primitives/src/v6.rs +++ b/primitives/src/v6.rs @@ -1,6 +1,6 @@ #![allow(missing_docs)] -use crate::asset::AssetID; +use crate::asset::AssetId; use crate::ticker::Ticker; use crate::{PortfolioPermissions, SubsetRestriction}; #[cfg(not(feature = "std"))] @@ -57,7 +57,7 @@ pub struct PalletPermissions { pub type AssetPermissions = SubsetRestriction; -impl From> for SubsetRestriction { +impl From> for SubsetRestriction { fn from(old: SubsetRestriction) -> Self { match old { SubsetRestriction::Whole => SubsetRestriction::Whole, diff --git a/rpc/runtime-api/src/asset.rs b/rpc/runtime-api/src/asset.rs index 4d9f20e3f1..126a19a5d2 100644 --- a/rpc/runtime-api/src/asset.rs +++ b/rpc/runtime-api/src/asset.rs @@ -17,7 +17,7 @@ use frame_support::pallet_prelude::DispatchError; use sp_std::vec::Vec; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{Balance, PortfolioId}; /// The maximum number of DIDs allowed in a `balance_at` RPC query. @@ -48,7 +48,7 @@ sp_api::decl_runtime_apis! { fn transfer_report( sender_portfolio: PortfolioId, receiver_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, skip_locked_check: bool, ) -> Vec; diff --git a/rpc/runtime-api/src/compliance.rs b/rpc/runtime-api/src/compliance.rs index 008ea56e20..e9ce8a4b4f 100644 --- a/rpc/runtime-api/src/compliance.rs +++ b/rpc/runtime-api/src/compliance.rs @@ -17,7 +17,7 @@ use frame_support::dispatch::DispatchError; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::compliance_manager::ComplianceReport; use polymesh_primitives::IdentityId; @@ -40,7 +40,7 @@ sp_api::decl_runtime_apis! { /// }' /// ``` fn compliance_report( - asset_id: &AssetID, + asset_id: &AssetId, sender_identity: &IdentityId, receiver_identity: &IdentityId ) -> Result; diff --git a/rpc/runtime-api/src/statistics.rs b/rpc/runtime-api/src/statistics.rs index 618522dddf..7be59a1460 100644 --- a/rpc/runtime-api/src/statistics.rs +++ b/rpc/runtime-api/src/statistics.rs @@ -18,7 +18,7 @@ use frame_support::dispatch::DispatchError; use sp_std::vec::Vec; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::transfer_compliance::TransferCondition; use polymesh_primitives::{Balance, IdentityId}; @@ -27,7 +27,7 @@ sp_api::decl_runtime_apis! { pub trait StatisticsApi { /// Returns a vector containing all [`TransferCondition`] that are not being respected for the transfer. An empty vec means there's no error. fn transfer_restrictions_report( - asset_id: AssetID, + asset_id: AssetId, sender_did: &IdentityId, receiver_did: &IdentityId, transfer_amount: Balance, diff --git a/rpc/src/asset.rs b/rpc/src/asset.rs index da13d1e079..00766705e7 100644 --- a/rpc/src/asset.rs +++ b/rpc/src/asset.rs @@ -24,7 +24,7 @@ use sp_blockchain::HeaderBackend; use sp_runtime::traits::Block as BlockT; pub use node_rpc_runtime_api::asset::AssetApi as AssetRuntimeApi; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::{Balance, PortfolioId}; use crate::Error; @@ -36,7 +36,7 @@ pub trait AssetApi { &self, sender_portfolio: PortfolioId, receiver_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, skip_locked_check: bool, at: Option, @@ -69,7 +69,7 @@ where &self, sender_portfolio: PortfolioId, receiver_portfolio: PortfolioId, - asset_id: AssetID, + asset_id: AssetId, transfer_value: Balance, skip_locked_check: bool, at: Option<::Hash>, diff --git a/rpc/src/compliance.rs b/rpc/src/compliance.rs index 5535867cd6..131be1e441 100644 --- a/rpc/src/compliance.rs +++ b/rpc/src/compliance.rs @@ -24,7 +24,7 @@ use sp_blockchain::HeaderBackend; use sp_runtime::traits::Block as BlockT; pub use node_rpc_runtime_api::compliance::ComplianceApi as ComplianceRuntimeApi; -use polymesh_primitives::asset::AssetID; +use polymesh_primitives::asset::AssetId; use polymesh_primitives::compliance_manager::ComplianceReport; use polymesh_primitives::IdentityId; @@ -35,7 +35,7 @@ pub trait ComplianceApi { #[method(name = "compliance_complianceReport")] fn compliance_report( &self, - asset_id: AssetID, + asset_id: AssetId, sender_identity: IdentityId, receiver_identity: IdentityId, at: Option, @@ -66,7 +66,7 @@ where { fn compliance_report( &self, - asset_id: AssetID, + asset_id: AssetId, sender_identity: IdentityId, receiver_identity: IdentityId, at: Option<::Hash>, diff --git a/scripts/cli/src/interfaces/augment-api-errors.ts b/scripts/cli/src/interfaces/augment-api-errors.ts index 0aa9d3f520..01f38fd21f 100644 --- a/scripts/cli/src/interfaces/augment-api-errors.ts +++ b/scripts/cli/src/interfaces/augment-api-errors.ts @@ -27,7 +27,7 @@ declare module '@polkadot/api-base/types/errors' { /** * An unexpected error when generating a new asset ID. **/ - AssetIDGenerationError: AugmentedError; + AssetIdGenerationError: AugmentedError; /** * Asset Metadata Global type already exists. **/ @@ -783,15 +783,15 @@ declare module '@polkadot/api-base/types/errors' { }; externalAgents: { /** - * The provided `agent` is already an agent for the `AssetID`. + * The provided `agent` is already an agent for the `AssetId`. **/ AlreadyAnAgent: AugmentedError; /** - * An AG with the given `AGId` did not exist for the `AssetID`. + * An AG with the given `AGId` did not exist for the `AssetId`. **/ NoSuchAG: AugmentedError; /** - * The provided `agent` is not an agent for the `AssetID`. + * The provided `agent` is not an agent for the `AssetId`. **/ NotAnAgent: AugmentedError; /** @@ -1154,7 +1154,7 @@ declare module '@polkadot/api-base/types/errors' { /** * There's no asset associated to the given asset_id. **/ - InvalidAssetID: AugmentedError; + InvalidAssetId: AugmentedError; /** * The asset must be of type non-fungible. **/ @@ -1801,7 +1801,7 @@ declare module '@polkadot/api-base/types/errors' { **/ UnexpectedLegStatus: AugmentedError; /** - * AssetID could not be found on chain. + * AssetId could not be found on chain. **/ UnexpectedOFFChainAsset: AugmentedError; /** diff --git a/scripts/cli/src/interfaces/augment-api-events.ts b/scripts/cli/src/interfaces/augment-api-events.ts index 8edbf351a1..a94f0b2450 100644 --- a/scripts/cli/src/interfaces/augment-api-events.ts +++ b/scripts/cli/src/interfaces/augment-api-events.ts @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types'; import type { BTreeSet, Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, H256, Perbill, Permill } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletPipsProposalData, PalletPipsProposalState, PalletPipsProposer, PalletPipsSnapshottedPip, PalletStakingExposure, PalletStakingForcing, PalletStakingSlashingSwitch, PalletStakingValidatorPrefs, PalletStoFundraiser, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesMaybeBlock, PolymeshContractsApi, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsChainVersion, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesEventOnly, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesMemo, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesPortfolioFundDescription, PolymeshPrimitivesPortfolioPortfolioUpdateReason, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementReceiptMetadata, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError } from '@polkadot/types/lookup'; +import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletPipsProposalData, PalletPipsProposalState, PalletPipsProposer, PalletPipsSnapshottedPip, PalletStakingExposure, PalletStakingForcing, PalletStakingSlashingSwitch, PalletStakingValidatorPrefs, PalletStoFundraiser, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesMaybeBlock, PolymeshContractsApi, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsChainVersion, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesEventOnly, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesMemo, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesPortfolioFundDescription, PolymeshPrimitivesPortfolioPortfolioUpdateReason, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementReceiptMetadata, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError } from '@polkadot/types/lookup'; export type __AugmentedEvent = AugmentedEvent; @@ -18,60 +18,60 @@ declare module '@polkadot/api-base/types/events' { asset: { /** * An asset has been added to the list of pre aprroved receivement (valid for all identities). - * Parameters: [`AssetID`] of the pre approved asset. + * Parameters: [`AssetId`] of the pre approved asset. **/ - AssetAffirmationExemption: AugmentedEvent; + AssetAffirmationExemption: AugmentedEvent; /** * Emitted when Tokens were issued, redeemed or transferred. - * Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`AssetID`] for the token, the balance that was issued/transferred/redeemed, + * Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`AssetId`] for the token, the balance that was issued/transferred/redeemed, * the [`PortfolioId`] of the source, the [`PortfolioId`] of the destination and the [`PortfolioUpdateReason`]. **/ - AssetBalanceUpdated: AugmentedEvent, Option, PolymeshPrimitivesPortfolioPortfolioUpdateReason]>; + AssetBalanceUpdated: AugmentedEvent, Option, PolymeshPrimitivesPortfolioPortfolioUpdateReason]>; /** * Event for creation of the asset. - * caller DID/ owner DID, AssetID, divisibility, asset type, beneficiary DID, asset name, identifiers, funding round + * caller DID/ owner DID, AssetId, divisibility, asset type, beneficiary DID, asset name, identifiers, funding round **/ - AssetCreated: AugmentedEvent, Option]>; + AssetCreated: AugmentedEvent, Option]>; /** * An event emitted when an asset is frozen. - * Parameter: caller DID, AssetID. + * Parameter: caller DID, AssetId. **/ - AssetFrozen: AugmentedEvent; + AssetFrozen: AugmentedEvent; /** * An identity has added mandatory mediators to an asset. - * Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset, the identity of all mediators added. + * Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset, the identity of all mediators added. **/ - AssetMediatorsAdded: AugmentedEvent]>; + AssetMediatorsAdded: AugmentedEvent]>; /** * An identity has removed mediators from an asset. - * Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset, the identity of all mediators removed. + * Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset, the identity of all mediators removed. **/ - AssetMediatorsRemoved: AugmentedEvent]>; + AssetMediatorsRemoved: AugmentedEvent]>; /** * Emit when token ownership is transferred. - * caller DID / token ownership transferred to DID, AssetID, from + * caller DID / token ownership transferred to DID, AssetId, from **/ - AssetOwnershipTransferred: AugmentedEvent; + AssetOwnershipTransferred: AugmentedEvent; /** * An event emitted when a token is renamed. - * Parameters: caller DID, AssetID, new token name. + * Parameters: caller DID, AssetId, new token name. **/ - AssetRenamed: AugmentedEvent; + AssetRenamed: AugmentedEvent; /** * An event emitted when the type of an asset changed. - * Parameters: caller DID, AssetID, new token type. + * Parameters: caller DID, AssetId, new token type. **/ - AssetTypeChanged: AugmentedEvent; + AssetTypeChanged: AugmentedEvent; /** * An event emitted when an asset is unfrozen. - * Parameter: caller DID, AssetID. + * Parameter: caller DID, AssetId. **/ - AssetUnfrozen: AugmentedEvent; + AssetUnfrozen: AugmentedEvent; /** * Event for when a forced transfer takes place. * caller DID/ controller DID, ExtensionRemoved, Portfolio of token holder, value. **/ - ControllerTransfer: AugmentedEvent; + ControllerTransfer: AugmentedEvent; /** * A custom asset type already exists on-chain. * caller DID, the ID of the custom asset type, the string contents registered. @@ -84,42 +84,42 @@ declare module '@polkadot/api-base/types/events' { CustomAssetTypeRegistered: AugmentedEvent; /** * Event for change in divisibility. - * caller DID, AssetID, divisibility + * caller DID, AssetId, divisibility **/ - DivisibilityChanged: AugmentedEvent; + DivisibilityChanged: AugmentedEvent; /** * A new document attached to an asset **/ - DocumentAdded: AugmentedEvent; + DocumentAdded: AugmentedEvent; /** * A document removed from an asset **/ - DocumentRemoved: AugmentedEvent; + DocumentRemoved: AugmentedEvent; /** * An event carrying the name of the current funding round of an asset. - * Parameters: caller DID, AssetID, funding round name. + * Parameters: caller DID, AssetId, funding round name. **/ - FundingRoundSet: AugmentedEvent; + FundingRoundSet: AugmentedEvent; /** * Event emitted when any token identifiers are updated. - * caller DID, AssetID, a vector of (identifier type, identifier value) + * caller DID, AssetId, a vector of (identifier type, identifier value) **/ - IdentifiersUpdated: AugmentedEvent]>; + IdentifiersUpdated: AugmentedEvent]>; /** * An event emitted when a local metadata key has been removed. - * Parameters: caller AssetID, Local type name + * Parameters: caller AssetId, Local type name **/ - LocalMetadataKeyDeleted: AugmentedEvent; + LocalMetadataKeyDeleted: AugmentedEvent; /** * An event emitted when a local metadata value has been removed. - * Parameters: caller AssetID, Local type name + * Parameters: caller AssetId, Local type name **/ - MetadataValueDeleted: AugmentedEvent; + MetadataValueDeleted: AugmentedEvent; /** * An identity has added an asset to the list of pre aprroved receivement. - * Parameters: [`IdentityId`] of caller, [`AssetID`] of the pre approved asset. + * Parameters: [`IdentityId`] of caller, [`AssetId`] of the pre approved asset. **/ - PreApprovedAsset: AugmentedEvent; + PreApprovedAsset: AugmentedEvent; /** * Register asset metadata global type. * (Global type name, Global type key, type specs) @@ -127,34 +127,34 @@ declare module '@polkadot/api-base/types/events' { RegisterAssetMetadataGlobalType: AugmentedEvent; /** * Register asset metadata local type. - * (Caller DID, AssetID, Local type name, Local type key, type specs) + * (Caller DID, AssetId, Local type name, Local type key, type specs) **/ - RegisterAssetMetadataLocalType: AugmentedEvent; + RegisterAssetMetadataLocalType: AugmentedEvent; /** * An asset has been removed from the list of pre aprroved receivement (valid for all identities). - * Parameters: [`AssetID`] of the asset. + * Parameters: [`AssetId`] of the asset. **/ - RemoveAssetAffirmationExemption: AugmentedEvent; + RemoveAssetAffirmationExemption: AugmentedEvent; /** * An identity has removed an asset to the list of pre aprroved receivement. - * Parameters: [`IdentityId`] of caller, [`AssetID`] of the asset. + * Parameters: [`IdentityId`] of caller, [`AssetId`] of the asset. **/ - RemovePreApprovedAsset: AugmentedEvent; + RemovePreApprovedAsset: AugmentedEvent; /** * Set asset metadata value. - * (Caller DID, AssetID, metadata value, optional value details) + * (Caller DID, AssetId, metadata value, optional value details) **/ - SetAssetMetadataValue: AugmentedEvent]>; + SetAssetMetadataValue: AugmentedEvent]>; /** * Set asset metadata value details (expire, lock status). - * (Caller DID, AssetID, value details) + * (Caller DID, AssetId, value details) **/ - SetAssetMetadataValueDetails: AugmentedEvent; + SetAssetMetadataValueDetails: AugmentedEvent; /** * An identity has linked a ticker to an asset. - * Parameters: [`IdentityId`] of caller, [`Ticker`] of the asset, the asset identifier [`AssetID`]. + * Parameters: [`IdentityId`] of caller, [`Ticker`] of the asset, the asset identifier [`AssetId`]. **/ - TickerLinkedToAsset: AugmentedEvent; + TickerLinkedToAsset: AugmentedEvent; /** * Emit when ticker is registered. * caller DID / ticker owner did, ticker, ticker owner, expiry @@ -291,9 +291,9 @@ declare module '@polkadot/api-base/types/events' { /** * A checkpoint was created. * - * (caller DID, AssetID, checkpoint ID, total supply, checkpoint timestamp) + * (caller DID, AssetId, checkpoint ID, total supply, checkpoint timestamp) **/ - CheckpointCreated: AugmentedEvent, PolymeshPrimitivesAssetAssetID, u64, u128, u64]>; + CheckpointCreated: AugmentedEvent, PolymeshPrimitivesAssetAssetId, u64, u128, u64]>; /** * The maximum complexity for an arbitrary asset's schedule set was changed. * @@ -303,15 +303,15 @@ declare module '@polkadot/api-base/types/events' { /** * A checkpoint schedule was created. * - * (caller DID, AssetID, schedule id, schedule) + * (caller DID, AssetId, schedule id, schedule) **/ - ScheduleCreated: AugmentedEvent; + ScheduleCreated: AugmentedEvent; /** * A checkpoint schedule was removed. * - * (caller DID, AssetID, schedule id, schedule) + * (caller DID, AssetId, schedule id, schedule) **/ - ScheduleRemoved: AugmentedEvent; + ScheduleRemoved: AugmentedEvent; /** * Generic event **/ @@ -359,49 +359,49 @@ declare module '@polkadot/api-base/types/events' { complianceManager: { /** * Emitted when an asset compliance for a given asset_id gets paused. - * (caller DID, AssetID). + * (caller DID, AssetId). **/ - AssetCompliancePaused: AugmentedEvent; + AssetCompliancePaused: AugmentedEvent; /** * Emitted when an asset compliance is replaced. - * Parameters: caller DID, AssetID, new asset compliance. + * Parameters: caller DID, AssetId, new asset compliance. **/ - AssetComplianceReplaced: AugmentedEvent]>; + AssetComplianceReplaced: AugmentedEvent]>; /** * Emitted when an asset compliance of a asset_id is reset. - * (caller DID, AssetID). + * (caller DID, AssetId). **/ - AssetComplianceReset: AugmentedEvent; + AssetComplianceReset: AugmentedEvent; /** * Emitted when an asset compliance for a given asset_id gets resume. - * (caller DID, AssetID). + * (caller DID, AssetId). **/ - AssetComplianceResumed: AugmentedEvent; + AssetComplianceResumed: AugmentedEvent; /** * Emitted when compliance requirement get modified/change. - * (caller DID, AssetID, ComplianceRequirement). + * (caller DID, AssetId, ComplianceRequirement). **/ - ComplianceRequirementChanged: AugmentedEvent; + ComplianceRequirementChanged: AugmentedEvent; /** * Emitted when new compliance requirement is created. - * (caller DID, AssetID, ComplianceRequirement). + * (caller DID, AssetId, ComplianceRequirement). **/ - ComplianceRequirementCreated: AugmentedEvent; + ComplianceRequirementCreated: AugmentedEvent; /** * Emitted when a compliance requirement is removed. - * (caller DID, AssetID, requirement_id). + * (caller DID, AssetId, requirement_id). **/ - ComplianceRequirementRemoved: AugmentedEvent; + ComplianceRequirementRemoved: AugmentedEvent; /** * Emitted when default claim issuer list for a given asset_id gets added. - * (caller DID, AssetID, Added TrustedIssuer). + * (caller DID, AssetId, Added TrustedIssuer). **/ - TrustedDefaultClaimIssuerAdded: AugmentedEvent; + TrustedDefaultClaimIssuerAdded: AugmentedEvent; /** * Emitted when default claim issuer list for a given asset_id get removed. - * (caller DID, AssetID, Removed TrustedIssuer). + * (caller DID, AssetId, Removed TrustedIssuer). **/ - TrustedDefaultClaimIssuerRemoved: AugmentedEvent; + TrustedDefaultClaimIssuerRemoved: AugmentedEvent; /** * Generic event **/ @@ -480,19 +480,19 @@ declare module '@polkadot/api-base/types/events' { CARemoved: AugmentedEvent; /** * The set of default `TargetIdentities` for the asset changed. - * (Agent DID, AssetID, New TargetIdentities) + * (Agent DID, AssetId, New TargetIdentities) **/ - DefaultTargetIdentitiesChanged: AugmentedEvent; + DefaultTargetIdentitiesChanged: AugmentedEvent; /** * The default withholding tax for the asset changed. - * (Agent DID, AssetID, New Tax). + * (Agent DID, AssetId, New Tax). **/ - DefaultWithholdingTaxChanged: AugmentedEvent; + DefaultWithholdingTaxChanged: AugmentedEvent; /** * The withholding tax specific to a DID for the asset changed. - * (Agent DID, AssetID, Taxed DID, New Tax). + * (Agent DID, AssetId, Taxed DID, New Tax). **/ - DidWithholdingTaxChanged: AugmentedEvent]>; + DidWithholdingTaxChanged: AugmentedEvent]>; /** * The maximum length of `details` in bytes was changed. * (GC DID, new length) @@ -591,33 +591,33 @@ declare module '@polkadot/api-base/types/events' { /** * An agent was added. * - * (Caller/Agent DID, Agent's AssetID, Agent's group) + * (Caller/Agent DID, Agent's AssetId, Agent's group) **/ - AgentAdded: AugmentedEvent; + AgentAdded: AugmentedEvent; /** * An agent was removed. * - * (Caller DID, Agent's AssetID, Agent's DID) + * (Caller DID, Agent's AssetId, Agent's DID) **/ - AgentRemoved: AugmentedEvent; + AgentRemoved: AugmentedEvent; /** * An agent's group was changed. * - * (Caller DID, Agent's AssetID, Agent's DID, The new group of the agent) + * (Caller DID, Agent's AssetId, Agent's DID, The new group of the agent) **/ - GroupChanged: AugmentedEvent; + GroupChanged: AugmentedEvent; /** * An Agent Group was created. * - * (Caller DID, AG's AssetID, AG's ID, AG's permissions) + * (Caller DID, AG's AssetId, AG's ID, AG's permissions) **/ - GroupCreated: AugmentedEvent; + GroupCreated: AugmentedEvent; /** * An Agent Group's permissions was updated. * - * (Caller DID, AG's AssetID, AG's ID, AG's new permissions) + * (Caller DID, AG's AssetId, AG's ID, AG's new permissions) **/ - GroupPermissionsUpdated: AugmentedEvent; + GroupPermissionsUpdated: AugmentedEvent; /** * Generic event **/ @@ -876,7 +876,7 @@ declare module '@polkadot/api-base/types/events' { /** * Emitted when a new nft collection is created. **/ - NftCollectionCreated: AugmentedEvent; + NftCollectionCreated: AugmentedEvent; /** * Emitted when NFTs were issued, redeemed or transferred. * Contains the [`IdentityId`] of the receiver/issuer/redeemer, the [`NFTs`], the [`PortfolioId`] of the source, the [`PortfolioId`] @@ -1126,18 +1126,18 @@ declare module '@polkadot/api-base/types/events' { * # Parameters * * [`IdentityId`] of the caller. * * [`PortfolioId`] that will receive assets without explicit affirmation. - * * [`AssetID`] of the asset that has been exempt from explicit affirmation. + * * [`AssetId`] of the asset that has been exempt from explicit affirmation. **/ - PreApprovedPortfolio: AugmentedEvent; + PreApprovedPortfolio: AugmentedEvent; /** * A portfolio has removed the approval of an asset. * * # Parameters * * [`IdentityId`] of the caller. * * [`PortfolioId`] that had its pre approval revoked. - * * [`AssetID`] of the asset that had its pre approval revoked. + * * [`AssetId`] of the asset that had its pre approval revoked. **/ - RevokePreApprovedPortfolio: AugmentedEvent; + RevokePreApprovedPortfolio: AugmentedEvent; /** * All non-default portfolio numbers and names of a DID. * @@ -1338,17 +1338,17 @@ declare module '@polkadot/api-base/types/events' { **/ VenueDetailsUpdated: AugmentedEvent; /** - * Venue filtering has been enabled or disabled for an asset (did, AssetID, filtering_enabled) + * Venue filtering has been enabled or disabled for an asset (did, AssetId, filtering_enabled) **/ - VenueFiltering: AugmentedEvent; + VenueFiltering: AugmentedEvent; /** - * Venues added to allow list (did, AssetID, vec) + * Venues added to allow list (did, AssetId, vec) **/ - VenuesAllowed: AugmentedEvent]>; + VenuesAllowed: AugmentedEvent]>; /** - * Venues added to block list (did, AssetID, vec) + * Venues added to block list (did, AssetId, vec) **/ - VenuesBlocked: AugmentedEvent]>; + VenuesBlocked: AugmentedEvent]>; /** * An existing venue's signers has been updated (did, venue_id, signers, update_type) **/ @@ -1358,9 +1358,9 @@ declare module '@polkadot/api-base/types/events' { **/ VenueTypeUpdated: AugmentedEvent; /** - * Venue not part of the token's allow list (did, AssetID, venue_id) + * Venue not part of the token's allow list (did, AssetId, venue_id) **/ - VenueUnauthorized: AugmentedEvent; + VenueUnauthorized: AugmentedEvent; /** * Generic event **/ @@ -1471,27 +1471,27 @@ declare module '@polkadot/api-base/types/events' { /** * Asset stats updated. * - * (Caller DID, AssetID, Stat type, Updates) + * (Caller DID, AssetId, Stat type, Updates) **/ - AssetStatsUpdated: AugmentedEvent]>; + AssetStatsUpdated: AugmentedEvent]>; /** * Set Transfer compliance rules for asset. * - * (Caller DID, AssetID, Transfer conditions) + * (Caller DID, AssetId, Transfer conditions) **/ - SetAssetTransferCompliance: AugmentedEvent]>; + SetAssetTransferCompliance: AugmentedEvent]>; /** * Stat types added to asset. * - * (Caller DID, AssetID, Stat types) + * (Caller DID, AssetId, Stat types) **/ - StatTypesAdded: AugmentedEvent]>; + StatTypesAdded: AugmentedEvent]>; /** * Stat types removed from asset. * - * (Caller DID, AssetID, Stat types) + * (Caller DID, AssetId, Stat types) **/ - StatTypesRemoved: AugmentedEvent]>; + StatTypesRemoved: AugmentedEvent]>; /** * Add `IdentityId`s exempt for transfer conditions matching exempt key. * @@ -1539,7 +1539,7 @@ declare module '@polkadot/api-base/types/events' { * An investor invested in the fundraiser. * (Investor, fundraiser_id, offering token, raise token, offering_token_amount, raise_token_amount) **/ - Invested: AugmentedEvent; + Invested: AugmentedEvent; /** * Generic event **/ diff --git a/scripts/cli/src/interfaces/augment-api-query.ts b/scripts/cli/src/interfaces/augment-api-query.ts index 590bb83fa9..3cadc7357d 100644 --- a/scripts/cli/src/interfaces/augment-api-query.ts +++ b/scripts/cli/src/interfaces/augment-api-query.ts @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/ import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, Call, H256, Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; -import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetAssetDetails, PalletAssetTickerRegistration, PalletAssetTickerRegistrationConfig, PalletBalancesBalanceLock, PalletBridgeBridgeTxDetail, PalletCommitteePolymeshVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityClaim1stKey, PalletIdentityClaim2ndKey, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletPipsDepositInfo, PalletPipsPip, PalletPipsPipsMetadata, PalletPipsProposalState, PalletPipsSnapshotMetadata, PalletPipsSnapshottedPip, PalletPipsVote, PalletPipsVotingResult, PalletPreimageRequestStatus, PalletRelayerSubsidy, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingPermissionedIdentityPrefs, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingSlashingSwitch, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStoFundraiser, PalletTransactionPaymentReleases, PolymeshCommonUtilitiesCheckpointNextCheckpoints, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesGroupInactiveMember, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshContractsApi, PolymeshContractsApiCodeHash, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsNextUpgrade, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAuthorization, PolymeshPrimitivesComplianceManagerAssetCompliance, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityDidRecord, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesMemo, PolymeshPrimitivesMultisigProposalState, PolymeshPrimitivesMultisigProposalVoteCount, PolymeshPrimitivesNftNftCollection, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyKeyRecord, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationStatus, PolymeshPrimitivesSettlementInstruction, PolymeshPrimitivesSettlementInstructionStatus, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementLegStatus, PolymeshPrimitivesSettlementMediatorAffirmationStatus, PolymeshPrimitivesSettlementVenue, PolymeshPrimitivesStatisticsStat1stKey, PolymeshPrimitivesStatisticsStat2ndKey, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesSubsetSubsetRestrictionAssetID, PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceAssetTransferCompliance, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeDevelopRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; +import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetAssetDetails, PalletAssetTickerRegistration, PalletAssetTickerRegistrationConfig, PalletBalancesBalanceLock, PalletBridgeBridgeTxDetail, PalletCommitteePolymeshVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityClaim1stKey, PalletIdentityClaim2ndKey, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletPipsDepositInfo, PalletPipsPip, PalletPipsPipsMetadata, PalletPipsProposalState, PalletPipsSnapshotMetadata, PalletPipsSnapshottedPip, PalletPipsVote, PalletPipsVotingResult, PalletPreimageRequestStatus, PalletRelayerSubsidy, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingPermissionedIdentityPrefs, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingSlashingSwitch, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStoFundraiser, PalletTransactionPaymentReleases, PolymeshCommonUtilitiesCheckpointNextCheckpoints, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesGroupInactiveMember, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshContractsApi, PolymeshContractsApiCodeHash, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsNextUpgrade, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAuthorization, PolymeshPrimitivesComplianceManagerAssetCompliance, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityDidRecord, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesMemo, PolymeshPrimitivesMultisigProposalState, PolymeshPrimitivesMultisigProposalVoteCount, PolymeshPrimitivesNftNftCollection, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyKeyRecord, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationStatus, PolymeshPrimitivesSettlementInstruction, PolymeshPrimitivesSettlementInstructionStatus, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementLegStatus, PolymeshPrimitivesSettlementMediatorAffirmationStatus, PolymeshPrimitivesSettlementVenue, PolymeshPrimitivesStatisticsStat1stKey, PolymeshPrimitivesStatisticsStat2ndKey, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesSubsetSubsetRestrictionAssetId, PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceAssetTransferCompliance, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeDevelopRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; import type { Observable } from '@polkadot/types/types'; export type __AugmentedQuery = AugmentedQuery unknown>; @@ -21,19 +21,19 @@ declare module '@polkadot/api-base/types/storage' { /** * All [`Document`] attached to an asset. **/ - assetDocuments: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u32]> & QueryableStorageEntry; + assetDocuments: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u32]> & QueryableStorageEntry; /** - * [`DocumentId`] counter per [`AssetID`]. + * [`DocumentId`] counter per [`AssetId`]. **/ - assetDocumentsIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetDocumentsIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * Maps each [`AssetID`] to its asset identifiers ([`AssetIdentifier`]). + * Maps each [`AssetId`] to its asset identifiers ([`AssetIdentifier`]). **/ - assetIdentifiers: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetIdentifiers: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * Maps all [`AssetID`] that are mapped to a [`Ticker`]. + * Maps all [`AssetId`] that are mapped to a [`Ticker`]. **/ - assetIDTicker: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetIDTicker: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Asset Metadata Global Key -> Name. **/ @@ -49,51 +49,51 @@ declare module '@polkadot/api-base/types/storage' { /** * Asset Metadata Local Key -> Name. **/ - assetMetadataLocalKeyToName: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + assetMetadataLocalKeyToName: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Asset Metadata Local Name -> Key. **/ - assetMetadataLocalNameToKey: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, Bytes]> & QueryableStorageEntry; + assetMetadataLocalNameToKey: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, Bytes]> & QueryableStorageEntry; /** * Asset Metadata Local Key specs. **/ - assetMetadataLocalSpecs: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + assetMetadataLocalSpecs: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Details for an asset's Metadata values. **/ - assetMetadataValueDetails: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey]> & QueryableStorageEntry; + assetMetadataValueDetails: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey]> & QueryableStorageEntry; /** * Metatdata values for an asset. **/ - assetMetadataValues: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey]> & QueryableStorageEntry; + assetMetadataValues: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey]> & QueryableStorageEntry; /** - * Maps each [`AssetID`] to its underling [`AssetName`]. + * Maps each [`AssetId`] to its underling [`AssetName`]. **/ - assetNames: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetNames: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * A per account nonce that is used for generating an [`AssetID`]. + * A per account nonce that is used for generating an [`AssetId`]. **/ assetNonce: AugmentedQuery Observable, [AccountId32]> & QueryableStorageEntry; /** - * Maps each [`AssetID`] to its underling [`AssetDetails`]. + * Maps each [`AssetId`] to its underling [`AssetDetails`]. **/ - assets: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assets: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * A list of assets that exempt all users from affirming its receivement. **/ - assetsExemptFromAffirmation: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetsExemptFromAffirmation: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * Tracks the total [`Balance`] for each [`AssetID`] per [`IdentityId`]. + * Tracks the total [`Balance`] for each [`AssetId`] per [`IdentityId`]. **/ - balanceOf: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; + balanceOf: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; /** * The last [`AssetMetadataGlobalKey`] used for a global key. **/ currentAssetMetadataGlobalKey: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** - * The last [`AssetMetadataLocalKey`] used for [`AssetID`]. + * The last [`AssetMetadataLocalKey`] used for [`AssetId`]. **/ - currentAssetMetadataLocalKey: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + currentAssetMetadataLocalKey: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * The next `AssetType::Custom` ID in the sequence. * @@ -109,37 +109,37 @@ declare module '@polkadot/api-base/types/storage' { **/ customTypesInverse: AugmentedQuery Observable>, [Bytes]> & QueryableStorageEntry; /** - * Returns `true` if transfers for the token associated to [`AssetID`] are frozen. Otherwise, returns `false`. + * Returns `true` if transfers for the token associated to [`AssetId`] are frozen. Otherwise, returns `false`. **/ - frozen: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + frozen: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * Maps each [`AssetID`] to the name of its founding round ([`FundingRoundName`]). + * Maps each [`AssetId`] to the name of its founding round ([`FundingRoundName`]). **/ - fundingRound: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + fundingRound: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * The total [`Balance`] of tokens issued in all recorded funding rounds ([`FundingRoundName`]). **/ - issuedInFundingRound: AugmentedQuery | [PolymeshPrimitivesAssetAssetID | string | Uint8Array, Bytes | string | Uint8Array]) => Observable, [ITuple<[PolymeshPrimitivesAssetAssetID, Bytes]>]> & QueryableStorageEntry]>; + issuedInFundingRound: AugmentedQuery | [PolymeshPrimitivesAssetAssetId | string | Uint8Array, Bytes | string | Uint8Array]) => Observable, [ITuple<[PolymeshPrimitivesAssetAssetId, Bytes]>]> & QueryableStorageEntry]>; /** * The list of mandatory mediators for every ticker. **/ - mandatoryMediators: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + mandatoryMediators: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All assets that don't need an affirmation to be received by an identity. **/ - preApprovedAsset: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + preApprovedAsset: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All security tokens owned by a user. **/ - securityTokensOwnedByUser: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + securityTokensOwnedByUser: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Storage version. **/ storageVersion: AugmentedQuery Observable, []> & QueryableStorageEntry; /** - * Maps all [`Ticker`] that are linked to an [`AssetID`]. + * Maps all [`Ticker`] that are linked to an [`AssetId`]. **/ - tickerAssetID: AugmentedQuery Observable>, [PolymeshPrimitivesTicker]> & QueryableStorageEntry; + tickerAssetId: AugmentedQuery Observable>, [PolymeshPrimitivesTicker]> & QueryableStorageEntry; /** * Returns [`TickerRegistrationConfig`] for assessing if a ticker is valid. **/ @@ -391,47 +391,47 @@ declare module '@polkadot/api-base/types/storage' { /** * Balance of a DID at a checkpoint. * - * ([`AssetID`], did, checkpoint ID) -> Balance of a DID at a checkpoint + * ([`AssetId`], did, checkpoint ID) -> Balance of a DID at a checkpoint **/ - balance: AugmentedQuery | [PolymeshPrimitivesAssetAssetID | string | Uint8Array, u64 | AnyNumber | Uint8Array], arg2: PolymeshPrimitivesIdentityId | string | Uint8Array) => Observable, [ITuple<[PolymeshPrimitivesAssetAssetID, u64]>, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry, PolymeshPrimitivesIdentityId]>; + balance: AugmentedQuery | [PolymeshPrimitivesAssetAssetId | string | Uint8Array, u64 | AnyNumber | Uint8Array], arg2: PolymeshPrimitivesIdentityId | string | Uint8Array) => Observable, [ITuple<[PolymeshPrimitivesAssetAssetId, u64]>, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry, PolymeshPrimitivesIdentityId]>; /** * Checkpoints where a DID's balance was updated. - * ([`AssetID`], did) -> [checkpoint ID where user balance changed] + * ([`AssetId`], did) -> [checkpoint ID where user balance changed] **/ - balanceUpdates: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; + balanceUpdates: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; /** * Cached next checkpoint for each schedule. * * This is used to quickly find the next checkpoint from a asset's schedules. * - * ([`AssetID`]) -> next checkpoints + * ([`AssetId`]) -> next checkpoints **/ - cachedNextCheckpoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + cachedNextCheckpoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Checkpoints ID generator sequence. * ID of first checkpoint is 1 instead of 0. * - * ([`AssetID`]) -> no. of checkpoints + * ([`AssetId`]) -> no. of checkpoints **/ - checkpointIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + checkpointIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Scheduled checkpoints. * - * ([`AssetID`], schedule ID) -> schedule checkpoints + * ([`AssetId`], schedule ID) -> schedule checkpoints **/ - scheduledCheckpoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + scheduledCheckpoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Checkpoint schedule ID sequence for assets. * - * ([`AssetID`]) -> schedule ID + * ([`AssetId`]) -> schedule ID **/ - scheduleIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + scheduleIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All the checkpoints a given schedule originated. * - * ([`AssetID`], schedule ID) -> [checkpoint ID] + * ([`AssetId`], schedule ID) -> [checkpoint ID] **/ - schedulePoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + schedulePoints: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * How many "strong" references are there to a given `ScheduleId`? * @@ -440,9 +440,9 @@ declare module '@polkadot/api-base/types/storage' { * Thus, as long as `strong_ref_count(schedule_id) > 0`, * `remove_schedule(schedule_id)` will error. * - * ([`AssetID`], schedule ID) -> strong ref count + * ([`AssetId`], schedule ID) -> strong ref count **/ - scheduleRefCount: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + scheduleRefCount: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * The maximum complexity allowed for an asset's schedules. **/ @@ -457,15 +457,15 @@ declare module '@polkadot/api-base/types/storage' { * Every schedule-originated checkpoint maps its ID to its due time. * Every checkpoint manually created maps its ID to the time of recording. * - * ([`AssetID`]) -> (checkpoint ID) -> checkpoint timestamp + * ([`AssetId`]) -> (checkpoint ID) -> checkpoint timestamp **/ - timestamps: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + timestamps: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Total supply of the token at the checkpoint. * - * ([`AssetID`], checkpointId) -> total supply at given checkpoint + * ([`AssetId`], checkpointId) -> total supply at given checkpoint **/ - totalSupply: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + totalSupply: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Generic query **/ @@ -491,17 +491,17 @@ declare module '@polkadot/api-base/types/storage' { }; complianceManager: { /** - * Compliance for an asset ([`AssetID`] -> [`AssetCompliance`]) + * Compliance for an asset ([`AssetId`] -> [`AssetCompliance`]) **/ - assetCompliances: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetCompliances: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Storage version. **/ storageVersion: AugmentedQuery Observable, []> & QueryableStorageEntry; /** - * List of trusted claim issuer [`AssetID`] -> Issuer Identity + * List of trusted claim issuer [`AssetId`] -> Issuer Identity **/ - trustedClaimIssuer: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + trustedClaimIssuer: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Generic query **/ @@ -568,30 +568,30 @@ declare module '@polkadot/api-base/types/storage' { * Associations from CAs to `Document`s via their IDs. * (CAId => [DocumentId]) * - * The `CorporateActions` map stores `AssetID => LocalId => The CA`, - * so we can infer `AssetID => CAId`. Therefore, we don't need a double map. + * The `CorporateActions` map stores `AssetId => LocalId => The CA`, + * so we can infer `AssetId => CAId`. Therefore, we don't need a double map. **/ caDocLink: AugmentedQuery Observable>, [PalletCorporateActionsCaId]> & QueryableStorageEntry; /** - * The next per-`AssetID` CA ID in the sequence. - * The full ID is defined as a combination of `AssetID` and a number in this sequence. + * The next per-`AssetId` CA ID in the sequence. + * The full ID is defined as a combination of `AssetId` and a number in this sequence. **/ - caIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + caIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All recorded CAs thus far. * Only generic information is stored here. * Specific `CAKind`s, e.g., benefits and corporate ballots, may use additional on-chain storage. * - * (AssetID => local ID => the corporate action) + * (AssetId => local ID => the corporate action) **/ - corporateActions: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u32]> & QueryableStorageEntry; + corporateActions: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u32]> & QueryableStorageEntry; /** * The identities targeted by default for CAs for this asset, * either to be excluded or included. * - * (AssetID => target identities) + * (AssetId => target identities) **/ - defaultTargetIdentities: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + defaultTargetIdentities: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * The default amount of tax to withhold ("withholding tax", WT) for this asset when distributing dividends. * @@ -600,21 +600,21 @@ declare module '@polkadot/api-base/types/storage' { * Alice lives in Sweden, so Skatteverket (the Swedish tax authority) wants 30% of that. * Then those 100 * 30% are withheld from Alice, and ACME will send them to Skatteverket. * - * (AssetID => % to withhold) + * (AssetId => % to withhold) **/ - defaultWithholdingTax: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + defaultWithholdingTax: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Associates details in free-form text with a CA by its ID. * (CAId => CADetails) **/ details: AugmentedQuery Observable, [PalletCorporateActionsCaId]> & QueryableStorageEntry; /** - * The amount of tax to withhold ("withholding tax", WT) for a certain AssetID x DID. + * The amount of tax to withhold ("withholding tax", WT) for a certain AssetId x DID. * If an entry exists for a certain DID, it overrides the default in `DefaultWithholdingTax`. * - * (AssetID => [(did, % to withhold)] + * (AssetId => [(did, % to withhold)] **/ - didWithholdingTax: AugmentedQuery Observable>>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + didWithholdingTax: AugmentedQuery Observable>>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Determines the maximum number of bytes that the free-form `details` of a CA can store. * @@ -778,26 +778,26 @@ declare module '@polkadot/api-base/types/storage' { /** * Maps an agent (`IdentityId`) to all assets they belong to, if any. **/ - agentOf: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + agentOf: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * The next per-asset AG ID in the sequence. * - * The full ID is defined as a combination of `AssetID` and a number in this sequence, + * The full ID is defined as a combination of `AssetId` and a number in this sequence, * which starts from 1, rather than 0. **/ - agIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + agIdSequence: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** - * Maps agents (`IdentityId`) for an `AssetID` to what AG they belong to, if any. + * Maps agents (`IdentityId`) for an `AssetId` to what AG they belong to, if any. **/ - groupOfAgent: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; + groupOfAgent: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; /** - * For custom AGs of an `AssetID`, maps to what permissions an agent in that AG would have. + * For custom AGs of an `AssetId`, maps to what permissions an agent in that AG would have. **/ - groupPermissions: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u32]> & QueryableStorageEntry; + groupPermissions: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u32]> & QueryableStorageEntry; /** - * Maps an `AssetID` to the number of `Full` agents for it. + * Maps an `AssetId` to the number of `Full` agents for it. **/ - numFullAgents: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + numFullAgents: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; storageVersion: AugmentedQuery Observable, []> & QueryableStorageEntry; /** * Generic query @@ -911,7 +911,7 @@ declare module '@polkadot/api-base/types/storage' { /** * A secondary key's asset permissions. **/ - keyAssetPermissions: AugmentedQuery Observable>, [AccountId32]> & QueryableStorageEntry; + keyAssetPermissions: AugmentedQuery Observable>, [AccountId32]> & QueryableStorageEntry; /** * A secondary key's extrinsic permissions. **/ @@ -1089,7 +1089,7 @@ declare module '@polkadot/api-base/types/storage' { /** * The collection id corresponding to each asset. **/ - collectionAsset: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + collectionAsset: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All mandatory metadata keys for a given collection. **/ @@ -1109,15 +1109,15 @@ declare module '@polkadot/api-base/types/storage' { /** * Tracks the owner of an NFT **/ - nftOwner: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + nftOwner: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * The total number of NFTs in a collection **/ - nfTsInCollection: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + nfTsInCollection: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * The total number of NFTs per identity. **/ - numberOfNFTs: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; + numberOfNFTs: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]> & QueryableStorageEntry; /** * Storage version. **/ @@ -1340,7 +1340,7 @@ declare module '@polkadot/api-base/types/storage' { /** * The asset balances of portfolios. **/ - portfolioAssetBalances: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + portfolioAssetBalances: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * How many assets with non-zero balance this portfolio contains. **/ @@ -1353,15 +1353,15 @@ declare module '@polkadot/api-base/types/storage' { * Amount of assets locked in a portfolio. * These assets show up in portfolio balance but can not be transferred away. **/ - portfolioLockedAssets: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + portfolioLockedAssets: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * All locked nft for a given portfolio. **/ - portfolioLockedNFT: AugmentedQuery | [PolymeshPrimitivesAssetAssetID | string | Uint8Array, u64 | AnyNumber | Uint8Array]) => Observable, [PolymeshPrimitivesIdentityIdPortfolioId, ITuple<[PolymeshPrimitivesAssetAssetID, u64]>]> & QueryableStorageEntry]>; + portfolioLockedNFT: AugmentedQuery | [PolymeshPrimitivesAssetAssetId | string | Uint8Array, u64 | AnyNumber | Uint8Array]) => Observable, [PolymeshPrimitivesIdentityIdPortfolioId, ITuple<[PolymeshPrimitivesAssetAssetId, u64]>]> & QueryableStorageEntry]>; /** * The nft associated to the portfolio. **/ - portfolioNFT: AugmentedQuery | [PolymeshPrimitivesAssetAssetID | string | Uint8Array, u64 | AnyNumber | Uint8Array]) => Observable, [PolymeshPrimitivesIdentityIdPortfolioId, ITuple<[PolymeshPrimitivesAssetAssetID, u64]>]> & QueryableStorageEntry]>; + portfolioNFT: AugmentedQuery | [PolymeshPrimitivesAssetAssetId | string | Uint8Array, u64 | AnyNumber | Uint8Array]) => Observable, [PolymeshPrimitivesIdentityIdPortfolioId, ITuple<[PolymeshPrimitivesAssetAssetId, u64]>]> & QueryableStorageEntry]>; /** * The set of existing portfolios with their names. If a certain pair of a DID and * portfolio number maps to `None` then such a portfolio doesn't exist. Conversely, if a @@ -1375,9 +1375,9 @@ declare module '@polkadot/api-base/types/storage' { **/ portfoliosInCustody: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId]> & QueryableStorageEntry; /** - * All portfolios that don't need to affirm the receivement of a given [`AssetID`]. + * All portfolios that don't need to affirm the receivement of a given [`AssetId`]. **/ - preApprovedPortfolios: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + preApprovedPortfolios: AugmentedQuery Observable, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Storage version. **/ @@ -1570,17 +1570,17 @@ declare module '@polkadot/api-base/types/storage' { userVenues: AugmentedQuery Observable, [PolymeshPrimitivesIdentityId, u64]> & QueryableStorageEntry; /** * Venues that are allowed to create instructions involving a particular asset. Only used if filtering is enabled. - * ([`AssetID`], venue_id) -> allowed + * ([`AssetId`], venue_id) -> allowed **/ - venueAllowList: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + venueAllowList: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Number of venues in the system (It's one more than the actual number) **/ venueCounter: AugmentedQuery Observable, []> & QueryableStorageEntry; /** - * Tracks if a token has enabled filtering venues that can create instructions involving their token. AssetID -> filtering_enabled + * Tracks if a token has enabled filtering venues that can create instructions involving their token. AssetId -> filtering_enabled **/ - venueFiltering: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + venueFiltering: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Info about a venue. venue_id -> venue **/ @@ -1853,17 +1853,17 @@ declare module '@polkadot/api-base/types/storage' { }; statistics: { /** - * Maps a set of [`StatType`] for each [`AssetID`]. + * Maps a set of [`StatType`] for each [`AssetId`]. **/ - activeAssetStats: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + activeAssetStats: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Asset stats. **/ assetStats: AugmentedQuery Observable, [PolymeshPrimitivesStatisticsStat1stKey, PolymeshPrimitivesStatisticsStat2ndKey]> & QueryableStorageEntry; /** - * The [`AssetTransferCompliance`] for each [`AssetID`]. + * The [`AssetTransferCompliance`] for each [`AssetId`]. **/ - assetTransferCompliances: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + assetTransferCompliances: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Storage migration version. **/ @@ -1881,17 +1881,17 @@ declare module '@polkadot/api-base/types/storage' { /** * Total fundraisers created for a token. **/ - fundraiserCount: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetID]> & QueryableStorageEntry; + fundraiserCount: AugmentedQuery Observable, [PolymeshPrimitivesAssetAssetId]> & QueryableStorageEntry; /** * Name for the Fundraiser. Only used offchain. - * (AssetID, fundraiser_id) -> Fundraiser name + * (AssetId, fundraiser_id) -> Fundraiser name **/ - fundraiserNames: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + fundraiserNames: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * All fundraisers that are currently running. - * (AssetID, fundraiser_id) -> Fundraiser + * (AssetId, fundraiser_id) -> Fundraiser **/ - fundraisers: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetID, u64]> & QueryableStorageEntry; + fundraisers: AugmentedQuery Observable>, [PolymeshPrimitivesAssetAssetId, u64]> & QueryableStorageEntry; /** * Storage migration version. **/ diff --git a/scripts/cli/src/interfaces/augment-api-tx.ts b/scripts/cli/src/interfaces/augment-api-tx.ts index a072dd74b2..eeffdd3c19 100644 --- a/scripts/cli/src/interfaces/augment-api-tx.ts +++ b/scripts/cli/src/interfaces/augment-api-tx.ts @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableE import type { BTreeSet, Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; -import type { PalletContractsWasmDeterminism, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCaKind, PalletCorporateActionsInitiateCorporateActionArgs, PalletCorporateActionsRecordDateSpec, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletPipsSnapshotResult, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingSlashingSwitch, PalletStakingValidatorPrefs, PalletStoPriceTier, PalletUtilityUniqueCall, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesIdentityCreateChildIdentityWithAuth, PolymeshCommonUtilitiesIdentitySecondaryKeyWithAuth, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshContractsApi, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsNextUpgrade, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAssetNonFungibleType, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesBeneficiary, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesCondition, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesIdentityClaimClaim, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityClaimScope, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioKind, PolymeshPrimitivesMemo, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesNftNftCollectionKeys, PolymeshPrimitivesNftNftMetadataAttribute, PolymeshPrimitivesPortfolioFund, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationCount, PolymeshPrimitivesSettlementAssetCount, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementReceiptDetails, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeDevelopRuntimeOriginCaller, PolymeshRuntimeDevelopRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; +import type { PalletContractsWasmDeterminism, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsCaId, PalletCorporateActionsCaKind, PalletCorporateActionsInitiateCorporateActionArgs, PalletCorporateActionsRecordDateSpec, PalletCorporateActionsTargetIdentities, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletPipsSnapshotResult, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingSlashingSwitch, PalletStakingValidatorPrefs, PalletStoPriceTier, PalletUtilityUniqueCall, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesIdentityCreateChildIdentityWithAuth, PolymeshCommonUtilitiesIdentitySecondaryKeyWithAuth, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshContractsApi, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsNextUpgrade, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAssetNonFungibleType, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesBeneficiary, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesCondition, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesIdentityClaimClaim, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityClaimScope, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioKind, PolymeshPrimitivesMemo, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesNftNftCollectionKeys, PolymeshPrimitivesNftNftMetadataAttribute, PolymeshPrimitivesPortfolioFund, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationCount, PolymeshPrimitivesSettlementAssetCount, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementReceiptDetails, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeDevelopRuntimeOriginCaller, PolymeshRuntimeDevelopRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; export type __SubmittableExtrinsic = SubmittableExtrinsic; @@ -43,31 +43,31 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `docs`: documents to be attached to the token. * * # Permissions * * Asset **/ - addDocuments: AugmentedSubmittable<(docs: Vec | (PolymeshPrimitivesDocument | { uri?: any; contentHash?: any; name?: any; docType?: any; filingDate?: any } | string | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [Vec, PolymeshPrimitivesAssetAssetID]>; + addDocuments: AugmentedSubmittable<(docs: Vec | (PolymeshPrimitivesDocument | { uri?: any; contentHash?: any; name?: any; docType?: any; filingDate?: any } | string | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [Vec, PolymeshPrimitivesAssetAssetId]>; /** * Sets all identities in the `mediators` set as mandatory mediators for any instruction transfering `asset_id`. * * # Arguments * * `origin`: The secondary key of the sender. - * * `asset_id`: the [`AssetID`] of the asset that will require the mediators. + * * `asset_id`: the [`AssetId`] of the asset that will require the mediators. * * `mediators`: A set of [`IdentityId`] of all the mandatory mediators for the given ticker. * * # Permissions * * Asset **/ - addMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, mediators: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, BTreeSet]>; + addMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, mediators: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, BTreeSet]>; /** * Forces a transfer of token from `from_portfolio` to the caller's default portfolio. * * # Arguments * * `origin`: a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `value`: the [`Balance`] of tokens that will be transferred. * * `from_portfolio`: the [`PortfolioId`] that will have its balance reduced. * @@ -75,7 +75,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - controllerTransfer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, fromPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u128, PolymeshPrimitivesIdentityIdPortfolioId]>; + controllerTransfer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, fromPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u128, PolymeshPrimitivesIdentityIdPortfolioId]>; /** * Initializes a new [`AssetDetails`], with the initiating account as its owner. * The total supply will initially be zero. To mint tokens, use [`Module::issue`]. @@ -114,29 +114,29 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] that will be exempt from affirmation. + * * `asset_id`: the [`AssetId`] that will be exempt from affirmation. * * # Permissions * * Root **/ - exemptAssetAffirmation: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + exemptAssetAffirmation: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Freezes transfers of a given token. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * # Permissions * * Asset **/ - freeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + freeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Issue (i.e mint) new tokens to the caller, which must be an authorized external agent. * * # Arguments * * `origin`: A signer that has permissions to act as an agent of `ticker`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `amount`: The amount of tokens that will be issued. * * `portfolio_kind`: The [`PortfolioKind`] of the portfolio that will receive the minted tokens. * @@ -144,47 +144,47 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - issue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u128, PolymeshPrimitivesIdentityIdPortfolioKind]>; + issue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u128, PolymeshPrimitivesIdentityIdPortfolioKind]>; /** - * Establishes a connection between a ticker and an AssetID. + * Establishes a connection between a ticker and an AssetId. * * # Arguments * * `origin`: the secondary key of the sender. * * `ticker`: the [`Ticker`] that will be linked to the given `asset_id`. - * * `asset_id`: the [`AssetID`] that will be connected to `ticker`. + * * `asset_id`: the [`AssetId`] that will be connected to `ticker`. * * # Permissions * * Asset **/ - linkTickerToAssetId: AugmentedSubmittable<(ticker: PolymeshPrimitivesTicker | string | Uint8Array, assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesTicker, PolymeshPrimitivesAssetAssetID]>; + linkTickerToAssetId: AugmentedSubmittable<(ticker: PolymeshPrimitivesTicker | string | Uint8Array, assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesTicker, PolymeshPrimitivesAssetAssetId]>; /** * If the token associated to `asset_id` is indivisible, sets [`AssetDetails::divisible`] to true. * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `ticker`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * # Permissions * * Asset **/ - makeDivisible: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + makeDivisible: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Pre-approves the receivement of an asset. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] that will be exempt from affirmation. + * * `asset_id`: the [`AssetId`] that will be exempt from affirmation. * * # Permissions * * Asset **/ - preApproveAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + preApproveAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Redeems (i.e burns) existing tokens by reducing the balance of the caller's portfolio and the total supply of the token. * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `value`: amount of tokens to redeem. * * `portfolio_kind`: the [`PortfolioKind`] that will have its balance reduced. * @@ -192,13 +192,13 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - redeem: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u128, PolymeshPrimitivesIdentityIdPortfolioKind]>; + redeem: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u128, PolymeshPrimitivesIdentityIdPortfolioKind]>; /** * Registers and set local asset metadata. * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `name`: the [`AssetMetadataName`]. * * `spec`: the asset metadata specifications ([`AssetMetadataSpec`]). * * `value`: the [`AssetMetadataValue`] of the given metadata key. @@ -208,7 +208,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Agent * * Asset **/ - registerAndSetLocalAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | { url?: any; description?: any; typeDef?: any } | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Bytes, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, Bytes, Option]>; + registerAndSetLocalAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | { url?: any; description?: any; typeDef?: any } | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Bytes, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, Bytes, Option]>; /** * Registers asset metadata global type. * @@ -223,7 +223,7 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `name`: the [`AssetMetadataName`]. * * `spec`: the asset metadata specifications ([`AssetMetadataSpec`]). * @@ -231,7 +231,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Agent * * Asset **/ - registerAssetMetadataLocalType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | { url?: any; description?: any; typeDef?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Bytes, PolymeshPrimitivesAssetMetadataAssetMetadataSpec]>; + registerAssetMetadataLocalType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, name: Bytes | string | Uint8Array, spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec | { url?: any; description?: any; typeDef?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Bytes, PolymeshPrimitivesAssetMetadataAssetMetadataSpec]>; /** * Registers a custom asset type. * @@ -261,89 +261,89 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] that will have its exemption removed. + * * `asset_id`: the [`AssetId`] that will have its exemption removed. * * # Permissions * * Root **/ - removeAssetAffirmationExemption: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + removeAssetAffirmationExemption: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Removes the pre approval of an asset. * * # Arguments * * `origin` - the secondary key of the sender. - * * `asset_id`: the [`AssetID`] that will have its exemption removed. + * * `asset_id`: the [`AssetId`] that will have its exemption removed. * * # Permissions * * Asset **/ - removeAssetPreApproval: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + removeAssetPreApproval: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Remove documents for a given token. * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `docs_id`: a vector of all [`DocumentId`] that will be removed from the token. * * # Permissions * * Asset **/ - removeDocuments: AugmentedSubmittable<(docsId: Vec | (u32 | AnyNumber | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [Vec, PolymeshPrimitivesAssetAssetID]>; + removeDocuments: AugmentedSubmittable<(docsId: Vec | (u32 | AnyNumber | Uint8Array)[], assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [Vec, PolymeshPrimitivesAssetAssetId]>; /** * Removes the asset metadata key and value of a local key. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] associated to the local metadata key. + * * `asset_id`: the [`AssetId`] associated to the local metadata key. * * `local_key`: the [`AssetMetadataLocalKey`] that will be removed. * * # Permissions * * Asset **/ - removeLocalMetadataKey: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, localKey: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64]>; + removeLocalMetadataKey: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, localKey: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64]>; /** * Removes all identities in the `mediators` set from the mandatory mediators list for the given `asset_id`. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] of the asset that will have mediators removed. + * * `asset_id`: the [`AssetId`] of the asset that will have mediators removed. * * `mediators`: A set of [`IdentityId`] of all the mediators that will be removed from the mandatory mediators list. * * # Permissions * * Asset **/ - removeMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, mediators: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, BTreeSet]>; + removeMandatoryMediators: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, mediators: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, BTreeSet]>; /** * Removes the asset metadata value of a metadata key. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] associated to the metadata key. + * * `asset_id`: the [`AssetId`] associated to the metadata key. * * `metadata_key`: the [`AssetMetadataKey`] that will have its value deleted. * * # Permissions * * Asset **/ - removeMetadataValue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, metadataKey: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey]>; + removeMetadataValue: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, metadataKey: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey]>; /** * Updates the [`AssetName`] associated to a security token. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `asset_name`: the [`AssetName`] that will be associated to the token. * * # Permissions * * Asset **/ - renameAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, assetName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Bytes]>; + renameAsset: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Bytes]>; /** * Set asset metadata value. * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `key`: the [`AssetMetadataKey`] associated to the token. * * `value`: the [`AssetMetadataValue`] of the given metadata key. * * `details`: optional [`AssetMetadataValueDetail`] (expire, lock status). @@ -352,13 +352,13 @@ declare module '@polkadot/api-base/types/submittable' { * * Agent * * Asset **/ - setAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey, Bytes, Option]>; + setAssetMetadata: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array, value: Bytes | string | Uint8Array, detail: Option | null | Uint8Array | PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey, Bytes, Option]>; /** * Set asset metadata value details (expire, lock status). * * # Arguments * * `origin`: is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `key`: the [`AssetMetadataKey`] associated to the token. * * `details`: the [`AssetMetadataValueDetail`] (expire, lock status) that will be associated to the token. * @@ -366,54 +366,54 @@ declare module '@polkadot/api-base/types/submittable' { * * Agent * * Asset **/ - setAssetMetadataDetails: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array, detail: PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail]>; + setAssetMetadataDetails: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, key: PolymeshPrimitivesAssetMetadataAssetMetadataKey | { Global: any } | { Local: any } | string | Uint8Array, detail: PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail | { expire?: any; lockStatus?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail]>; /** * Sets the name of the current funding round. * * # Arguments * * `origin`: a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `founding_round_name`: the [`FoundingRoundName`] of the current funding round. * * # Permissions * * Asset **/ - setFundingRound: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, foundingRoundName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Bytes]>; + setFundingRound: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, foundingRoundName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Bytes]>; /** * Unfreezes transfers of a given token. * * # Arguments * * `origin`: the secondary key of the sender. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * # Permissions * * Asset **/ - unfreeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + unfreeze: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Updates the type of an asset. * * # Arguments * * `origin`: it contains the secondary key of the sender - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `asset_type`: the new [`AssetType`] of the token. * * # Permissions * * Asset **/ - updateAssetType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, assetType: PolymeshPrimitivesAssetAssetType | { EquityCommon: any } | { EquityPreferred: any } | { Commodity: any } | { FixedIncome: any } | { REIT: any } | { Fund: any } | { RevenueShareAgreement: any } | { StructuredProduct: any } | { Derivative: any } | { Custom: any } | { StableCoin: any } | { NonFungible: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetType]>; + updateAssetType: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetType: PolymeshPrimitivesAssetAssetType | { EquityCommon: any } | { EquityPreferred: any } | { Commodity: any } | { FixedIncome: any } | { REIT: any } | { Fund: any } | { RevenueShareAgreement: any } | { StructuredProduct: any } | { Derivative: any } | { Custom: any } | { StableCoin: any } | { NonFungible: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType]>; /** * Updates the asset identifiers associated to the token. * * # Arguments * * `origin`: a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id`: the [`AssetID`] associated to the token. + * * `asset_id`: the [`AssetId`] associated to the token. * * `asset_identifiers`: a vector of [`AssetIdentifier`] that will be associated to the token. * * # Permissions * * Asset **/ - updateIdentifiers: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, assetIdentifiers: Vec | (PolymeshPrimitivesAssetIdentifier | { CUSIP: any } | { CINS: any } | { ISIN: any } | { LEI: any } | { FIGI: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec]>; + updateIdentifiers: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetIdentifiers: Vec | (PolymeshPrimitivesAssetIdentifier | { CUSIP: any } | { CINS: any } | { ISIN: any } | { LEI: any } | { FIGI: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec]>; /** * Generic tx **/ @@ -597,7 +597,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - distribute: AugmentedSubmittable<(caId: PalletCorporateActionsCaId | { assetId?: any; localId?: any } | string | Uint8Array, portfolio: Option | null | Uint8Array | u64 | AnyNumber, currency: PolymeshPrimitivesAssetAssetID | string | Uint8Array, perShare: u128 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array, paymentAt: u64 | AnyNumber | Uint8Array, expiresAt: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PalletCorporateActionsCaId, Option, PolymeshPrimitivesAssetAssetID, u128, u128, u64, Option]>; + distribute: AugmentedSubmittable<(caId: PalletCorporateActionsCaId | { assetId?: any; localId?: any } | string | Uint8Array, portfolio: Option | null | Uint8Array | u64 | AnyNumber, currency: PolymeshPrimitivesAssetAssetId | string | Uint8Array, perShare: u128 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array, paymentAt: u64 | AnyNumber | Uint8Array, expiresAt: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PalletCorporateActionsCaId, Option, PolymeshPrimitivesAssetAssetId, u128, u128, u64, Option]>; /** * Push benefit of an ongoing distribution to the given `holder`. * @@ -756,7 +756,7 @@ declare module '@polkadot/api-base/types/submittable' { * - `UnauthorizedAgent` if the DID of `origin` isn't a permissioned agent for `asset_id`. * - `CounterOverflow` if the total checkpoint counter would overflow. **/ - createCheckpoint: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + createCheckpoint: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Creates a schedule generating checkpoints * in the future at either a fixed time or at intervals. @@ -776,7 +776,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - createSchedule: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, schedule: PolymeshCommonUtilitiesCheckpointScheduleCheckpoints | { pending?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; + createSchedule: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, schedule: PolymeshCommonUtilitiesCheckpointScheduleCheckpoints | { pending?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; /** * Removes the checkpoint schedule of an asset identified by `id`. * @@ -793,7 +793,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - removeSchedule: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64]>; + removeSchedule: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64]>; /** * Sets the max complexity of a schedule set for an arbitrary asset_id to `max_complexity`. * The new maximum is not enforced retroactively, @@ -911,7 +911,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - addComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, senderConditions: Vec | (PolymeshPrimitivesCondition | { conditionType?: any; issuers?: any } | string | Uint8Array)[], receiverConditions: Vec | (PolymeshPrimitivesCondition | { conditionType?: any; issuers?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec, Vec]>; + addComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, senderConditions: Vec | (PolymeshPrimitivesCondition | { conditionType?: any; issuers?: any } | string | Uint8Array)[], receiverConditions: Vec | (PolymeshPrimitivesCondition | { conditionType?: any; issuers?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec, Vec]>; /** * Adds another default trusted claim issuer at the asset level. * @@ -923,7 +923,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - addDefaultTrustedClaimIssuer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, issuer: PolymeshPrimitivesConditionTrustedIssuer | { issuer?: any; trustedFor?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesConditionTrustedIssuer]>; + addDefaultTrustedClaimIssuer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, issuer: PolymeshPrimitivesConditionTrustedIssuer | { issuer?: any; trustedFor?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesConditionTrustedIssuer]>; /** * Modify an existing compliance requirement of a given asset. * @@ -935,7 +935,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - changeComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, newReq: PolymeshPrimitivesComplianceManagerComplianceRequirement | { senderConditions?: any; receiverConditions?: any; id?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; + changeComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, newReq: PolymeshPrimitivesComplianceManagerComplianceRequirement | { senderConditions?: any; receiverConditions?: any; id?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; /** * Pauses the verification of conditions for `asset_id` during transfers. * @@ -946,7 +946,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - pauseAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + pauseAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Removes a compliance requirement from an asset's compliance. * @@ -958,7 +958,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - removeComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u32]>; + removeComplianceRequirement: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u32]>; /** * Removes the given `issuer` from the set of default trusted claim issuers at the asset level. * @@ -970,7 +970,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - removeDefaultTrustedClaimIssuer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, issuer: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]>; + removeDefaultTrustedClaimIssuer: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, issuer: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]>; /** * Replaces an asset's compliance with a new compliance. * @@ -988,7 +988,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - replaceAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, assetCompliance: Vec | (PolymeshPrimitivesComplianceManagerComplianceRequirement | { senderConditions?: any; receiverConditions?: any; id?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec]>; + replaceAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, assetCompliance: Vec | (PolymeshPrimitivesComplianceManagerComplianceRequirement | { senderConditions?: any; receiverConditions?: any; id?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec]>; /** * Removes an asset's compliance * @@ -999,7 +999,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - resetAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + resetAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Resumes the verification of conditions for `asset_id` during transfers. * @@ -1010,7 +1010,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - resumeAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + resumeAssetCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Generic tx **/ @@ -1184,11 +1184,11 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - initiateCorporateAction: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, kind: PalletCorporateActionsCaKind | 'PredictableBenefit' | 'UnpredictableBenefit' | 'IssuerNotice' | 'Reorganization' | 'Other' | number | Uint8Array, declDate: u64 | AnyNumber | Uint8Array, recordDate: Option | null | Uint8Array | PalletCorporateActionsRecordDateSpec | { Scheduled: any } | { ExistingSchedule: any } | { Existing: any } | string, details: Bytes | string | Uint8Array, targets: Option | null | Uint8Array | PalletCorporateActionsTargetIdentities | { identities?: any; treatment?: any } | string, defaultWithholdingTax: Option | null | Uint8Array | Permill | AnyNumber, withholdingTax: Option>> | null | Uint8Array | Vec> | ([PolymeshPrimitivesIdentityId | string | Uint8Array, Permill | AnyNumber | Uint8Array])[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PalletCorporateActionsCaKind, u64, Option, Bytes, Option, Option, Option>>]>; + initiateCorporateAction: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, kind: PalletCorporateActionsCaKind | 'PredictableBenefit' | 'UnpredictableBenefit' | 'IssuerNotice' | 'Reorganization' | 'Other' | number | Uint8Array, declDate: u64 | AnyNumber | Uint8Array, recordDate: Option | null | Uint8Array | PalletCorporateActionsRecordDateSpec | { Scheduled: any } | { ExistingSchedule: any } | { Existing: any } | string, details: Bytes | string | Uint8Array, targets: Option | null | Uint8Array | PalletCorporateActionsTargetIdentities | { identities?: any; treatment?: any } | string, defaultWithholdingTax: Option | null | Uint8Array | Permill | AnyNumber, withholdingTax: Option>> | null | Uint8Array | Vec> | ([PolymeshPrimitivesIdentityId | string | Uint8Array, Permill | AnyNumber | Uint8Array])[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PalletCorporateActionsCaKind, u64, Option, Bytes, Option, Option, Option>>]>; /** * Utility extrinsic to batch `initiate_corporate_action` and `distribute` **/ - initiateCorporateActionAndDistribute: AugmentedSubmittable<(caArgs: PalletCorporateActionsInitiateCorporateActionArgs | { assetId?: any; kind?: any; declDate?: any; recordDate?: any; details?: any; targets?: any; defaultWithholdingTax?: any; withholdingTax?: any } | string | Uint8Array, portfolio: Option | null | Uint8Array | u64 | AnyNumber, currency: PolymeshPrimitivesAssetAssetID | string | Uint8Array, perShare: u128 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array, paymentAt: u64 | AnyNumber | Uint8Array, expiresAt: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PalletCorporateActionsInitiateCorporateActionArgs, Option, PolymeshPrimitivesAssetAssetID, u128, u128, u64, Option]>; + initiateCorporateActionAndDistribute: AugmentedSubmittable<(caArgs: PalletCorporateActionsInitiateCorporateActionArgs | { assetId?: any; kind?: any; declDate?: any; recordDate?: any; details?: any; targets?: any; defaultWithholdingTax?: any; withholdingTax?: any } | string | Uint8Array, portfolio: Option | null | Uint8Array | u64 | AnyNumber, currency: PolymeshPrimitivesAssetAssetId | string | Uint8Array, perShare: u128 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array, paymentAt: u64 | AnyNumber | Uint8Array, expiresAt: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PalletCorporateActionsInitiateCorporateActionArgs, Option, PolymeshPrimitivesAssetAssetId, u128, u128, u64, Option]>; /** * Link the given CA `id` to the given `docs`. * Any previous links for the CA are removed in favor of `docs`. @@ -1246,7 +1246,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - setDefaultTargets: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, targets: PalletCorporateActionsTargetIdentities | { identities?: any; treatment?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PalletCorporateActionsTargetIdentities]>; + setDefaultTargets: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, targets: PalletCorporateActionsTargetIdentities | { identities?: any; treatment?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PalletCorporateActionsTargetIdentities]>; /** * Set the default withholding tax for all DIDs and CAs relevant to this `asset_id`. * @@ -1261,7 +1261,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - setDefaultWithholdingTax: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, tax: Permill | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Permill]>; + setDefaultWithholdingTax: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, tax: Permill | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Permill]>; /** * Set the withholding tax of `asset_id` for `taxed_did` to `tax`. * If `Some(tax)`, this overrides the default withholding tax of `asset_id` to `tax` for `taxed_did`. @@ -1280,7 +1280,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - setDidWithholdingTax: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, taxedDid: PolymeshPrimitivesIdentityId | string | Uint8Array, tax: Option | null | Uint8Array | Permill | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId, Option]>; + setDidWithholdingTax: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, taxedDid: PolymeshPrimitivesIdentityId | string | Uint8Array, tax: Option | null | Uint8Array | Permill | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId, Option]>; /** * Set the max `length` of `details` in terms of bytes. * May only be called via a PIP. @@ -1470,7 +1470,7 @@ declare module '@polkadot/api-base/types/submittable' { * Abdicate agentship for `asset_id`. * * # Arguments - * - `assetID` the [`AssetID] of which the caller is an agent. + * - `assetID` the [`AssetId] of which the caller is an agent. * * # Errors * - `NotAnAgent` if the caller is not an agent of `asset_id`. @@ -1479,7 +1479,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - abdicate: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID]>; + abdicate: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId]>; /** * Accept an authorization by an agent "Alice" who issued `auth_id` * to also become an agent of the asset Alice specified. @@ -1503,7 +1503,7 @@ declare module '@polkadot/api-base/types/submittable' { * Change the agent group that `agent` belongs to in `asset_id`. * * # Arguments - * - `assetID` the [`AssetID] that has the `agent`. + * - `assetID` the [`AssetId] that has the `agent`. * - `agent` of `asset_id` to change the group for. * - `group` that `agent` will belong to in `asset_id`. * @@ -1517,7 +1517,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - changeGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array, group: PolymeshPrimitivesAgentAgentGroup | { Full: any } | { Custom: any } | { ExceptMeta: any } | { PolymeshV1CAA: any } | { PolymeshV1PIA: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId, PolymeshPrimitivesAgentAgentGroup]>; + changeGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array, group: PolymeshPrimitivesAgentAgentGroup | { Full: any } | { Custom: any } | { ExceptMeta: any } | { PolymeshV1CAA: any } | { PolymeshV1PIA: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId, PolymeshPrimitivesAgentAgentGroup]>; /** * Utility extrinsic to batch `create_group` and `change_group` for custom groups only. * @@ -1525,7 +1525,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - createAndChangeCustomGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesIdentityId]>; + createAndChangeCustomGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesIdentityId]>; /** * Creates a custom agent group (AG) for the given `asset_id`. * @@ -1534,7 +1534,7 @@ declare module '@polkadot/api-base/types/submittable' { * which you can use as `AgentGroup::Custom(id)` when adding agents for `asset_id`. * * # Arguments - * - `assetID` the [`AssetID] to add the custom group for. + * - `assetID` the [`AssetId] to add the custom group for. * - `perms` that the new AG will have. * * # Errors @@ -1546,7 +1546,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - createGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; + createGroup: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; /** * Utility extrinsic to batch `create_group` and `add_auth`. * @@ -1554,12 +1554,12 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - createGroupAndAddAuth: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array, target: PolymeshPrimitivesIdentityId | string | Uint8Array, expiry: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesIdentityId, Option]>; + createGroupAndAddAuth: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array, target: PolymeshPrimitivesIdentityId | string | Uint8Array, expiry: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesIdentityId, Option]>; /** * Remove the given `agent` from `asset_id`. * * # Arguments - * - `assetID` the [`AssetID] that has the `agent` to remove. + * - `assetID` the [`AssetId] that has the `agent` to remove. * - `agent` of `asset_id` to remove. * * # Errors @@ -1571,12 +1571,12 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - removeAgent: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]>; + removeAgent: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, agent: PolymeshPrimitivesIdentityId | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]>; /** * Updates the permissions of the custom AG identified by `id`, for the given `asset_id`. * * # Arguments - * - `assetID` the [`AssetID] the custom AG belongs to. + * - `assetID` the [`AssetId] the custom AG belongs to. * - `id` for the custom AG within `asset_id`. * - `perms` to update the custom AG to. * @@ -1589,7 +1589,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Agent **/ - setGroupPermissions: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u32 | AnyNumber | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; + setGroupPermissions: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u32 | AnyNumber | Uint8Array, perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions | { Whole: any } | { These: any } | { Except: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; /** * Generic tx **/ @@ -2099,7 +2099,7 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin` - contains the secondary key of the caller (i.e. who signed the transaction to execute this function). - * * `asset_id` - optional [`AssetID`] associated to the new collection. `None` will create a new asset. + * * `asset_id` - optional [`AssetId`] associated to the new collection. `None` will create a new asset. * * `nft_type` - in case the asset hasn't been created yet, one will be created with the given type. * * `collection_keys` - all mandatory metadata keys that the tokens in the collection must have. * @@ -2113,13 +2113,13 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - createNftCollection: AugmentedSubmittable<(assetId: Option | null | Uint8Array | PolymeshPrimitivesAssetAssetID | string, nftType: Option | null | Uint8Array | PolymeshPrimitivesAssetNonFungibleType | { Derivative: any } | { FixedIncome: any } | { Invoice: any } | { Custom: any } | string, collectionKeys: PolymeshPrimitivesNftNftCollectionKeys) => SubmittableExtrinsic, [Option, Option, PolymeshPrimitivesNftNftCollectionKeys]>; + createNftCollection: AugmentedSubmittable<(assetId: Option | null | Uint8Array | PolymeshPrimitivesAssetAssetId | string, nftType: Option | null | Uint8Array | PolymeshPrimitivesAssetNonFungibleType | { Derivative: any } | { FixedIncome: any } | { Invoice: any } | { Custom: any } | string, collectionKeys: PolymeshPrimitivesNftNftCollectionKeys) => SubmittableExtrinsic, [Option, Option, PolymeshPrimitivesNftNftCollectionKeys]>; /** * Issues an NFT to the caller. * * # Arguments * * `origin` - is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id` - the [`AssetID`] of the NFT collection. + * * `asset_id` - the [`AssetId`] of the NFT collection. * * `nft_metadata_attributes` - all mandatory metadata keys and values for the NFT. * - `portfolio_kind` - the portfolio that will receive the minted nft. * @@ -2133,13 +2133,13 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - issueNft: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, nftMetadataAttributes: Vec | (PolymeshPrimitivesNftNftMetadataAttribute | { key?: any; value?: any } | string | Uint8Array)[], portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec, PolymeshPrimitivesIdentityIdPortfolioKind]>; + issueNft: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, nftMetadataAttributes: Vec | (PolymeshPrimitivesNftNftMetadataAttribute | { key?: any; value?: any } | string | Uint8Array)[], portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec, PolymeshPrimitivesIdentityIdPortfolioKind]>; /** * Redeems the given NFT from the caller's portfolio. * * # Arguments * * `origin` - is a signer that has permissions to act as an agent of `asset_id`. - * * `asset_id` - the [`AssetID`] of the NFT collection. + * * `asset_id` - the [`AssetId`] of the NFT collection. * * `nft_id` - the id of the NFT to be burned. * * `portfolio_kind` - the portfolio that contains the nft. * @@ -2151,7 +2151,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - redeemNft: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, nftId: u64 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64, PolymeshPrimitivesIdentityIdPortfolioKind]>; + redeemNft: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, nftId: u64 | AnyNumber | Uint8Array, portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind | { Default: any } | { User: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64, PolymeshPrimitivesIdentityIdPortfolioKind]>; /** * Generic tx **/ @@ -2562,13 +2562,13 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin` - the secondary key of the sender. - * * `asset_id` - the [`AssetID`] that will be exempt from affirmation. + * * `asset_id` - the [`AssetId`] that will be exempt from affirmation. * * `portfolio_id` - the [`PortfolioId`] that can receive `asset_id` without affirmation. * * # Permissions * * Portfolio **/ - preApprovePortfolio: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, portfolioId: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityIdPortfolioId]>; + preApprovePortfolio: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, portfolioId: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityIdPortfolioId]>; /** * When called by the custodian of `portfolio_id`, * allows returning the custody of the portfolio to the portfolio owner unilaterally. @@ -2585,13 +2585,13 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * * `origin` - the secondary key of the sender. - * * `asset_id` - the [`AssetID`] that will be exempt from affirmation. + * * `asset_id` - the [`AssetId`] that will be exempt from affirmation. * * `portfolio_id` - the [`PortfolioId`] that can receive `asset_id` without affirmation. * * # Permissions * * Portfolio **/ - removePortfolioPreApproval: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, portfolioId: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityIdPortfolioId]>; + removePortfolioPreApproval: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, portfolioId: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityIdPortfolioId]>; /** * Renames a non-default portfolio. * @@ -2945,13 +2945,13 @@ declare module '@polkadot/api-base/types/submittable' { /** * Allows additional venues to create instructions involving an asset. * - * * `asset_id` - AssetID of the token in question. + * * `asset_id` - AssetId of the token in question. * * `venues` - Array of venues that are allowed to create instructions for the token in question. * * # Permissions * * Asset **/ - allowVenues: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, venues: Vec | (u64 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec]>; + allowVenues: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, venues: Vec | (u64 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec]>; /** * Registers a new venue. * @@ -2963,13 +2963,13 @@ declare module '@polkadot/api-base/types/submittable' { /** * Revokes permission given to venues for creating instructions involving a particular asset. * - * * `asset_id` - AssetID of the token in question. + * * `asset_id` - AssetId of the token in question. * * `venues` - Array of venues that are no longer allowed to create instructions for the token in question. * * # Permissions * * Asset **/ - disallowVenues: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, venues: Vec | (u64 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, Vec]>; + disallowVenues: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, venues: Vec | (u64 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, Vec]>; /** * Manually executes an instruction. * @@ -3029,13 +3029,13 @@ declare module '@polkadot/api-base/types/submittable' { * Enables or disabled venue filtering for a token. * * # Arguments - * * `asset_id` - AssetID of the token in question. + * * `asset_id` - AssetId of the token in question. * * `enabled` - Boolean that decides if the filtering should be enabled. * * # Permissions * * Asset **/ - setVenueFiltering: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, bool]>; + setVenueFiltering: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, bool]>; /** * Edit a venue's details. * @@ -3498,7 +3498,7 @@ declare module '@polkadot/api-base/types/submittable' { * * # Arguments * - `origin` - a signer that has permissions to act as an agent of `asset_id`. - * - `asset_id` - the [`AssetID`] to change the active stats on. + * - `asset_id` - the [`AssetId`] to change the active stats on. * - `stat_type` - stat type to update. * - `values` - Updated values for `stat_type`. * @@ -3510,13 +3510,13 @@ declare module '@polkadot/api-base/types/submittable' { * - Agent * - Asset **/ - batchUpdateAssetStats: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, statType: PolymeshPrimitivesStatisticsStatType | { operationType?: any; claimIssuer?: any } | string | Uint8Array, values: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesStatisticsStatType, BTreeSet]>; + batchUpdateAssetStats: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, statType: PolymeshPrimitivesStatisticsStatType | { operationType?: any; claimIssuer?: any } | string | Uint8Array, values: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesStatisticsStatType, BTreeSet]>; /** * Set the active asset stat_types. * * # Arguments * - `origin` - a signer that has permissions to act as an agent of `asset_id`. - * - `asset_id` - the [`AssetID`] to change the active stats on. + * - `asset_id` - the [`AssetId`] to change the active stats on. * - `stat_types` - the new stat types to replace any existing types. * * # Errors @@ -3528,13 +3528,13 @@ declare module '@polkadot/api-base/types/submittable' { * - Agent * - Asset **/ - setActiveAssetStats: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, statTypes: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, BTreeSet]>; + setActiveAssetStats: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, statTypes: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, BTreeSet]>; /** * Set asset transfer compliance rules. * * # Arguments * - `origin` - a signer that has permissions to act as an agent of `asset_id`. - * - `asset_id` - the [`AssetID`] to change the active stats on. + * - `asset_id` - the [`AssetId`] to change the active stats on. * - `transfer_conditions` - the new transfer condition to replace any existing conditions. * * # Errors @@ -3546,7 +3546,7 @@ declare module '@polkadot/api-base/types/submittable' { * - Agent * - Asset **/ - setAssetTransferCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetID | string | Uint8Array, transferConditions: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, BTreeSet]>; + setAssetTransferCompliance: AugmentedSubmittable<(assetId: PolymeshPrimitivesAssetAssetId | string | Uint8Array, transferConditions: BTreeSet) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, BTreeSet]>; /** * Set/unset entities exempt from an asset's transfer compliance rules. * @@ -3588,7 +3588,7 @@ declare module '@polkadot/api-base/types/submittable' { * * Asset * * Portfolio **/ - createFundraiser: AugmentedSubmittable<(offeringPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, raisingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, raisingAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, tiers: Vec | (PalletStoPriceTier | { total?: any; price?: any } | string | Uint8Array)[], venueId: u64 | AnyNumber | Uint8Array, start: Option | null | Uint8Array | u64 | AnyNumber, end: Option | null | Uint8Array | u64 | AnyNumber, minimumInvestment: u128 | AnyNumber | Uint8Array, fundraiserName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID, Vec, u64, Option, Option, u128, Bytes]>; + createFundraiser: AugmentedSubmittable<(offeringPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, raisingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, raisingAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, tiers: Vec | (PalletStoPriceTier | { total?: any; price?: any } | string | Uint8Array)[], venueId: u64 | AnyNumber | Uint8Array, start: Option | null | Uint8Array | u64 | AnyNumber, end: Option | null | Uint8Array | u64 | AnyNumber, minimumInvestment: u128 | AnyNumber | Uint8Array, fundraiserName: Bytes | string | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId, Vec, u64, Option, Option, u128, Bytes]>; /** * Freeze a fundraiser. * @@ -3598,7 +3598,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - freezeFundraiser: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64]>; + freezeFundraiser: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64]>; /** * Invest in a fundraiser. * @@ -3613,7 +3613,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Portfolio **/ - invest: AugmentedSubmittable<(investmentPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, fundingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array, purchaseAmount: u128 | AnyNumber | Uint8Array, maxPrice: Option | null | Uint8Array | u128 | AnyNumber, receipt: Option | null | Uint8Array | PolymeshPrimitivesSettlementReceiptDetails | { uid?: any; instructionId?: any; legId?: any; signer?: any; signature?: any; metadata?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID, u64, u128, Option, Option]>; + invest: AugmentedSubmittable<(investmentPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, fundingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId | { did?: any; kind?: any } | string | Uint8Array, offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array, purchaseAmount: u128 | AnyNumber | Uint8Array, maxPrice: Option | null | Uint8Array | u128 | AnyNumber, receipt: Option | null | Uint8Array | PolymeshPrimitivesSettlementReceiptDetails | { uid?: any; instructionId?: any; legId?: any; signer?: any; signature?: any; metadata?: any } | string) => SubmittableExtrinsic, [PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId, u64, u128, Option, Option]>; /** * Modify the time window a fundraiser is active * @@ -3625,7 +3625,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - modifyFundraiserWindow: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array, start: u64 | AnyNumber | Uint8Array, end: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64, u64, Option]>; + modifyFundraiserWindow: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array, start: u64 | AnyNumber | Uint8Array, end: Option | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64, u64, Option]>; /** * Stop a fundraiser. * @@ -3635,7 +3635,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - stop: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64]>; + stop: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64]>; /** * Unfreeze a fundraiser. * @@ -3645,7 +3645,7 @@ declare module '@polkadot/api-base/types/submittable' { * # Permissions * * Asset **/ - unfreezeFundraiser: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetID | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetID, u64]>; + unfreezeFundraiser: AugmentedSubmittable<(offeringAsset: PolymeshPrimitivesAssetAssetId | string | Uint8Array, id: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PolymeshPrimitivesAssetAssetId, u64]>; /** * Generic tx **/ diff --git a/scripts/cli/src/interfaces/augment-types.ts b/scripts/cli/src/interfaces/augment-types.ts index 0bfcdbed31..d65c513aad 100644 --- a/scripts/cli/src/interfaces/augment-types.ts +++ b/scripts/cli/src/interfaces/augment-types.ts @@ -74,7 +74,7 @@ import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalan import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility'; import type { VestingInfo } from '@polkadot/types/interfaces/vesting'; import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, BodyId, BodyPart, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, InboundStatus, InstructionV2, InteriorMultiLocation, Junction, JunctionV0, JunctionV1, JunctionV2, Junctions, JunctionsV1, JunctionsV2, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, NetworkId, OriginKindV0, OriginKindV1, OriginKindV2, OutboundStatus, Outcome, QueryId, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV2Result, VersionMigrationStage, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmVersion, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm'; -import type { AGId, AffirmationCount, AgentGroup, AssetComplianceResult, AssetCount, AssetDidResult, AssetID, AssetPermissions, Authorization, AuthorizationData, AuthorizationType, CanTransferGranularReturn, CappedFee, CddId, CddStatus, Claim, ClaimType, ComplianceReport, ComplianceRequirementResult, Condition, ConditionReport, ConditionResult, ConditionType, CountryCode, CustomClaimTypeId, DidStatus, ExecuteInstructionInfo, ExtrinsicName, ExtrinsicNames, ExtrinsicPermissions, FungibleLeg, GranularCanTransferResult, IdentityClaim, IdentityId, InstructionId, KeyIdentityData, Leg, Member, NFTId, NFTs, NonFungibleLeg, OffChainLeg, PalletName, PalletPermissions, Percentage, Permissions, PipId, PortfolioId, PortfolioKind, PortfolioNumber, PortfolioPermissions, PortfolioValidityResult, ProtocolOp, RequirementReport, RpcDidRecords, RpcDidRecordsSuccess, Scope, SecondaryKey, Signatory, StatClaim, TargetIdentity, Ticker, TransferCondition, TransferConditionResult, TrustedFor, TrustedIssuer, VoteCount, VoteCountProposalFound } from 'polymesh-types/default'; +import type { AGId, AffirmationCount, AgentGroup, AssetComplianceResult, AssetCount, AssetDidResult, AssetId, AssetPermissions, Authorization, AuthorizationData, AuthorizationType, CanTransferGranularReturn, CappedFee, CddId, CddStatus, Claim, ClaimType, ComplianceReport, ComplianceRequirementResult, Condition, ConditionReport, ConditionResult, ConditionType, CountryCode, CustomClaimTypeId, DidStatus, ExecuteInstructionInfo, ExtrinsicName, ExtrinsicNames, ExtrinsicPermissions, FungibleLeg, GranularCanTransferResult, IdentityClaim, IdentityId, InstructionId, KeyIdentityData, Leg, Member, NFTId, NFTs, NonFungibleLeg, OffChainLeg, PalletName, PalletPermissions, Percentage, Permissions, PipId, PortfolioId, PortfolioKind, PortfolioNumber, PortfolioPermissions, PortfolioValidityResult, ProtocolOp, RequirementReport, RpcDidRecords, RpcDidRecordsSuccess, Scope, SecondaryKey, Signatory, StatClaim, TargetIdentity, Ticker, TransferCondition, TransferConditionResult, TrustedFor, TrustedIssuer, VoteCount, VoteCountProposalFound } from 'polymesh-types/default'; declare module '@polkadot/types/types/registry' { interface InterfaceTypes { @@ -127,7 +127,7 @@ declare module '@polkadot/types/types/registry' { AssetDetails: AssetDetails; AssetDidResult: AssetDidResult; AssetId: AssetId; - AssetID: AssetID; + AssetId: AssetId; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; diff --git a/scripts/cli/src/interfaces/default/types.ts b/scripts/cli/src/interfaces/default/types.ts index 9c53d3f5f7..8926f4ade3 100644 --- a/scripts/cli/src/interfaces/default/types.ts +++ b/scripts/cli/src/interfaces/default/types.ts @@ -50,16 +50,16 @@ export interface AssetDidResult extends Enum { readonly type: 'Ok' | 'Err'; } -/** @name AssetID */ -export interface AssetID extends U8aFixed {} +/** @name AssetId */ +export interface AssetId extends U8aFixed {} /** @name AssetPermissions */ export interface AssetPermissions extends Enum { readonly isWhole: boolean; readonly isThese: boolean; - readonly asThese: Vec; + readonly asThese: Vec; readonly isExcept: boolean; - readonly asExcept: Vec; + readonly asExcept: Vec; readonly type: 'Whole' | 'These' | 'Except'; } @@ -81,13 +81,13 @@ export interface AuthorizationData extends Enum { readonly isAddMultiSigSigner: boolean; readonly asAddMultiSigSigner: AccountId; readonly isTransferAssetOwnership: boolean; - readonly asTransferAssetOwnership: AssetID; + readonly asTransferAssetOwnership: AssetId; readonly isJoinIdentity: boolean; readonly asJoinIdentity: Permissions; readonly isPortfolioCustody: boolean; readonly asPortfolioCustody: PortfolioId; readonly isBecomeAgent: boolean; - readonly asBecomeAgent: ITuple<[AssetID, AgentGroup]>; + readonly asBecomeAgent: ITuple<[AssetId, AgentGroup]>; readonly isAddRelayerPayingKey: boolean; readonly asAddRelayerPayingKey: ITuple<[AccountId, AccountId, Balance]>; readonly isRotatePrimaryKeyToSecondary: boolean; @@ -525,7 +525,7 @@ export interface ExtrinsicPermissions extends Enum { export interface FungibleLeg extends Struct { readonly sender: PortfolioId; readonly receiver: PortfolioId; - readonly asset_id: AssetID; + readonly asset_id: AssetId; readonly amount: Balance; } @@ -593,7 +593,7 @@ export interface NFTId extends u64 {} /** @name NFTs */ export interface NFTs extends Struct { - readonly asset_id: AssetID; + readonly asset_id: AssetId; readonly ids: Vec; } @@ -608,7 +608,7 @@ export interface NonFungibleLeg extends Struct { export interface OffChainLeg extends Struct { readonly sender_identity: IdentityId; readonly receiver_identity: IdentityId; - readonly asset_id: AssetID; + readonly asset_id: AssetId; readonly amount: Balance; } @@ -718,7 +718,7 @@ export interface Scope extends Enum { readonly isIdentity: boolean; readonly asIdentity: IdentityId; readonly isAsset: boolean; - readonly asAsset: AssetID; + readonly asAsset: AssetId; readonly isCustom: boolean; readonly asCustom: Bytes; readonly type: 'Identity' | 'Asset' | 'Custom'; diff --git a/scripts/cli/src/interfaces/definitions.ts b/scripts/cli/src/interfaces/definitions.ts index 3abbd12826..daa063cbc1 100644 --- a/scripts/cli/src/interfaces/definitions.ts +++ b/scripts/cli/src/interfaces/definitions.ts @@ -1,3 +1,3 @@ export default { -types: {"AssetID":"[u8; 16]","IdentityId":"[u8; 32]","Ticker":"[u8; 12]","CddId":"[u8; 32]","PalletName":"Text","ExtrinsicName":"Text","AssetPermissions":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"PortfolioPermissions":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"ExtrinsicNames":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"PalletPermissions":{"extrinsics":"ExtrinsicNames"},"ExtrinsicPermissions":{"_enum":{"Whole":"","These":"Vec<(PalletName, PalletPermissions)>","Except":"Vec<(PalletName, PalletPermissions)>"}},"Permissions":{"asset":"AssetPermissions","extrinsic":"ExtrinsicPermissions","portfolio":"PortfolioPermissions"},"Signatory":{"_enum":{"Identity":"IdentityId","Account":"AccountId"}},"SecondaryKey":{"key":"AccountId","permissions":"Permissions"},"KeyIdentityData":{"identity":"IdentityId","permissions":"Option"},"CountryCode":{"_enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","BQ","CW","SX"]},"Scope":{"_enum":{"Identity":"IdentityId","Asset":"AssetID","Custom":"Vec"}},"CustomClaimTypeId":"u32","Claim":{"_enum":{"Accredited":"Scope","Affiliate":"Scope","BuyLockup":"Scope","SellLockup":"Scope","CustomerDueDiligence":"CddId","KnowYourCustomer":"Scope","Jurisdiction":"(CountryCode, Scope)","Exempted":"Scope","Blocked":"Scope","Custom":"(CustomClaimTypeId, Option)"}},"ClaimType":{"_enum":{"Accredited":"","Affiliate":"","BuyLockup":"","SellLockup":"","CustomerDueDiligence":"","KnowYourCustomer":"","Jurisdiction":"","Exempted":"","Blocked":"","Custom":"CustomClaimTypeId"}},"IdentityClaim":{"claim_issuer":"IdentityId","issuance_date":"Moment","last_update_date":"Moment","expiry":"Option","claim":"Claim"},"ComplianceRequirementResult":{"sender_conditions":"Vec","receiver_conditions":"Vec","id":"u32","result":"bool"},"ConditionType":{"_enum":{"IsPresent":"Claim","IsAbsent":"Claim","IsAnyOf":"Vec","IsNoneOf":"Vec","IsIdentity":"TargetIdentity"}},"TrustedFor":{"_enum":{"Any":"","Specific":"Vec"}},"TrustedIssuer":{"issuer":"IdentityId","trusted_for":"TrustedFor"},"Condition":{"condition_type":"ConditionType","issuers":"Vec"},"ConditionResult":{"condition":"Condition","result":"bool"},"PipId":"u32","Authorization":{"authorization_data":"AuthorizationData","authorized_by":"IdentityId","expiry":"Option","auth_id":"u64"},"AuthorizationData":{"_enum":{"AttestPrimaryKeyRotation":"IdentityId","RotatePrimaryKey":"","TransferTicker":"Ticker","AddMultiSigSigner":"AccountId","TransferAssetOwnership":"AssetID","JoinIdentity":"Permissions","PortfolioCustody":"PortfolioId","BecomeAgent":"(AssetID, AgentGroup)","AddRelayerPayingKey":"(AccountId, AccountId, Balance)","RotatePrimaryKeyToSecondary":"Permissions"}},"Percentage":"Permill","StatClaim":{"_enum":{"Accredited":"bool","Affiliate":"bool","Jurisdiction":"Option"}},"TransferCondition":{"_enum":{"MaxInvestorCount":"u64","MaxInvestorOwnership":"Percentage","ClaimCount":"(StatClaim, IdentityId, u64, Option)","ClaimOwnership":"(StatClaim, IdentityId, Percentage, Percentage)"}},"AssetComplianceResult":{"paused":"bool","requirements":"Vec","result":"bool"},"ProtocolOp":{"_enum":["AssetRegisterTicker","AssetIssue","AssetAddDocuments","AssetCreateAsset","CheckpointCreateSchedule","ComplianceManagerAddComplianceRequirement","IdentityCddRegisterDid","IdentityAddClaim","IdentityAddSecondaryKeysWithAuthorization","PipsPropose","ContractsPutCode","CorporateBallotAttachBallot","CapitalDistributionDistribute","NFTCreateCollection","NFTMint","IdentityCreateChildIdentity"]},"CddStatus":{"_enum":{"Ok":"IdentityId","Err":"Vec"}},"AssetDidResult":{"_enum":{"Ok":"IdentityId","Err":"Vec"}},"RpcDidRecordsSuccess":{"primary_key":"AccountId","secondary_keys":"Vec"},"RpcDidRecords":{"_enum":{"Success":"RpcDidRecordsSuccess","IdNotFound":"Vec"}},"VoteCountProposalFound":{"ayes":"u64","nays":"u64"},"VoteCount":{"_enum":{"ProposalFound":"VoteCountProposalFound","ProposalNotFound":""}},"CappedFee":"u64","AuthorizationType":{"_enum":{"AttestPrimaryKeyRotation":"","RotatePrimaryKey":"","TransferTicker":"","AddMultiSigSigner":"","TransferAssetOwnership":"","JoinIdentity":"","PortfolioCustody":"","BecomeAgent":"","AddRelayerPayingKey":"","RotatePrimaryKeyToSecondary":""}},"DidStatus":{"_enum":{"Unknown":"","Exists":"","CddVerified":""}},"PortfolioNumber":"u64","PortfolioKind":{"_enum":{"Default":"","User":"PortfolioNumber"}},"PortfolioId":{"did":"IdentityId","kind":"PortfolioKind"},"Moment":"u64","InstructionId":"u64","TargetIdentity":{"_enum":{"ExternalAgent":"","Specific":"IdentityId"}},"CanTransferGranularReturn":{"_enum":{"Ok":"GranularCanTransferResult","Err":"DispatchError"}},"GranularCanTransferResult":{"invalid_granularity":"bool","self_transfer":"bool","invalid_receiver_cdd":"bool","invalid_sender_cdd":"bool","receiver_custodian_error":"bool","sender_custodian_error":"bool","sender_insufficient_balance":"bool","portfolio_validity_result":"PortfolioValidityResult","asset_frozen":"bool","transfer_condition_result":"Vec","compliance_result":"AssetComplianceResult","result":"bool","consumed_weight":"Option"},"PortfolioValidityResult":{"receiver_is_same_portfolio":"bool","sender_portfolio_does_not_exist":"bool","receiver_portfolio_does_not_exist":"bool","sender_insufficient_balance":"bool","result":"bool"},"TransferConditionResult":{"condition":"TransferCondition","result":"bool"},"AGId":"u32","AgentGroup":{"_enum":{"Full":"","Custom":"AGId","ExceptMeta":"","PolymeshV1CAA":"","PolymeshV1PIA":""}},"Member":{"id":"IdentityId","expiry_at":"Option","inactive_from":"Option"},"NFTId":"u64","NFTs":{"asset_id":"AssetID","ids":"Vec"},"FungibleLeg":{"sender":"PortfolioId","receiver":"PortfolioId","asset_id":"AssetID","amount":"Balance"},"NonFungibleLeg":{"sender":"PortfolioId","receiver":"PortfolioId","nfts":"NFTs"},"OffChainLeg":{"sender_identity":"IdentityId","receiver_identity":"IdentityId","asset_id":"AssetID","amount":"Balance"},"Leg":{"_enum":{"Fungible":"FungibleLeg","NonFungible":"NonFungibleLeg","OffChain":"OffChainLeg"}},"ExecuteInstructionInfo":{"fungible_tokens":"u32","non_fungible_tokens":"u32","off_chain_assets":"u32","consumed_weight":"Weight","error":"Option"},"AssetCount":{"fungible_tokens":"u32","non_fungible_tokens":"u32","off_chain_assets":"u32"},"AffirmationCount":{"sender_asset_count":"AssetCount","receiver_asset_count":"AssetCount","offchain_count":"u32"},"ComplianceReport":{"any_requirement_satistifed":"bool","paused_compliance":"bool","requirements":"Vec"},"RequirementReport":{"requirement_satisfied":"bool","id":"u32","sender_conditions":"Vec","receiver_conditions":"Vec"},"ConditionReport":{"satisfied":"bool","condition":"Condition"}} +types: {"AssetId":"[u8; 16]","IdentityId":"[u8; 32]","Ticker":"[u8; 12]","CddId":"[u8; 32]","PalletName":"Text","ExtrinsicName":"Text","AssetPermissions":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"PortfolioPermissions":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"ExtrinsicNames":{"_enum":{"Whole":"","These":"Vec","Except":"Vec"}},"PalletPermissions":{"extrinsics":"ExtrinsicNames"},"ExtrinsicPermissions":{"_enum":{"Whole":"","These":"Vec<(PalletName, PalletPermissions)>","Except":"Vec<(PalletName, PalletPermissions)>"}},"Permissions":{"asset":"AssetPermissions","extrinsic":"ExtrinsicPermissions","portfolio":"PortfolioPermissions"},"Signatory":{"_enum":{"Identity":"IdentityId","Account":"AccountId"}},"SecondaryKey":{"key":"AccountId","permissions":"Permissions"},"KeyIdentityData":{"identity":"IdentityId","permissions":"Option"},"CountryCode":{"_enum":["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","HK","MO","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","AN","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VI","WF","EH","YE","ZM","ZW","BQ","CW","SX"]},"Scope":{"_enum":{"Identity":"IdentityId","Asset":"AssetId","Custom":"Vec"}},"CustomClaimTypeId":"u32","Claim":{"_enum":{"Accredited":"Scope","Affiliate":"Scope","BuyLockup":"Scope","SellLockup":"Scope","CustomerDueDiligence":"CddId","KnowYourCustomer":"Scope","Jurisdiction":"(CountryCode, Scope)","Exempted":"Scope","Blocked":"Scope","Custom":"(CustomClaimTypeId, Option)"}},"ClaimType":{"_enum":{"Accredited":"","Affiliate":"","BuyLockup":"","SellLockup":"","CustomerDueDiligence":"","KnowYourCustomer":"","Jurisdiction":"","Exempted":"","Blocked":"","Custom":"CustomClaimTypeId"}},"IdentityClaim":{"claim_issuer":"IdentityId","issuance_date":"Moment","last_update_date":"Moment","expiry":"Option","claim":"Claim"},"ComplianceRequirementResult":{"sender_conditions":"Vec","receiver_conditions":"Vec","id":"u32","result":"bool"},"ConditionType":{"_enum":{"IsPresent":"Claim","IsAbsent":"Claim","IsAnyOf":"Vec","IsNoneOf":"Vec","IsIdentity":"TargetIdentity"}},"TrustedFor":{"_enum":{"Any":"","Specific":"Vec"}},"TrustedIssuer":{"issuer":"IdentityId","trusted_for":"TrustedFor"},"Condition":{"condition_type":"ConditionType","issuers":"Vec"},"ConditionResult":{"condition":"Condition","result":"bool"},"PipId":"u32","Authorization":{"authorization_data":"AuthorizationData","authorized_by":"IdentityId","expiry":"Option","auth_id":"u64"},"AuthorizationData":{"_enum":{"AttestPrimaryKeyRotation":"IdentityId","RotatePrimaryKey":"","TransferTicker":"Ticker","AddMultiSigSigner":"AccountId","TransferAssetOwnership":"AssetId","JoinIdentity":"Permissions","PortfolioCustody":"PortfolioId","BecomeAgent":"(AssetId, AgentGroup)","AddRelayerPayingKey":"(AccountId, AccountId, Balance)","RotatePrimaryKeyToSecondary":"Permissions"}},"Percentage":"Permill","StatClaim":{"_enum":{"Accredited":"bool","Affiliate":"bool","Jurisdiction":"Option"}},"TransferCondition":{"_enum":{"MaxInvestorCount":"u64","MaxInvestorOwnership":"Percentage","ClaimCount":"(StatClaim, IdentityId, u64, Option)","ClaimOwnership":"(StatClaim, IdentityId, Percentage, Percentage)"}},"AssetComplianceResult":{"paused":"bool","requirements":"Vec","result":"bool"},"ProtocolOp":{"_enum":["AssetRegisterTicker","AssetIssue","AssetAddDocuments","AssetCreateAsset","CheckpointCreateSchedule","ComplianceManagerAddComplianceRequirement","IdentityCddRegisterDid","IdentityAddClaim","IdentityAddSecondaryKeysWithAuthorization","PipsPropose","ContractsPutCode","CorporateBallotAttachBallot","CapitalDistributionDistribute","NFTCreateCollection","NFTMint","IdentityCreateChildIdentity"]},"CddStatus":{"_enum":{"Ok":"IdentityId","Err":"Vec"}},"AssetDidResult":{"_enum":{"Ok":"IdentityId","Err":"Vec"}},"RpcDidRecordsSuccess":{"primary_key":"AccountId","secondary_keys":"Vec"},"RpcDidRecords":{"_enum":{"Success":"RpcDidRecordsSuccess","IdNotFound":"Vec"}},"VoteCountProposalFound":{"ayes":"u64","nays":"u64"},"VoteCount":{"_enum":{"ProposalFound":"VoteCountProposalFound","ProposalNotFound":""}},"CappedFee":"u64","AuthorizationType":{"_enum":{"AttestPrimaryKeyRotation":"","RotatePrimaryKey":"","TransferTicker":"","AddMultiSigSigner":"","TransferAssetOwnership":"","JoinIdentity":"","PortfolioCustody":"","BecomeAgent":"","AddRelayerPayingKey":"","RotatePrimaryKeyToSecondary":""}},"DidStatus":{"_enum":{"Unknown":"","Exists":"","CddVerified":""}},"PortfolioNumber":"u64","PortfolioKind":{"_enum":{"Default":"","User":"PortfolioNumber"}},"PortfolioId":{"did":"IdentityId","kind":"PortfolioKind"},"Moment":"u64","InstructionId":"u64","TargetIdentity":{"_enum":{"ExternalAgent":"","Specific":"IdentityId"}},"CanTransferGranularReturn":{"_enum":{"Ok":"GranularCanTransferResult","Err":"DispatchError"}},"GranularCanTransferResult":{"invalid_granularity":"bool","self_transfer":"bool","invalid_receiver_cdd":"bool","invalid_sender_cdd":"bool","receiver_custodian_error":"bool","sender_custodian_error":"bool","sender_insufficient_balance":"bool","portfolio_validity_result":"PortfolioValidityResult","asset_frozen":"bool","transfer_condition_result":"Vec","compliance_result":"AssetComplianceResult","result":"bool","consumed_weight":"Option"},"PortfolioValidityResult":{"receiver_is_same_portfolio":"bool","sender_portfolio_does_not_exist":"bool","receiver_portfolio_does_not_exist":"bool","sender_insufficient_balance":"bool","result":"bool"},"TransferConditionResult":{"condition":"TransferCondition","result":"bool"},"AGId":"u32","AgentGroup":{"_enum":{"Full":"","Custom":"AGId","ExceptMeta":"","PolymeshV1CAA":"","PolymeshV1PIA":""}},"Member":{"id":"IdentityId","expiry_at":"Option","inactive_from":"Option"},"NFTId":"u64","NFTs":{"asset_id":"AssetId","ids":"Vec"},"FungibleLeg":{"sender":"PortfolioId","receiver":"PortfolioId","asset_id":"AssetId","amount":"Balance"},"NonFungibleLeg":{"sender":"PortfolioId","receiver":"PortfolioId","nfts":"NFTs"},"OffChainLeg":{"sender_identity":"IdentityId","receiver_identity":"IdentityId","asset_id":"AssetId","amount":"Balance"},"Leg":{"_enum":{"Fungible":"FungibleLeg","NonFungible":"NonFungibleLeg","OffChain":"OffChainLeg"}},"ExecuteInstructionInfo":{"fungible_tokens":"u32","non_fungible_tokens":"u32","off_chain_assets":"u32","consumed_weight":"Weight","error":"Option"},"AssetCount":{"fungible_tokens":"u32","non_fungible_tokens":"u32","off_chain_assets":"u32"},"AffirmationCount":{"sender_asset_count":"AssetCount","receiver_asset_count":"AssetCount","offchain_count":"u32"},"ComplianceReport":{"any_requirement_satistifed":"bool","paused_compliance":"bool","requirements":"Vec"},"RequirementReport":{"requirement_satisfied":"bool","id":"u32","sender_conditions":"Vec","receiver_conditions":"Vec"},"ConditionReport":{"satisfied":"bool","condition":"Condition"}} } \ No newline at end of file diff --git a/scripts/cli/src/interfaces/lookup.ts b/scripts/cli/src/interfaces/lookup.ts index e8a1b77a8f..48375aba2d 100644 --- a/scripts/cli/src/interfaces/lookup.ts +++ b/scripts/cli/src/interfaces/lookup.ts @@ -258,24 +258,24 @@ export default { * Lookup40: polymesh_primitives::secondary_key::Permissions **/ PolymeshPrimitivesSecondaryKeyPermissions: { - asset: 'PolymeshPrimitivesSubsetSubsetRestrictionAssetID', + asset: 'PolymeshPrimitivesSubsetSubsetRestrictionAssetId', extrinsic: 'PolymeshPrimitivesSecondaryKeyExtrinsicPermissions', portfolio: 'PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId' }, /** - * Lookup41: polymesh_primitives::subset::SubsetRestriction + * Lookup41: polymesh_primitives::subset::SubsetRestriction **/ - PolymeshPrimitivesSubsetSubsetRestrictionAssetID: { + PolymeshPrimitivesSubsetSubsetRestrictionAssetId: { _enum: { Whole: 'Null', - These: 'BTreeSet', - Except: 'BTreeSet' + These: 'BTreeSet', + Except: 'BTreeSet' } }, /** - * Lookup42: polymesh_primitives::asset::AssetID + * Lookup42: polymesh_primitives::asset::AssetId **/ - PolymeshPrimitivesAssetAssetID: '[u8;16]', + PolymeshPrimitivesAssetAssetId: '[u8;16]', /** * Lookup46: polymesh_primitives::secondary_key::ExtrinsicPermissions **/ @@ -361,7 +361,7 @@ export default { PolymeshPrimitivesIdentityClaimScope: { _enum: { Identity: 'PolymeshPrimitivesIdentityId', - Asset: 'PolymeshPrimitivesAssetAssetID', + Asset: 'PolymeshPrimitivesAssetAssetId', Custom: 'Bytes' } }, @@ -388,10 +388,10 @@ export default { RotatePrimaryKey: 'Null', TransferTicker: 'PolymeshPrimitivesTicker', AddMultiSigSigner: 'AccountId32', - TransferAssetOwnership: 'PolymeshPrimitivesAssetAssetID', + TransferAssetOwnership: 'PolymeshPrimitivesAssetAssetId', JoinIdentity: 'PolymeshPrimitivesSecondaryKeyPermissions', PortfolioCustody: 'PolymeshPrimitivesIdentityIdPortfolioId', - BecomeAgent: '(PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAgentAgentGroup)', + BecomeAgent: '(PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAgentAgentGroup)', AddRelayerPayingKey: '(AccountId32,AccountId32,u128)', RotatePrimaryKeyToSecondary: 'PolymeshPrimitivesSecondaryKeyPermissions' } @@ -840,36 +840,36 @@ export default { **/ PolymeshCommonUtilitiesAssetRawEvent: { _enum: { - AssetCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,bool,PolymeshPrimitivesAssetAssetType,PolymeshPrimitivesIdentityId,Bytes,Vec,Option)', - IdentifiersUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', - DivisibilityChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,bool)', + AssetCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,bool,PolymeshPrimitivesAssetAssetType,PolymeshPrimitivesIdentityId,Bytes,Vec,Option)', + IdentifiersUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', + DivisibilityChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,bool)', TickerRegistered: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTicker,Option)', TickerTransferred: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTicker,PolymeshPrimitivesIdentityId)', - AssetOwnershipTransferred: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityId)', - AssetFrozen: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - AssetUnfrozen: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - AssetRenamed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Bytes)', - FundingRoundSet: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Bytes)', - DocumentAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u32,PolymeshPrimitivesDocument)', - DocumentRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u32)', - ControllerTransfer: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityIdPortfolioId,u128)', + AssetOwnershipTransferred: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityId)', + AssetFrozen: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + AssetUnfrozen: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + AssetRenamed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Bytes)', + FundingRoundSet: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Bytes)', + DocumentAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u32,PolymeshPrimitivesDocument)', + DocumentRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u32)', + ControllerTransfer: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityIdPortfolioId,u128)', CustomAssetTypeExists: '(PolymeshPrimitivesIdentityId,u32,Bytes)', CustomAssetTypeRegistered: '(PolymeshPrimitivesIdentityId,u32,Bytes)', - SetAssetMetadataValue: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Bytes,Option)', - SetAssetMetadataValueDetails: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail)', - RegisterAssetMetadataLocalType: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Bytes,u64,PolymeshPrimitivesAssetMetadataAssetMetadataSpec)', + SetAssetMetadataValue: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Bytes,Option)', + SetAssetMetadataValueDetails: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail)', + RegisterAssetMetadataLocalType: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Bytes,u64,PolymeshPrimitivesAssetMetadataAssetMetadataSpec)', RegisterAssetMetadataGlobalType: '(Bytes,u64,PolymeshPrimitivesAssetMetadataAssetMetadataSpec)', - AssetTypeChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAssetAssetType)', - LocalMetadataKeyDeleted: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u64)', - MetadataValueDeleted: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAssetMetadataAssetMetadataKey)', - AssetBalanceUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u128,Option,Option,PolymeshPrimitivesPortfolioPortfolioUpdateReason)', - AssetAffirmationExemption: 'PolymeshPrimitivesAssetAssetID', - RemoveAssetAffirmationExemption: 'PolymeshPrimitivesAssetAssetID', - PreApprovedAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - RemovePreApprovedAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - AssetMediatorsAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,BTreeSet)', - AssetMediatorsRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,BTreeSet)', - TickerLinkedToAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTicker,PolymeshPrimitivesAssetAssetID)' + AssetTypeChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAssetAssetType)', + LocalMetadataKeyDeleted: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u64)', + MetadataValueDeleted: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAssetMetadataAssetMetadataKey)', + AssetBalanceUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u128,Option,Option,PolymeshPrimitivesPortfolioPortfolioUpdateReason)', + AssetAffirmationExemption: 'PolymeshPrimitivesAssetAssetId', + RemoveAssetAffirmationExemption: 'PolymeshPrimitivesAssetAssetId', + PreApprovedAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + RemovePreApprovedAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + AssetMediatorsAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,BTreeSet)', + AssetMediatorsRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,BTreeSet)', + TickerLinkedToAsset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTicker,PolymeshPrimitivesAssetAssetId)' } }, /** @@ -1009,7 +1009,7 @@ export default { * Lookup166: pallet_corporate_actions::CAId **/ PalletCorporateActionsCaId: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', localId: 'u32' }, /** @@ -1017,7 +1017,7 @@ export default { **/ PalletCorporateActionsDistribution: { from: 'PolymeshPrimitivesIdentityIdPortfolioId', - currency: 'PolymeshPrimitivesAssetAssetID', + currency: 'PolymeshPrimitivesAssetAssetId', perShare: 'u128', amount: 'u128', remaining: 'u128', @@ -1030,10 +1030,10 @@ export default { **/ PolymeshCommonUtilitiesCheckpointEvent: { _enum: { - CheckpointCreated: '(Option,PolymeshPrimitivesAssetAssetID,u64,u128,u64)', + CheckpointCreated: '(Option,PolymeshPrimitivesAssetAssetId,u64,u128,u64)', MaximumSchedulesComplexityChanged: '(PolymeshPrimitivesIdentityId,u64)', - ScheduleCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u64,PolymeshCommonUtilitiesCheckpointScheduleCheckpoints)', - ScheduleRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u64,PolymeshCommonUtilitiesCheckpointScheduleCheckpoints)' + ScheduleCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u64,PolymeshCommonUtilitiesCheckpointScheduleCheckpoints)', + ScheduleRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u64,PolymeshCommonUtilitiesCheckpointScheduleCheckpoints)' } }, /** @@ -1047,15 +1047,15 @@ export default { **/ PolymeshCommonUtilitiesComplianceManagerEvent: { _enum: { - ComplianceRequirementCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesComplianceManagerComplianceRequirement)', - ComplianceRequirementRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u32)', - AssetComplianceReplaced: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', - AssetComplianceReset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - AssetComplianceResumed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - AssetCompliancePaused: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID)', - ComplianceRequirementChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesComplianceManagerComplianceRequirement)', - TrustedDefaultClaimIssuerAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesConditionTrustedIssuer)', - TrustedDefaultClaimIssuerRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityId)' + ComplianceRequirementCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesComplianceManagerComplianceRequirement)', + ComplianceRequirementRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u32)', + AssetComplianceReplaced: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', + AssetComplianceReset: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + AssetComplianceResumed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + AssetCompliancePaused: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId)', + ComplianceRequirementChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesComplianceManagerComplianceRequirement)', + TrustedDefaultClaimIssuerAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesConditionTrustedIssuer)', + TrustedDefaultClaimIssuerRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityId)' } }, /** @@ -1133,9 +1133,9 @@ export default { PalletCorporateActionsEvent: { _enum: { MaxDetailsLengthChanged: '(PolymeshPrimitivesIdentityId,u32)', - DefaultTargetIdentitiesChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PalletCorporateActionsTargetIdentities)', - DefaultWithholdingTaxChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Permill)', - DidWithholdingTaxChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityId,Option)', + DefaultTargetIdentitiesChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PalletCorporateActionsTargetIdentities)', + DefaultWithholdingTaxChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Permill)', + DidWithholdingTaxChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityId,Option)', CAInitiated: '(PolymeshPrimitivesEventOnly,PalletCorporateActionsCaId,PalletCorporateActionsCorporateAction,Bytes)', CALinkedToDoc: '(PolymeshPrimitivesIdentityId,PalletCorporateActionsCaId,Vec)', CARemoved: '(PolymeshPrimitivesEventOnly,PalletCorporateActionsCaId)', @@ -1305,8 +1305,8 @@ export default { UserPortfolios: '(PolymeshPrimitivesIdentityId,Vec<(u64,Bytes)>)', PortfolioCustodianChanged: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesIdentityId)', FundsMovedBetweenPortfolios: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesPortfolioFundDescription,Option)', - PreApprovedPortfolio: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesAssetAssetID)', - RevokePreApprovedPortfolio: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesAssetAssetID)' + PreApprovedPortfolio: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesAssetAssetId)', + RevokePreApprovedPortfolio: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,PolymeshPrimitivesAssetAssetId)' } }, /** @@ -1315,7 +1315,7 @@ export default { PolymeshPrimitivesPortfolioFundDescription: { _enum: { Fungible: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', amount: 'u128', }, NonFungible: 'PolymeshPrimitivesNftNfTs' @@ -1325,7 +1325,7 @@ export default { * Lookup237: polymesh_primitives::nft::NFTs **/ PolymeshPrimitivesNftNfTs: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', ids: 'Vec' }, /** @@ -1386,13 +1386,13 @@ export default { AffirmationWithdrawn: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesIdentityIdPortfolioId,u64)', InstructionRejected: '(PolymeshPrimitivesIdentityId,u64)', ReceiptClaimed: '(PolymeshPrimitivesIdentityId,u64,u64,u64,AccountId32,Option)', - VenueFiltering: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,bool)', - VenuesAllowed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', - VenuesBlocked: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', + VenueFiltering: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,bool)', + VenuesAllowed: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', + VenuesBlocked: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', LegFailedExecution: '(PolymeshPrimitivesIdentityId,u64,u64)', InstructionFailed: '(PolymeshPrimitivesIdentityId,u64)', InstructionExecuted: '(PolymeshPrimitivesIdentityId,u64)', - VenueUnauthorized: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u64)', + VenueUnauthorized: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u64)', SchedulingFailed: '(u64,SpRuntimeDispatchError)', InstructionRescheduled: '(PolymeshPrimitivesIdentityId,u64)', VenueSignersUpdated: '(PolymeshPrimitivesIdentityId,u64,Vec,bool)', @@ -1433,7 +1433,7 @@ export default { Fungible: { sender: 'PolymeshPrimitivesIdentityIdPortfolioId', receiver: 'PolymeshPrimitivesIdentityIdPortfolioId', - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', amount: 'u128', }, NonFungible: { @@ -1454,10 +1454,10 @@ export default { **/ PolymeshCommonUtilitiesStatisticsEvent: { _enum: { - StatTypesAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', - StatTypesRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', - AssetStatsUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesStatisticsStatType,Vec)', - SetAssetTransferCompliance: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,Vec)', + StatTypesAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', + StatTypesRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', + AssetStatsUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesStatisticsStatType,Vec)', + SetAssetTransferCompliance: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,Vec)', TransferConditionExemptionsAdded: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTransferComplianceTransferConditionExemptKey,Vec)', TransferConditionExemptionsRemoved: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesTransferComplianceTransferConditionExemptKey,Vec)' } @@ -1516,7 +1516,7 @@ export default { * Lookup271: polymesh_primitives::transfer_compliance::TransferConditionExemptKey **/ PolymeshPrimitivesTransferComplianceTransferConditionExemptKey: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', op: 'PolymeshPrimitivesStatisticsStatOpType', claimType: 'Option' }, @@ -1526,7 +1526,7 @@ export default { PalletStoRawEvent: { _enum: { FundraiserCreated: '(PolymeshPrimitivesIdentityId,u64,Bytes,PalletStoFundraiser)', - Invested: '(PolymeshPrimitivesIdentityId,u64,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAssetAssetID,u128,u128)', + Invested: '(PolymeshPrimitivesIdentityId,u64,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAssetAssetId,u128,u128)', FundraiserFrozen: '(PolymeshPrimitivesIdentityId,u64)', FundraiserUnfrozen: '(PolymeshPrimitivesIdentityId,u64)', FundraiserWindowModified: '(PolymeshPrimitivesEventOnly,u64,u64,Option,u64,Option)', @@ -1539,9 +1539,9 @@ export default { PalletStoFundraiser: { creator: 'PolymeshPrimitivesIdentityId', offeringPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', raisingPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', - raisingAsset: 'PolymeshPrimitivesAssetAssetID', + raisingAsset: 'PolymeshPrimitivesAssetAssetId', tiers: 'Vec', venueId: 'u64', start: 'u64', @@ -1614,11 +1614,11 @@ export default { **/ PolymeshCommonUtilitiesExternalAgentsEvent: { _enum: { - GroupCreated: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetID,u32,PolymeshPrimitivesSecondaryKeyExtrinsicPermissions)', - GroupPermissionsUpdated: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetID,u32,PolymeshPrimitivesSecondaryKeyExtrinsicPermissions)', - AgentAdded: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesAgentAgentGroup)', - AgentRemoved: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityId)', - GroupChanged: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetID,PolymeshPrimitivesIdentityId,PolymeshPrimitivesAgentAgentGroup)' + GroupCreated: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetId,u32,PolymeshPrimitivesSecondaryKeyExtrinsicPermissions)', + GroupPermissionsUpdated: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetId,u32,PolymeshPrimitivesSecondaryKeyExtrinsicPermissions)', + AgentAdded: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesAgentAgentGroup)', + AgentRemoved: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityId)', + GroupChanged: '(PolymeshPrimitivesEventOnly,PolymeshPrimitivesAssetAssetId,PolymeshPrimitivesIdentityId,PolymeshPrimitivesAgentAgentGroup)' } }, /** @@ -1727,7 +1727,7 @@ export default { **/ PolymeshCommonUtilitiesNftEvent: { _enum: { - NftCollectionCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetID,u64)', + NftCollectionCreated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesAssetAssetId,u64)', NFTPortfolioUpdated: '(PolymeshPrimitivesIdentityId,PolymeshPrimitivesNftNfTs,Option,Option,PolymeshPrimitivesPortfolioPortfolioUpdateReason)' } }, @@ -2802,46 +2802,46 @@ export default { fundingRoundName: 'Option', }, freeze: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, unfreeze: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, rename_asset: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', assetName: 'Bytes', }, issue: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', amount: 'u128', portfolioKind: 'PolymeshPrimitivesIdentityIdPortfolioKind', }, redeem: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', value: 'u128', portfolioKind: 'PolymeshPrimitivesIdentityIdPortfolioKind', }, make_divisible: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, add_documents: { docs: 'Vec', - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, remove_documents: { docsId: 'Vec', - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, set_funding_round: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', foundingRoundName: 'Bytes', }, update_identifiers: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', assetIdentifiers: 'Vec', }, controller_transfer: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', value: 'u128', fromPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', }, @@ -2856,25 +2856,25 @@ export default { fundingRoundName: 'Option', }, set_asset_metadata: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', key: 'PolymeshPrimitivesAssetMetadataAssetMetadataKey', value: 'Bytes', detail: 'Option', }, set_asset_metadata_details: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', key: 'PolymeshPrimitivesAssetMetadataAssetMetadataKey', detail: 'PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail', }, register_and_set_local_asset_metadata: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', name: 'Bytes', spec: 'PolymeshPrimitivesAssetMetadataAssetMetadataSpec', value: 'Bytes', detail: 'Option', }, register_asset_metadata_local_type: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', name: 'Bytes', spec: 'PolymeshPrimitivesAssetMetadataAssetMetadataSpec', }, @@ -2883,40 +2883,40 @@ export default { spec: 'PolymeshPrimitivesAssetMetadataAssetMetadataSpec', }, update_asset_type: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', assetType: 'PolymeshPrimitivesAssetAssetType', }, remove_local_metadata_key: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', localKey: 'u64', }, remove_metadata_value: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', metadataKey: 'PolymeshPrimitivesAssetMetadataAssetMetadataKey', }, exempt_asset_affirmation: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, remove_asset_affirmation_exemption: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, pre_approve_asset: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, remove_asset_pre_approval: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, add_mandatory_mediators: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', mediators: 'BTreeSet', }, remove_mandatory_mediators: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', mediators: 'BTreeSet', }, link_ticker_to_asset_id: { ticker: 'PolymeshPrimitivesTicker', - assetId: 'PolymeshPrimitivesAssetAssetID' + assetId: 'PolymeshPrimitivesAssetAssetId' } } }, @@ -2928,7 +2928,7 @@ export default { distribute: { caId: 'PalletCorporateActionsCaId', portfolio: 'Option', - currency: 'PolymeshPrimitivesAssetAssetID', + currency: 'PolymeshPrimitivesAssetAssetId', perShare: 'u128', amount: 'u128', paymentAt: 'u64', @@ -2955,17 +2955,17 @@ export default { PalletAssetCheckpointCall: { _enum: { create_checkpoint: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, set_schedules_max_complexity: { maxComplexity: 'u64', }, create_schedule: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', schedule: 'PolymeshCommonUtilitiesCheckpointScheduleCheckpoints', }, remove_schedule: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', id: 'u64' } } @@ -2976,37 +2976,37 @@ export default { PalletComplianceManagerCall: { _enum: { add_compliance_requirement: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', senderConditions: 'Vec', receiverConditions: 'Vec', }, remove_compliance_requirement: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', id: 'u32', }, replace_asset_compliance: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', assetCompliance: 'Vec', }, reset_asset_compliance: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, pause_asset_compliance: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, resume_asset_compliance: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, add_default_trusted_claim_issuer: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', issuer: 'PolymeshPrimitivesConditionTrustedIssuer', }, remove_default_trusted_claim_issuer: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', issuer: 'PolymeshPrimitivesIdentityId', }, change_compliance_requirement: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', newReq: 'PolymeshPrimitivesComplianceManagerComplianceRequirement' } } @@ -3020,20 +3020,20 @@ export default { length: 'u32', }, set_default_targets: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', targets: 'PalletCorporateActionsTargetIdentities', }, set_default_withholding_tax: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', tax: 'Permill', }, set_did_withholding_tax: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', taxedDid: 'PolymeshPrimitivesIdentityId', tax: 'Option', }, initiate_corporate_action: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', kind: 'PalletCorporateActionsCaKind', declDate: 'u64', recordDate: 'Option', @@ -3056,7 +3056,7 @@ export default { initiate_corporate_action_and_distribute: { caArgs: 'PalletCorporateActionsInitiateCorporateActionArgs', portfolio: 'Option', - currency: 'PolymeshPrimitivesAssetAssetID', + currency: 'PolymeshPrimitivesAssetAssetId', perShare: 'u128', amount: 'u128', paymentAt: 'u64', @@ -3078,7 +3078,7 @@ export default { * Lookup440: pallet_corporate_actions::InitiateCorporateActionArgs **/ PalletCorporateActionsInitiateCorporateActionArgs: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', kind: 'PalletCorporateActionsCaKind', declDate: 'u64', recordDate: 'Option', @@ -3213,11 +3213,11 @@ export default { funds: 'Vec', }, pre_approve_portfolio: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', portfolioId: 'PolymeshPrimitivesIdentityIdPortfolioId', }, remove_portfolio_pre_approval: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', portfolioId: 'PolymeshPrimitivesIdentityIdPortfolioId', }, allow_identity_to_create_portfolios: { @@ -3323,15 +3323,15 @@ export default { portfolios: 'Vec', }, set_venue_filtering: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', enabled: 'bool', }, allow_venues: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', venues: 'Vec', }, disallow_venues: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', venues: 'Vec', }, update_venue_signers: { @@ -3480,16 +3480,16 @@ export default { PalletStatisticsCall: { _enum: { set_active_asset_stats: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', statTypes: 'BTreeSet', }, batch_update_asset_stats: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', statType: 'PolymeshPrimitivesStatisticsStatType', values: 'BTreeSet', }, set_asset_transfer_compliance: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', transferConditions: 'BTreeSet', }, set_entities_exempt: { @@ -3506,9 +3506,9 @@ export default { _enum: { create_fundraiser: { offeringPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', raisingPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', - raisingAsset: 'PolymeshPrimitivesAssetAssetID', + raisingAsset: 'PolymeshPrimitivesAssetAssetId', tiers: 'Vec', venueId: 'u64', start: 'Option', @@ -3519,28 +3519,28 @@ export default { invest: { investmentPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', fundingPortfolio: 'PolymeshPrimitivesIdentityIdPortfolioId', - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', id: 'u64', purchaseAmount: 'u128', maxPrice: 'Option', receipt: 'Option', }, freeze_fundraiser: { - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', id: 'u64', }, unfreeze_fundraiser: { - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', id: 'u64', }, modify_fundraiser_window: { - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', id: 'u64', start: 'u64', end: 'Option', }, stop: { - offeringAsset: 'PolymeshPrimitivesAssetAssetID', + offeringAsset: 'PolymeshPrimitivesAssetAssetId', id: 'u64' } } @@ -3684,23 +3684,23 @@ export default { PalletExternalAgentsCall: { _enum: { create_group: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', perms: 'PolymeshPrimitivesSecondaryKeyExtrinsicPermissions', }, set_group_permissions: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', id: 'u32', perms: 'PolymeshPrimitivesSecondaryKeyExtrinsicPermissions', }, remove_agent: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', agent: 'PolymeshPrimitivesIdentityId', }, abdicate: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', }, change_group: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', agent: 'PolymeshPrimitivesIdentityId', group: 'PolymeshPrimitivesAgentAgentGroup', }, @@ -3708,13 +3708,13 @@ export default { authId: 'u64', }, create_group_and_add_auth: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', perms: 'PolymeshPrimitivesSecondaryKeyExtrinsicPermissions', target: 'PolymeshPrimitivesIdentityId', expiry: 'Option', }, create_and_change_custom_group: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', perms: 'PolymeshPrimitivesSecondaryKeyExtrinsicPermissions', agent: 'PolymeshPrimitivesIdentityId' } @@ -3919,17 +3919,17 @@ export default { PalletNftCall: { _enum: { create_nft_collection: { - assetId: 'Option', + assetId: 'Option', nftType: 'Option', collectionKeys: 'PolymeshPrimitivesNftNftCollectionKeys', }, issue_nft: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', nftMetadataAttributes: 'Vec', portfolioKind: 'PolymeshPrimitivesIdentityIdPortfolioKind', }, redeem_nft: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', nftId: 'u64', portfolioKind: 'PolymeshPrimitivesIdentityIdPortfolioKind', }, @@ -4270,7 +4270,7 @@ export default { * Lookup641: pallet_asset::error::Error **/ PalletAssetError: { - _enum: ['Unauthorized', 'AssetAlreadyCreated', 'TickerTooLong', 'TickerNotAlphanumeric', 'TickerAlreadyRegistered', 'TotalSupplyAboveLimit', 'NoSuchAsset', 'AlreadyFrozen', 'NotAnOwner', 'BalanceOverflow', 'TotalSupplyOverflow', 'InvalidGranularity', 'NotFrozen', 'InvalidTransfer', 'InsufficientBalance', 'AssetAlreadyDivisible', 'InvalidEthereumSignature', 'TickerRegistrationExpired', 'SenderSameAsReceiver', 'NoSuchDoc', 'MaxLengthOfAssetNameExceeded', 'FundingRoundNameMaxLengthExceeded', 'InvalidAssetIdentifier', 'InvestorUniquenessClaimNotAllowed', 'InvalidCustomAssetTypeId', 'AssetMetadataNameMaxLengthExceeded', 'AssetMetadataValueMaxLengthExceeded', 'AssetMetadataTypeDefMaxLengthExceeded', 'AssetMetadataKeyIsMissing', 'AssetMetadataValueIsLocked', 'AssetMetadataLocalKeyAlreadyExists', 'AssetMetadataGlobalKeyAlreadyExists', 'TickerFirstByteNotValid', 'UnexpectedNonFungibleToken', 'IncompatibleAssetTypeUpdate', 'AssetMetadataKeyBelongsToNFTCollection', 'AssetMetadataValueIsEmpty', 'NumberOfAssetMediatorsExceeded', 'InvalidTickerCharacter', 'InvalidTransferFrozenAsset', 'InvalidTransferComplianceFailure', 'InvalidTransferInvalidReceiverCDD', 'InvalidTransferInvalidSenderCDD', 'TickerRegistrationNotFound', 'TickerIsAlreadyLinkedToAnAsset', 'AssetIDGenerationError', 'TickerNotRegisteredToCaller'] + _enum: ['Unauthorized', 'AssetAlreadyCreated', 'TickerTooLong', 'TickerNotAlphanumeric', 'TickerAlreadyRegistered', 'TotalSupplyAboveLimit', 'NoSuchAsset', 'AlreadyFrozen', 'NotAnOwner', 'BalanceOverflow', 'TotalSupplyOverflow', 'InvalidGranularity', 'NotFrozen', 'InvalidTransfer', 'InsufficientBalance', 'AssetAlreadyDivisible', 'InvalidEthereumSignature', 'TickerRegistrationExpired', 'SenderSameAsReceiver', 'NoSuchDoc', 'MaxLengthOfAssetNameExceeded', 'FundingRoundNameMaxLengthExceeded', 'InvalidAssetIdentifier', 'InvestorUniquenessClaimNotAllowed', 'InvalidCustomAssetTypeId', 'AssetMetadataNameMaxLengthExceeded', 'AssetMetadataValueMaxLengthExceeded', 'AssetMetadataTypeDefMaxLengthExceeded', 'AssetMetadataKeyIsMissing', 'AssetMetadataValueIsLocked', 'AssetMetadataLocalKeyAlreadyExists', 'AssetMetadataGlobalKeyAlreadyExists', 'TickerFirstByteNotValid', 'UnexpectedNonFungibleToken', 'IncompatibleAssetTypeUpdate', 'AssetMetadataKeyBelongsToNFTCollection', 'AssetMetadataValueIsEmpty', 'NumberOfAssetMediatorsExceeded', 'InvalidTickerCharacter', 'InvalidTransferFrozenAsset', 'InvalidTransferComplianceFailure', 'InvalidTransferInvalidReceiverCDD', 'InvalidTransferInvalidSenderCDD', 'TickerRegistrationNotFound', 'TickerIsAlreadyLinkedToAnAsset', 'AssetIdGenerationError', 'TickerNotRegisteredToCaller'] }, /** * Lookup644: pallet_corporate_actions::distribution::Error @@ -4493,7 +4493,7 @@ export default { * Lookup709: polymesh_primitives::statistics::Stat1stKey **/ PolymeshPrimitivesStatisticsStat1stKey: { - assetId: 'PolymeshPrimitivesAssetAssetID', + assetId: 'PolymeshPrimitivesAssetAssetId', statType: 'PolymeshPrimitivesStatisticsStatType' }, /** @@ -4779,13 +4779,13 @@ export default { **/ PolymeshPrimitivesNftNftCollection: { id: 'u64', - assetId: 'PolymeshPrimitivesAssetAssetID' + assetId: 'PolymeshPrimitivesAssetAssetId' }, /** * Lookup752: pallet_nft::Error **/ PalletNftError: { - _enum: ['BalanceOverflow', 'BalanceUnderflow', 'CollectionAlredyRegistered', 'CollectionNotFound', 'DuplicateMetadataKey', 'DuplicatedNFTId', 'InvalidAssetType', 'InvalidMetadataAttribute', 'InvalidNFTTransferCollectionNotFound', 'InvalidNFTTransferSamePortfolio', 'InvalidNFTTransferNFTNotOwned', 'InvalidNFTTransferCountOverflow', 'InvalidNFTTransferComplianceFailure', 'InvalidNFTTransferFrozenAsset', 'InvalidNFTTransferInsufficientCount', 'MaxNumberOfKeysExceeded', 'MaxNumberOfNFTsPerLegExceeded', 'NFTNotFound', 'UnregisteredMetadataKey', 'ZeroCount', 'SupplyOverflow', 'SupplyUnderflow', 'InvalidNFTTransferNFTIsLocked', 'InvalidNFTTransferSenderIdMatchesReceiverId', 'InvalidNFTTransferInvalidReceiverCDD', 'InvalidNFTTransferInvalidSenderCDD', 'InvalidAssetID'] + _enum: ['BalanceOverflow', 'BalanceUnderflow', 'CollectionAlredyRegistered', 'CollectionNotFound', 'DuplicateMetadataKey', 'DuplicatedNFTId', 'InvalidAssetType', 'InvalidMetadataAttribute', 'InvalidNFTTransferCollectionNotFound', 'InvalidNFTTransferSamePortfolio', 'InvalidNFTTransferNFTNotOwned', 'InvalidNFTTransferCountOverflow', 'InvalidNFTTransferComplianceFailure', 'InvalidNFTTransferFrozenAsset', 'InvalidNFTTransferInsufficientCount', 'MaxNumberOfKeysExceeded', 'MaxNumberOfNFTsPerLegExceeded', 'NFTNotFound', 'UnregisteredMetadataKey', 'ZeroCount', 'SupplyOverflow', 'SupplyUnderflow', 'InvalidNFTTransferNFTIsLocked', 'InvalidNFTTransferSenderIdMatchesReceiverId', 'InvalidNFTTransferInvalidReceiverCDD', 'InvalidNFTTransferInvalidSenderCDD', 'InvalidAssetId'] }, /** * Lookup753: pallet_election_provider_multi_phase::ReadySolution diff --git a/scripts/cli/src/interfaces/registry.ts b/scripts/cli/src/interfaces/registry.ts index 454528b071..e697becd93 100644 --- a/scripts/cli/src/interfaces/registry.ts +++ b/scripts/cli/src/interfaces/registry.ts @@ -5,7 +5,7 @@ // this is required to allow for ambient/previous definitions import '@polkadot/types/types/registry'; -import type { FinalityGrandpaEquivocationPrecommit, FinalityGrandpaEquivocationPrevote, FinalityGrandpaPrecommit, FinalityGrandpaPrevote, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, PalletAssetAssetDetails, PalletAssetCall, PalletAssetCheckpointCall, PalletAssetCheckpointError, PalletAssetError, PalletAssetTickerRegistration, PalletAssetTickerRegistrationConfig, PalletBabeCall, PalletBabeError, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBaseCall, PalletBaseError, PalletBridgeBridgeTxDetail, PalletBridgeBridgeTxStatus, PalletCommitteeCall, PalletCommitteeError, PalletCommitteeInstance1, PalletCommitteeInstance3, PalletCommitteeInstance4, PalletCommitteePolymeshVotes, PalletCommitteeRawEventInstance1, PalletCommitteeRawEventInstance3, PalletCommitteeRawEventInstance4, PalletCommitteeRawOriginInstance1, PalletCommitteeRawOriginInstance3, PalletCommitteeRawOriginInstance4, PalletComplianceManagerCall, PalletComplianceManagerError, PalletContractsCall, PalletContractsError, PalletContractsEvent, PalletContractsSchedule, PalletContractsScheduleHostFnWeights, PalletContractsScheduleInstructionWeights, PalletContractsScheduleLimits, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmDeterminism, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsBallotCall, PalletCorporateActionsBallotError, PalletCorporateActionsBallotEvent, PalletCorporateActionsBallotMotion, PalletCorporateActionsCaCheckpoint, PalletCorporateActionsCaId, PalletCorporateActionsCaKind, PalletCorporateActionsCall, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsDistributionCall, PalletCorporateActionsDistributionError, PalletCorporateActionsDistributionEvent, PalletCorporateActionsError, PalletCorporateActionsEvent, PalletCorporateActionsInitiateCorporateActionArgs, PalletCorporateActionsRecordDate, PalletCorporateActionsRecordDateSpec, PalletCorporateActionsTargetIdentities, PalletCorporateActionsTargetTreatment, PalletElectionProviderMultiPhaseCall, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhaseError, PalletElectionProviderMultiPhaseEvent, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletExternalAgentsCall, PalletExternalAgentsError, PalletGrandpaCall, PalletGrandpaError, PalletGrandpaEvent, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletGroupCall, PalletGroupError, PalletGroupInstance1, PalletGroupInstance2, PalletGroupInstance3, PalletGroupInstance4, PalletIdentityCall, PalletIdentityClaim1stKey, PalletIdentityClaim2ndKey, PalletIdentityError, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineCall, PalletImOnlineError, PalletImOnlineEvent, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Public, PalletImOnlineSr25519AppSr25519Signature, PalletIndicesCall, PalletIndicesError, PalletIndicesEvent, PalletMultisigCall, PalletMultisigError, PalletMultisigEvent, PalletNftCall, PalletNftError, PalletOffencesEvent, PalletPermissionsError, PalletPermissionsStoreCallMetadata, PalletPipsCall, PalletPipsCommittee, PalletPipsDepositInfo, PalletPipsError, PalletPipsPip, PalletPipsPipsMetadata, PalletPipsProposalData, PalletPipsProposalState, PalletPipsProposer, PalletPipsRawEvent, PalletPipsSnapshotMetadata, PalletPipsSnapshotResult, PalletPipsSnapshottedPip, PalletPipsVote, PalletPipsVotingResult, PalletPortfolioCall, PalletPortfolioError, PalletPreimageCall, PalletPreimageError, PalletPreimageEvent, PalletPreimageRequestStatus, PalletProtocolFeeCall, PalletProtocolFeeError, PalletProtocolFeeRawEvent, PalletRelayerCall, PalletRelayerError, PalletRelayerSubsidy, PalletSchedulerCall, PalletSchedulerError, PalletSchedulerEvent, PalletSchedulerScheduled, PalletSessionCall, PalletSessionError, PalletSessionEvent, PalletSettlementCall, PalletSettlementError, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingIndividualExposure, PalletStakingNominations, PalletStakingPalletCall, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletError, PalletStakingPalletEvent, PalletStakingPermissionedIdentityPrefs, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingSlashingSwitch, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStatisticsCall, PalletStatisticsError, PalletStoCall, PalletStoError, PalletStoFundraiser, PalletStoFundraiserStatus, PalletStoFundraiserTier, PalletStoPriceTier, PalletStoRawEvent, PalletSudoCall, PalletSudoError, PalletSudoRawEvent, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsRawEvent, PalletTimestampCall, PalletTransactionPaymentChargeTransactionPayment, PalletTransactionPaymentRawEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryRawEvent, PalletUtilityCall, PalletUtilityError, PalletUtilityEvent, PalletUtilityUniqueCall, PolymeshCommonUtilitiesAssetRawEvent, PolymeshCommonUtilitiesBalancesAccountData, PolymeshCommonUtilitiesBalancesRawEvent, PolymeshCommonUtilitiesBalancesReasons, PolymeshCommonUtilitiesBaseEvent, PolymeshCommonUtilitiesCheckpointEvent, PolymeshCommonUtilitiesCheckpointNextCheckpoints, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesComplianceManagerEvent, PolymeshCommonUtilitiesExternalAgentsEvent, PolymeshCommonUtilitiesGroupInactiveMember, PolymeshCommonUtilitiesGroupRawEventInstance1, PolymeshCommonUtilitiesGroupRawEventInstance2, PolymeshCommonUtilitiesGroupRawEventInstance3, PolymeshCommonUtilitiesGroupRawEventInstance4, PolymeshCommonUtilitiesIdentityCreateChildIdentityWithAuth, PolymeshCommonUtilitiesIdentityRawEvent, PolymeshCommonUtilitiesIdentitySecondaryKeyWithAuth, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesNftEvent, PolymeshCommonUtilitiesPortfolioEvent, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshCommonUtilitiesRelayerRawEvent, PolymeshCommonUtilitiesSettlementRawEvent, PolymeshCommonUtilitiesStatisticsEvent, PolymeshContractsApi, PolymeshContractsApiCodeHash, PolymeshContractsCall, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsChainVersion, PolymeshContractsError, PolymeshContractsNextUpgrade, PolymeshContractsRawEvent, PolymeshExtensionsCheckWeight, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataLockStatus, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAssetNonFungibleType, PolymeshPrimitivesAuthorization, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesBeneficiary, PolymeshPrimitivesCddId, PolymeshPrimitivesComplianceManagerAssetCompliance, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesCondition, PolymeshPrimitivesConditionConditionType, PolymeshPrimitivesConditionTargetIdentity, PolymeshPrimitivesConditionTrustedFor, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesDocumentHash, PolymeshPrimitivesEventOnly, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityClaimClaim, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityClaimScope, PolymeshPrimitivesIdentityDidRecord, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioKind, PolymeshPrimitivesJurisdictionCountryCode, PolymeshPrimitivesMemo, PolymeshPrimitivesMultisigProposalState, PolymeshPrimitivesMultisigProposalVoteCount, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesNftNftCollection, PolymeshPrimitivesNftNftCollectionKeys, PolymeshPrimitivesNftNftMetadataAttribute, PolymeshPrimitivesPortfolioFund, PolymeshPrimitivesPortfolioFundDescription, PolymeshPrimitivesPortfolioPortfolioUpdateReason, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyKeyRecord, PolymeshPrimitivesSecondaryKeyPalletPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationCount, PolymeshPrimitivesSettlementAffirmationStatus, PolymeshPrimitivesSettlementAssetCount, PolymeshPrimitivesSettlementInstruction, PolymeshPrimitivesSettlementInstructionStatus, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementLegStatus, PolymeshPrimitivesSettlementMediatorAffirmationStatus, PolymeshPrimitivesSettlementReceiptDetails, PolymeshPrimitivesSettlementReceiptMetadata, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenue, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStat1stKey, PolymeshPrimitivesStatisticsStat2ndKey, PolymeshPrimitivesStatisticsStatClaim, PolymeshPrimitivesStatisticsStatOpType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesSubsetSubsetRestrictionAssetID, PolymeshPrimitivesSubsetSubsetRestrictionExtrinsicName, PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceAssetTransferCompliance, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeCommonNposSolution16, PolymeshRuntimeDevelopRuntime, PolymeshRuntimeDevelopRuntimeOriginCaller, PolymeshRuntimeDevelopRuntimeSessionKeys, SpArithmeticArithmeticError, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAllowedSlots, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBabeDigestsPrimaryPreDigest, SpConsensusBabeDigestsSecondaryPlainPreDigest, SpConsensusBabeDigestsSecondaryVRFPreDigest, SpConsensusGrandpaAppPublic, SpConsensusGrandpaAppSignature, SpConsensusGrandpaEquivocation, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpCoreEcdsaSignature, SpCoreEd25519Public, SpCoreEd25519Signature, SpCoreOffchainOpaqueNetworkState, SpCoreSr25519Public, SpCoreSr25519Signature, SpCoreVoid, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeBlakeTwo256, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeHeader, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpSessionMembershipProof, SpStakingOffenceOffenceDetails, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightToFeeCoefficient, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; +import type { FinalityGrandpaEquivocationPrecommit, FinalityGrandpaEquivocationPrevote, FinalityGrandpaPrecommit, FinalityGrandpaPrevote, FrameSupportDispatchDispatchClass, FrameSupportDispatchDispatchInfo, FrameSupportDispatchPays, FrameSupportDispatchPerDispatchClassU32, FrameSupportDispatchPerDispatchClassWeight, FrameSupportDispatchPerDispatchClassWeightsPerClass, FrameSupportDispatchRawOrigin, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, PalletAssetAssetDetails, PalletAssetCall, PalletAssetCheckpointCall, PalletAssetCheckpointError, PalletAssetError, PalletAssetTickerRegistration, PalletAssetTickerRegistrationConfig, PalletBabeCall, PalletBabeError, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBaseCall, PalletBaseError, PalletBridgeBridgeTxDetail, PalletBridgeBridgeTxStatus, PalletCommitteeCall, PalletCommitteeError, PalletCommitteeInstance1, PalletCommitteeInstance3, PalletCommitteeInstance4, PalletCommitteePolymeshVotes, PalletCommitteeRawEventInstance1, PalletCommitteeRawEventInstance3, PalletCommitteeRawEventInstance4, PalletCommitteeRawOriginInstance1, PalletCommitteeRawOriginInstance3, PalletCommitteeRawOriginInstance4, PalletComplianceManagerCall, PalletComplianceManagerError, PalletContractsCall, PalletContractsError, PalletContractsEvent, PalletContractsSchedule, PalletContractsScheduleHostFnWeights, PalletContractsScheduleInstructionWeights, PalletContractsScheduleLimits, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmDeterminism, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletCorporateActionsBallotBallotMeta, PalletCorporateActionsBallotBallotTimeRange, PalletCorporateActionsBallotBallotVote, PalletCorporateActionsBallotCall, PalletCorporateActionsBallotError, PalletCorporateActionsBallotEvent, PalletCorporateActionsBallotMotion, PalletCorporateActionsCaCheckpoint, PalletCorporateActionsCaId, PalletCorporateActionsCaKind, PalletCorporateActionsCall, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletCorporateActionsDistributionCall, PalletCorporateActionsDistributionError, PalletCorporateActionsDistributionEvent, PalletCorporateActionsError, PalletCorporateActionsEvent, PalletCorporateActionsInitiateCorporateActionArgs, PalletCorporateActionsRecordDate, PalletCorporateActionsRecordDateSpec, PalletCorporateActionsTargetIdentities, PalletCorporateActionsTargetTreatment, PalletElectionProviderMultiPhaseCall, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhaseError, PalletElectionProviderMultiPhaseEvent, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletExternalAgentsCall, PalletExternalAgentsError, PalletGrandpaCall, PalletGrandpaError, PalletGrandpaEvent, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletGroupCall, PalletGroupError, PalletGroupInstance1, PalletGroupInstance2, PalletGroupInstance3, PalletGroupInstance4, PalletIdentityCall, PalletIdentityClaim1stKey, PalletIdentityClaim2ndKey, PalletIdentityError, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineCall, PalletImOnlineError, PalletImOnlineEvent, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Public, PalletImOnlineSr25519AppSr25519Signature, PalletIndicesCall, PalletIndicesError, PalletIndicesEvent, PalletMultisigCall, PalletMultisigError, PalletMultisigEvent, PalletNftCall, PalletNftError, PalletOffencesEvent, PalletPermissionsError, PalletPermissionsStoreCallMetadata, PalletPipsCall, PalletPipsCommittee, PalletPipsDepositInfo, PalletPipsError, PalletPipsPip, PalletPipsPipsMetadata, PalletPipsProposalData, PalletPipsProposalState, PalletPipsProposer, PalletPipsRawEvent, PalletPipsSnapshotMetadata, PalletPipsSnapshotResult, PalletPipsSnapshottedPip, PalletPipsVote, PalletPipsVotingResult, PalletPortfolioCall, PalletPortfolioError, PalletPreimageCall, PalletPreimageError, PalletPreimageEvent, PalletPreimageRequestStatus, PalletProtocolFeeCall, PalletProtocolFeeError, PalletProtocolFeeRawEvent, PalletRelayerCall, PalletRelayerError, PalletRelayerSubsidy, PalletSchedulerCall, PalletSchedulerError, PalletSchedulerEvent, PalletSchedulerScheduled, PalletSessionCall, PalletSessionError, PalletSessionEvent, PalletSettlementCall, PalletSettlementError, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingIndividualExposure, PalletStakingNominations, PalletStakingPalletCall, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletError, PalletStakingPalletEvent, PalletStakingPermissionedIdentityPrefs, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingSlashingSwitch, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStatisticsCall, PalletStatisticsError, PalletStoCall, PalletStoError, PalletStoFundraiser, PalletStoFundraiserStatus, PalletStoFundraiserTier, PalletStoPriceTier, PalletStoRawEvent, PalletSudoCall, PalletSudoError, PalletSudoRawEvent, PalletTestUtilsCall, PalletTestUtilsError, PalletTestUtilsRawEvent, PalletTimestampCall, PalletTransactionPaymentChargeTransactionPayment, PalletTransactionPaymentRawEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryRawEvent, PalletUtilityCall, PalletUtilityError, PalletUtilityEvent, PalletUtilityUniqueCall, PolymeshCommonUtilitiesAssetRawEvent, PolymeshCommonUtilitiesBalancesAccountData, PolymeshCommonUtilitiesBalancesRawEvent, PolymeshCommonUtilitiesBalancesReasons, PolymeshCommonUtilitiesBaseEvent, PolymeshCommonUtilitiesCheckpointEvent, PolymeshCommonUtilitiesCheckpointNextCheckpoints, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints, PolymeshCommonUtilitiesComplianceManagerEvent, PolymeshCommonUtilitiesExternalAgentsEvent, PolymeshCommonUtilitiesGroupInactiveMember, PolymeshCommonUtilitiesGroupRawEventInstance1, PolymeshCommonUtilitiesGroupRawEventInstance2, PolymeshCommonUtilitiesGroupRawEventInstance3, PolymeshCommonUtilitiesGroupRawEventInstance4, PolymeshCommonUtilitiesIdentityCreateChildIdentityWithAuth, PolymeshCommonUtilitiesIdentityRawEvent, PolymeshCommonUtilitiesIdentitySecondaryKeyWithAuth, PolymeshCommonUtilitiesMaybeBlock, PolymeshCommonUtilitiesNftEvent, PolymeshCommonUtilitiesPortfolioEvent, PolymeshCommonUtilitiesProtocolFeeProtocolOp, PolymeshCommonUtilitiesRelayerRawEvent, PolymeshCommonUtilitiesSettlementRawEvent, PolymeshCommonUtilitiesStatisticsEvent, PolymeshContractsApi, PolymeshContractsApiCodeHash, PolymeshContractsCall, PolymeshContractsChainExtensionExtrinsicId, PolymeshContractsChainVersion, PolymeshContractsError, PolymeshContractsNextUpgrade, PolymeshContractsRawEvent, PolymeshExtensionsCheckWeight, PolymeshPrimitivesAgentAgentGroup, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAssetMetadataAssetMetadataKey, PolymeshPrimitivesAssetMetadataAssetMetadataLockStatus, PolymeshPrimitivesAssetMetadataAssetMetadataSpec, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail, PolymeshPrimitivesAssetNonFungibleType, PolymeshPrimitivesAuthorization, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesBeneficiary, PolymeshPrimitivesCddId, PolymeshPrimitivesComplianceManagerAssetCompliance, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesCondition, PolymeshPrimitivesConditionConditionType, PolymeshPrimitivesConditionTargetIdentity, PolymeshPrimitivesConditionTrustedFor, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesDocumentHash, PolymeshPrimitivesEventOnly, PolymeshPrimitivesIdentityClaim, PolymeshPrimitivesIdentityClaimClaim, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityClaimScope, PolymeshPrimitivesIdentityDidRecord, PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioKind, PolymeshPrimitivesJurisdictionCountryCode, PolymeshPrimitivesMemo, PolymeshPrimitivesMultisigProposalState, PolymeshPrimitivesMultisigProposalVoteCount, PolymeshPrimitivesNftNfTs, PolymeshPrimitivesNftNftCollection, PolymeshPrimitivesNftNftCollectionKeys, PolymeshPrimitivesNftNftMetadataAttribute, PolymeshPrimitivesPortfolioFund, PolymeshPrimitivesPortfolioFundDescription, PolymeshPrimitivesPortfolioPortfolioUpdateReason, PolymeshPrimitivesPosRatio, PolymeshPrimitivesSecondaryKey, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions, PolymeshPrimitivesSecondaryKeyKeyRecord, PolymeshPrimitivesSecondaryKeyPalletPermissions, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesSecondaryKeySignatory, PolymeshPrimitivesSettlementAffirmationCount, PolymeshPrimitivesSettlementAffirmationStatus, PolymeshPrimitivesSettlementAssetCount, PolymeshPrimitivesSettlementInstruction, PolymeshPrimitivesSettlementInstructionStatus, PolymeshPrimitivesSettlementLeg, PolymeshPrimitivesSettlementLegStatus, PolymeshPrimitivesSettlementMediatorAffirmationStatus, PolymeshPrimitivesSettlementReceiptDetails, PolymeshPrimitivesSettlementReceiptMetadata, PolymeshPrimitivesSettlementSettlementType, PolymeshPrimitivesSettlementVenue, PolymeshPrimitivesSettlementVenueType, PolymeshPrimitivesStatisticsStat1stKey, PolymeshPrimitivesStatisticsStat2ndKey, PolymeshPrimitivesStatisticsStatClaim, PolymeshPrimitivesStatisticsStatOpType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesSubsetSubsetRestrictionAssetId, PolymeshPrimitivesSubsetSubsetRestrictionExtrinsicName, PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceAssetTransferCompliance, PolymeshPrimitivesTransferComplianceTransferCondition, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, PolymeshRuntimeCommonNposSolution16, PolymeshRuntimeDevelopRuntime, PolymeshRuntimeDevelopRuntimeOriginCaller, PolymeshRuntimeDevelopRuntimeSessionKeys, SpArithmeticArithmeticError, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAllowedSlots, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBabeDigestsPrimaryPreDigest, SpConsensusBabeDigestsSecondaryPlainPreDigest, SpConsensusBabeDigestsSecondaryVRFPreDigest, SpConsensusGrandpaAppPublic, SpConsensusGrandpaAppSignature, SpConsensusGrandpaEquivocation, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpCoreEcdsaSignature, SpCoreEd25519Public, SpCoreEd25519Signature, SpCoreOffchainOpaqueNetworkState, SpCoreSr25519Public, SpCoreSr25519Signature, SpCoreVoid, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeBlakeTwo256, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeHeader, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpSessionMembershipProof, SpStakingOffenceOffenceDetails, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightToFeeCoefficient, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; declare module '@polkadot/types/types/registry' { interface InterfaceTypes { @@ -266,7 +266,7 @@ declare module '@polkadot/types/types/registry' { PolymeshContractsRawEvent: PolymeshContractsRawEvent; PolymeshExtensionsCheckWeight: PolymeshExtensionsCheckWeight; PolymeshPrimitivesAgentAgentGroup: PolymeshPrimitivesAgentAgentGroup; - PolymeshPrimitivesAssetAssetID: PolymeshPrimitivesAssetAssetID; + PolymeshPrimitivesAssetAssetId: PolymeshPrimitivesAssetAssetId; PolymeshPrimitivesAssetAssetType: PolymeshPrimitivesAssetAssetType; PolymeshPrimitivesAssetIdentifier: PolymeshPrimitivesAssetIdentifier; PolymeshPrimitivesAssetMetadataAssetMetadataKey: PolymeshPrimitivesAssetMetadataAssetMetadataKey; @@ -333,7 +333,7 @@ declare module '@polkadot/types/types/registry' { PolymeshPrimitivesStatisticsStatOpType: PolymeshPrimitivesStatisticsStatOpType; PolymeshPrimitivesStatisticsStatType: PolymeshPrimitivesStatisticsStatType; PolymeshPrimitivesStatisticsStatUpdate: PolymeshPrimitivesStatisticsStatUpdate; - PolymeshPrimitivesSubsetSubsetRestrictionAssetID: PolymeshPrimitivesSubsetSubsetRestrictionAssetID; + PolymeshPrimitivesSubsetSubsetRestrictionAssetId: PolymeshPrimitivesSubsetSubsetRestrictionAssetId; PolymeshPrimitivesSubsetSubsetRestrictionExtrinsicName: PolymeshPrimitivesSubsetSubsetRestrictionExtrinsicName; PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId: PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId; PolymeshPrimitivesTicker: PolymeshPrimitivesTicker; diff --git a/scripts/cli/src/interfaces/types-lookup.ts b/scripts/cli/src/interfaces/types-lookup.ts index 242604c4b6..761463c8cf 100644 --- a/scripts/cli/src/interfaces/types-lookup.ts +++ b/scripts/cli/src/interfaces/types-lookup.ts @@ -290,23 +290,23 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshPrimitivesSecondaryKeyPermissions (40) */ interface PolymeshPrimitivesSecondaryKeyPermissions extends Struct { - readonly asset: PolymeshPrimitivesSubsetSubsetRestrictionAssetID; + readonly asset: PolymeshPrimitivesSubsetSubsetRestrictionAssetId; readonly extrinsic: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions; readonly portfolio: PolymeshPrimitivesSubsetSubsetRestrictionPortfolioId; } - /** @name PolymeshPrimitivesSubsetSubsetRestrictionAssetID (41) */ - interface PolymeshPrimitivesSubsetSubsetRestrictionAssetID extends Enum { + /** @name PolymeshPrimitivesSubsetSubsetRestrictionAssetId (41) */ + interface PolymeshPrimitivesSubsetSubsetRestrictionAssetId extends Enum { readonly isWhole: boolean; readonly isThese: boolean; - readonly asThese: BTreeSet; + readonly asThese: BTreeSet; readonly isExcept: boolean; - readonly asExcept: BTreeSet; + readonly asExcept: BTreeSet; readonly type: 'Whole' | 'These' | 'Except'; } - /** @name PolymeshPrimitivesAssetAssetID (42) */ - interface PolymeshPrimitivesAssetAssetID extends U8aFixed {} + /** @name PolymeshPrimitivesAssetAssetId (42) */ + interface PolymeshPrimitivesAssetAssetId extends U8aFixed {} /** @name PolymeshPrimitivesSecondaryKeyExtrinsicPermissions (46) */ interface PolymeshPrimitivesSecondaryKeyExtrinsicPermissions extends Enum { @@ -396,7 +396,7 @@ declare module '@polkadot/types/lookup' { readonly isIdentity: boolean; readonly asIdentity: PolymeshPrimitivesIdentityId; readonly isAsset: boolean; - readonly asAsset: PolymeshPrimitivesAssetAssetID; + readonly asAsset: PolymeshPrimitivesAssetAssetId; readonly isCustom: boolean; readonly asCustom: Bytes; readonly type: 'Identity' | 'Asset' | 'Custom'; @@ -673,13 +673,13 @@ declare module '@polkadot/types/lookup' { readonly isAddMultiSigSigner: boolean; readonly asAddMultiSigSigner: AccountId32; readonly isTransferAssetOwnership: boolean; - readonly asTransferAssetOwnership: PolymeshPrimitivesAssetAssetID; + readonly asTransferAssetOwnership: PolymeshPrimitivesAssetAssetId; readonly isJoinIdentity: boolean; readonly asJoinIdentity: PolymeshPrimitivesSecondaryKeyPermissions; readonly isPortfolioCustody: boolean; readonly asPortfolioCustody: PolymeshPrimitivesIdentityIdPortfolioId; readonly isBecomeAgent: boolean; - readonly asBecomeAgent: ITuple<[PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAgentAgentGroup]>; + readonly asBecomeAgent: ITuple<[PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAgentAgentGroup]>; readonly isAddRelayerPayingKey: boolean; readonly asAddRelayerPayingKey: ITuple<[AccountId32, AccountId32, u128]>; readonly isRotatePrimaryKeyToSecondary: boolean; @@ -1186,65 +1186,65 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesAssetRawEvent (122) */ interface PolymeshCommonUtilitiesAssetRawEvent extends Enum { readonly isAssetCreated: boolean; - readonly asAssetCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, bool, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesIdentityId, Bytes, Vec, Option]>; + readonly asAssetCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, bool, PolymeshPrimitivesAssetAssetType, PolymeshPrimitivesIdentityId, Bytes, Vec, Option]>; readonly isIdentifiersUpdated: boolean; - readonly asIdentifiersUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asIdentifiersUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isDivisibilityChanged: boolean; - readonly asDivisibilityChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, bool]>; + readonly asDivisibilityChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, bool]>; readonly isTickerRegistered: boolean; readonly asTickerRegistered: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesTicker, Option]>; readonly isTickerTransferred: boolean; readonly asTickerTransferred: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesTicker, PolymeshPrimitivesIdentityId]>; readonly isAssetOwnershipTransferred: boolean; - readonly asAssetOwnershipTransferred: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]>; + readonly asAssetOwnershipTransferred: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]>; readonly isAssetFrozen: boolean; - readonly asAssetFrozen: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asAssetFrozen: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isAssetUnfrozen: boolean; - readonly asAssetUnfrozen: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asAssetUnfrozen: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isAssetRenamed: boolean; - readonly asAssetRenamed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Bytes]>; + readonly asAssetRenamed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Bytes]>; readonly isFundingRoundSet: boolean; - readonly asFundingRoundSet: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Bytes]>; + readonly asFundingRoundSet: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Bytes]>; readonly isDocumentAdded: boolean; - readonly asDocumentAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u32, PolymeshPrimitivesDocument]>; + readonly asDocumentAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u32, PolymeshPrimitivesDocument]>; readonly isDocumentRemoved: boolean; - readonly asDocumentRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u32]>; + readonly asDocumentRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u32]>; readonly isControllerTransfer: boolean; - readonly asControllerTransfer: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityIdPortfolioId, u128]>; + readonly asControllerTransfer: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityIdPortfolioId, u128]>; readonly isCustomAssetTypeExists: boolean; readonly asCustomAssetTypeExists: ITuple<[PolymeshPrimitivesIdentityId, u32, Bytes]>; readonly isCustomAssetTypeRegistered: boolean; readonly asCustomAssetTypeRegistered: ITuple<[PolymeshPrimitivesIdentityId, u32, Bytes]>; readonly isSetAssetMetadataValue: boolean; - readonly asSetAssetMetadataValue: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Bytes, Option]>; + readonly asSetAssetMetadataValue: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Bytes, Option]>; readonly isSetAssetMetadataValueDetails: boolean; - readonly asSetAssetMetadataValueDetails: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail]>; + readonly asSetAssetMetadataValueDetails: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail]>; readonly isRegisterAssetMetadataLocalType: boolean; - readonly asRegisterAssetMetadataLocalType: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Bytes, u64, PolymeshPrimitivesAssetMetadataAssetMetadataSpec]>; + readonly asRegisterAssetMetadataLocalType: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Bytes, u64, PolymeshPrimitivesAssetMetadataAssetMetadataSpec]>; readonly isRegisterAssetMetadataGlobalType: boolean; readonly asRegisterAssetMetadataGlobalType: ITuple<[Bytes, u64, PolymeshPrimitivesAssetMetadataAssetMetadataSpec]>; readonly isAssetTypeChanged: boolean; - readonly asAssetTypeChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetType]>; + readonly asAssetTypeChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetType]>; readonly isLocalMetadataKeyDeleted: boolean; - readonly asLocalMetadataKeyDeleted: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u64]>; + readonly asLocalMetadataKeyDeleted: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u64]>; readonly isMetadataValueDeleted: boolean; - readonly asMetadataValueDeleted: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetMetadataAssetMetadataKey]>; + readonly asMetadataValueDeleted: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetMetadataAssetMetadataKey]>; readonly isAssetBalanceUpdated: boolean; - readonly asAssetBalanceUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u128, Option, Option, PolymeshPrimitivesPortfolioPortfolioUpdateReason]>; + readonly asAssetBalanceUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u128, Option, Option, PolymeshPrimitivesPortfolioPortfolioUpdateReason]>; readonly isAssetAffirmationExemption: boolean; - readonly asAssetAffirmationExemption: PolymeshPrimitivesAssetAssetID; + readonly asAssetAffirmationExemption: PolymeshPrimitivesAssetAssetId; readonly isRemoveAssetAffirmationExemption: boolean; - readonly asRemoveAssetAffirmationExemption: PolymeshPrimitivesAssetAssetID; + readonly asRemoveAssetAffirmationExemption: PolymeshPrimitivesAssetAssetId; readonly isPreApprovedAsset: boolean; - readonly asPreApprovedAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asPreApprovedAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isRemovePreApprovedAsset: boolean; - readonly asRemovePreApprovedAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asRemovePreApprovedAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isAssetMediatorsAdded: boolean; - readonly asAssetMediatorsAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, BTreeSet]>; + readonly asAssetMediatorsAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, BTreeSet]>; readonly isAssetMediatorsRemoved: boolean; - readonly asAssetMediatorsRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, BTreeSet]>; + readonly asAssetMediatorsRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, BTreeSet]>; readonly isTickerLinkedToAsset: boolean; - readonly asTickerLinkedToAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesTicker, PolymeshPrimitivesAssetAssetID]>; + readonly asTickerLinkedToAsset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesTicker, PolymeshPrimitivesAssetAssetId]>; readonly type: 'AssetCreated' | 'IdentifiersUpdated' | 'DivisibilityChanged' | 'TickerRegistered' | 'TickerTransferred' | 'AssetOwnershipTransferred' | 'AssetFrozen' | 'AssetUnfrozen' | 'AssetRenamed' | 'FundingRoundSet' | 'DocumentAdded' | 'DocumentRemoved' | 'ControllerTransfer' | 'CustomAssetTypeExists' | 'CustomAssetTypeRegistered' | 'SetAssetMetadataValue' | 'SetAssetMetadataValueDetails' | 'RegisterAssetMetadataLocalType' | 'RegisterAssetMetadataGlobalType' | 'AssetTypeChanged' | 'LocalMetadataKeyDeleted' | 'MetadataValueDeleted' | 'AssetBalanceUpdated' | 'AssetAffirmationExemption' | 'RemoveAssetAffirmationExemption' | 'PreApprovedAsset' | 'RemovePreApprovedAsset' | 'AssetMediatorsAdded' | 'AssetMediatorsRemoved' | 'TickerLinkedToAsset'; } @@ -1388,14 +1388,14 @@ declare module '@polkadot/types/lookup' { /** @name PalletCorporateActionsCaId (166) */ interface PalletCorporateActionsCaId extends Struct { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly localId: u32; } /** @name PalletCorporateActionsDistribution (168) */ interface PalletCorporateActionsDistribution extends Struct { readonly from: PolymeshPrimitivesIdentityIdPortfolioId; - readonly currency: PolymeshPrimitivesAssetAssetID; + readonly currency: PolymeshPrimitivesAssetAssetId; readonly perShare: u128; readonly amount: u128; readonly remaining: u128; @@ -1407,13 +1407,13 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesCheckpointEvent (170) */ interface PolymeshCommonUtilitiesCheckpointEvent extends Enum { readonly isCheckpointCreated: boolean; - readonly asCheckpointCreated: ITuple<[Option, PolymeshPrimitivesAssetAssetID, u64, u128, u64]>; + readonly asCheckpointCreated: ITuple<[Option, PolymeshPrimitivesAssetAssetId, u64, u128, u64]>; readonly isMaximumSchedulesComplexityChanged: boolean; readonly asMaximumSchedulesComplexityChanged: ITuple<[PolymeshPrimitivesIdentityId, u64]>; readonly isScheduleCreated: boolean; - readonly asScheduleCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u64, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; + readonly asScheduleCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u64, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; readonly isScheduleRemoved: boolean; - readonly asScheduleRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u64, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; + readonly asScheduleRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u64, PolymeshCommonUtilitiesCheckpointScheduleCheckpoints]>; readonly type: 'CheckpointCreated' | 'MaximumSchedulesComplexityChanged' | 'ScheduleCreated' | 'ScheduleRemoved'; } @@ -1425,23 +1425,23 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesComplianceManagerEvent (176) */ interface PolymeshCommonUtilitiesComplianceManagerEvent extends Enum { readonly isComplianceRequirementCreated: boolean; - readonly asComplianceRequirementCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; + readonly asComplianceRequirementCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; readonly isComplianceRequirementRemoved: boolean; - readonly asComplianceRequirementRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u32]>; + readonly asComplianceRequirementRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u32]>; readonly isAssetComplianceReplaced: boolean; - readonly asAssetComplianceReplaced: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asAssetComplianceReplaced: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isAssetComplianceReset: boolean; - readonly asAssetComplianceReset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asAssetComplianceReset: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isAssetComplianceResumed: boolean; - readonly asAssetComplianceResumed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asAssetComplianceResumed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isAssetCompliancePaused: boolean; - readonly asAssetCompliancePaused: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID]>; + readonly asAssetCompliancePaused: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId]>; readonly isComplianceRequirementChanged: boolean; - readonly asComplianceRequirementChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; + readonly asComplianceRequirementChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesComplianceManagerComplianceRequirement]>; readonly isTrustedDefaultClaimIssuerAdded: boolean; - readonly asTrustedDefaultClaimIssuerAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesConditionTrustedIssuer]>; + readonly asTrustedDefaultClaimIssuerAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesConditionTrustedIssuer]>; readonly isTrustedDefaultClaimIssuerRemoved: boolean; - readonly asTrustedDefaultClaimIssuerRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]>; + readonly asTrustedDefaultClaimIssuerRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]>; readonly type: 'ComplianceRequirementCreated' | 'ComplianceRequirementRemoved' | 'AssetComplianceReplaced' | 'AssetComplianceReset' | 'AssetComplianceResumed' | 'AssetCompliancePaused' | 'ComplianceRequirementChanged' | 'TrustedDefaultClaimIssuerAdded' | 'TrustedDefaultClaimIssuerRemoved'; } @@ -1516,11 +1516,11 @@ declare module '@polkadot/types/lookup' { readonly isMaxDetailsLengthChanged: boolean; readonly asMaxDetailsLengthChanged: ITuple<[PolymeshPrimitivesIdentityId, u32]>; readonly isDefaultTargetIdentitiesChanged: boolean; - readonly asDefaultTargetIdentitiesChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PalletCorporateActionsTargetIdentities]>; + readonly asDefaultTargetIdentitiesChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PalletCorporateActionsTargetIdentities]>; readonly isDefaultWithholdingTaxChanged: boolean; - readonly asDefaultWithholdingTaxChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Permill]>; + readonly asDefaultWithholdingTaxChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Permill]>; readonly isDidWithholdingTaxChanged: boolean; - readonly asDidWithholdingTaxChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId, Option]>; + readonly asDidWithholdingTaxChanged: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId, Option]>; readonly isCaInitiated: boolean; readonly asCaInitiated: ITuple<[PolymeshPrimitivesEventOnly, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, Bytes]>; readonly isCaLinkedToDoc: boolean; @@ -1724,9 +1724,9 @@ declare module '@polkadot/types/lookup' { readonly isFundsMovedBetweenPortfolios: boolean; readonly asFundsMovedBetweenPortfolios: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesPortfolioFundDescription, Option]>; readonly isPreApprovedPortfolio: boolean; - readonly asPreApprovedPortfolio: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID]>; + readonly asPreApprovedPortfolio: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId]>; readonly isRevokePreApprovedPortfolio: boolean; - readonly asRevokePreApprovedPortfolio: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetID]>; + readonly asRevokePreApprovedPortfolio: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesIdentityIdPortfolioId, PolymeshPrimitivesAssetAssetId]>; readonly type: 'PortfolioCreated' | 'PortfolioDeleted' | 'PortfolioRenamed' | 'UserPortfolios' | 'PortfolioCustodianChanged' | 'FundsMovedBetweenPortfolios' | 'PreApprovedPortfolio' | 'RevokePreApprovedPortfolio'; } @@ -1734,7 +1734,7 @@ declare module '@polkadot/types/lookup' { interface PolymeshPrimitivesPortfolioFundDescription extends Enum { readonly isFungible: boolean; readonly asFungible: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly amount: u128; } & Struct; readonly isNonFungible: boolean; @@ -1744,7 +1744,7 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshPrimitivesNftNfTs (237) */ interface PolymeshPrimitivesNftNfTs extends Struct { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly ids: Vec; } @@ -1815,11 +1815,11 @@ declare module '@polkadot/types/lookup' { readonly isReceiptClaimed: boolean; readonly asReceiptClaimed: ITuple<[PolymeshPrimitivesIdentityId, u64, u64, u64, AccountId32, Option]>; readonly isVenueFiltering: boolean; - readonly asVenueFiltering: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, bool]>; + readonly asVenueFiltering: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, bool]>; readonly isVenuesAllowed: boolean; - readonly asVenuesAllowed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asVenuesAllowed: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isVenuesBlocked: boolean; - readonly asVenuesBlocked: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asVenuesBlocked: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isLegFailedExecution: boolean; readonly asLegFailedExecution: ITuple<[PolymeshPrimitivesIdentityId, u64, u64]>; readonly isInstructionFailed: boolean; @@ -1827,7 +1827,7 @@ declare module '@polkadot/types/lookup' { readonly isInstructionExecuted: boolean; readonly asInstructionExecuted: ITuple<[PolymeshPrimitivesIdentityId, u64]>; readonly isVenueUnauthorized: boolean; - readonly asVenueUnauthorized: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u64]>; + readonly asVenueUnauthorized: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u64]>; readonly isSchedulingFailed: boolean; readonly asSchedulingFailed: ITuple<[u64, SpRuntimeDispatchError]>; readonly isInstructionRescheduled: boolean; @@ -1879,7 +1879,7 @@ declare module '@polkadot/types/lookup' { readonly asFungible: { readonly sender: PolymeshPrimitivesIdentityIdPortfolioId; readonly receiver: PolymeshPrimitivesIdentityIdPortfolioId; - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly amount: u128; } & Struct; readonly isNonFungible: boolean; @@ -1901,13 +1901,13 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesStatisticsEvent (257) */ interface PolymeshCommonUtilitiesStatisticsEvent extends Enum { readonly isStatTypesAdded: boolean; - readonly asStatTypesAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asStatTypesAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isStatTypesRemoved: boolean; - readonly asStatTypesRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asStatTypesRemoved: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isAssetStatsUpdated: boolean; - readonly asAssetStatsUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesStatisticsStatType, Vec]>; + readonly asAssetStatsUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesStatisticsStatType, Vec]>; readonly isSetAssetTransferCompliance: boolean; - readonly asSetAssetTransferCompliance: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, Vec]>; + readonly asSetAssetTransferCompliance: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, Vec]>; readonly isTransferConditionExemptionsAdded: boolean; readonly asTransferConditionExemptionsAdded: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesTransferComplianceTransferConditionExemptKey, Vec]>; readonly isTransferConditionExemptionsRemoved: boolean; @@ -1968,7 +1968,7 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshPrimitivesTransferComplianceTransferConditionExemptKey (271) */ interface PolymeshPrimitivesTransferComplianceTransferConditionExemptKey extends Struct { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly op: PolymeshPrimitivesStatisticsStatOpType; readonly claimType: Option; } @@ -1978,7 +1978,7 @@ declare module '@polkadot/types/lookup' { readonly isFundraiserCreated: boolean; readonly asFundraiserCreated: ITuple<[PolymeshPrimitivesIdentityId, u64, Bytes, PalletStoFundraiser]>; readonly isInvested: boolean; - readonly asInvested: ITuple<[PolymeshPrimitivesIdentityId, u64, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAssetAssetID, u128, u128]>; + readonly asInvested: ITuple<[PolymeshPrimitivesIdentityId, u64, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAssetAssetId, u128, u128]>; readonly isFundraiserFrozen: boolean; readonly asFundraiserFrozen: ITuple<[PolymeshPrimitivesIdentityId, u64]>; readonly isFundraiserUnfrozen: boolean; @@ -1994,9 +1994,9 @@ declare module '@polkadot/types/lookup' { interface PalletStoFundraiser extends Struct { readonly creator: PolymeshPrimitivesIdentityId; readonly offeringPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly raisingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; - readonly raisingAsset: PolymeshPrimitivesAssetAssetID; + readonly raisingAsset: PolymeshPrimitivesAssetAssetId; readonly tiers: Vec; readonly venueId: u64; readonly start: u64; @@ -2075,15 +2075,15 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesExternalAgentsEvent (287) */ interface PolymeshCommonUtilitiesExternalAgentsEvent extends Enum { readonly isGroupCreated: boolean; - readonly asGroupCreated: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetID, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; + readonly asGroupCreated: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetId, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; readonly isGroupPermissionsUpdated: boolean; - readonly asGroupPermissionsUpdated: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetID, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; + readonly asGroupPermissionsUpdated: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetId, u32, PolymeshPrimitivesSecondaryKeyExtrinsicPermissions]>; readonly isAgentAdded: boolean; - readonly asAgentAdded: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesAgentAgentGroup]>; + readonly asAgentAdded: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesAgentAgentGroup]>; readonly isAgentRemoved: boolean; - readonly asAgentRemoved: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId]>; + readonly asAgentRemoved: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId]>; readonly isGroupChanged: boolean; - readonly asGroupChanged: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetID, PolymeshPrimitivesIdentityId, PolymeshPrimitivesAgentAgentGroup]>; + readonly asGroupChanged: ITuple<[PolymeshPrimitivesEventOnly, PolymeshPrimitivesAssetAssetId, PolymeshPrimitivesIdentityId, PolymeshPrimitivesAgentAgentGroup]>; readonly type: 'GroupCreated' | 'GroupPermissionsUpdated' | 'AgentAdded' | 'AgentRemoved' | 'GroupChanged'; } @@ -2188,7 +2188,7 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshCommonUtilitiesNftEvent (295) */ interface PolymeshCommonUtilitiesNftEvent extends Enum { readonly isNftCollectionCreated: boolean; - readonly asNftCollectionCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetID, u64]>; + readonly asNftCollectionCreated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesAssetAssetId, u64]>; readonly isNftPortfolioUpdated: boolean; readonly asNftPortfolioUpdated: ITuple<[PolymeshPrimitivesIdentityId, PolymeshPrimitivesNftNfTs, Option, Option, PolymeshPrimitivesPortfolioPortfolioUpdateReason]>; readonly type: 'NftCollectionCreated' | 'NftPortfolioUpdated'; @@ -3346,56 +3346,56 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isFreeze: boolean; readonly asFreeze: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isUnfreeze: boolean; readonly asUnfreeze: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isRenameAsset: boolean; readonly asRenameAsset: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly assetName: Bytes; } & Struct; readonly isIssue: boolean; readonly asIssue: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly amount: u128; readonly portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind; } & Struct; readonly isRedeem: boolean; readonly asRedeem: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly value: u128; readonly portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind; } & Struct; readonly isMakeDivisible: boolean; readonly asMakeDivisible: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isAddDocuments: boolean; readonly asAddDocuments: { readonly docs: Vec; - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isRemoveDocuments: boolean; readonly asRemoveDocuments: { readonly docsId: Vec; - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isSetFundingRound: boolean; readonly asSetFundingRound: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly foundingRoundName: Bytes; } & Struct; readonly isUpdateIdentifiers: boolean; readonly asUpdateIdentifiers: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly assetIdentifiers: Vec; } & Struct; readonly isControllerTransfer: boolean; readonly asControllerTransfer: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly value: u128; readonly fromPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; } & Struct; @@ -3413,20 +3413,20 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isSetAssetMetadata: boolean; readonly asSetAssetMetadata: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly key: PolymeshPrimitivesAssetMetadataAssetMetadataKey; readonly value: Bytes; readonly detail: Option; } & Struct; readonly isSetAssetMetadataDetails: boolean; readonly asSetAssetMetadataDetails: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly key: PolymeshPrimitivesAssetMetadataAssetMetadataKey; readonly detail: PolymeshPrimitivesAssetMetadataAssetMetadataValueDetail; } & Struct; readonly isRegisterAndSetLocalAssetMetadata: boolean; readonly asRegisterAndSetLocalAssetMetadata: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly name: Bytes; readonly spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec; readonly value: Bytes; @@ -3434,7 +3434,7 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isRegisterAssetMetadataLocalType: boolean; readonly asRegisterAssetMetadataLocalType: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly name: Bytes; readonly spec: PolymeshPrimitivesAssetMetadataAssetMetadataSpec; } & Struct; @@ -3445,49 +3445,49 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isUpdateAssetType: boolean; readonly asUpdateAssetType: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly assetType: PolymeshPrimitivesAssetAssetType; } & Struct; readonly isRemoveLocalMetadataKey: boolean; readonly asRemoveLocalMetadataKey: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly localKey: u64; } & Struct; readonly isRemoveMetadataValue: boolean; readonly asRemoveMetadataValue: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly metadataKey: PolymeshPrimitivesAssetMetadataAssetMetadataKey; } & Struct; readonly isExemptAssetAffirmation: boolean; readonly asExemptAssetAffirmation: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isRemoveAssetAffirmationExemption: boolean; readonly asRemoveAssetAffirmationExemption: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isPreApproveAsset: boolean; readonly asPreApproveAsset: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isRemoveAssetPreApproval: boolean; readonly asRemoveAssetPreApproval: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isAddMandatoryMediators: boolean; readonly asAddMandatoryMediators: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly mediators: BTreeSet; } & Struct; readonly isRemoveMandatoryMediators: boolean; readonly asRemoveMandatoryMediators: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly mediators: BTreeSet; } & Struct; readonly isLinkTickerToAssetId: boolean; readonly asLinkTickerToAssetId: { readonly ticker: PolymeshPrimitivesTicker; - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly type: 'RegisterUniqueTicker' | 'AcceptTickerTransfer' | 'AcceptAssetOwnershipTransfer' | 'CreateAsset' | 'Freeze' | 'Unfreeze' | 'RenameAsset' | 'Issue' | 'Redeem' | 'MakeDivisible' | 'AddDocuments' | 'RemoveDocuments' | 'SetFundingRound' | 'UpdateIdentifiers' | 'ControllerTransfer' | 'RegisterCustomAssetType' | 'CreateAssetWithCustomType' | 'SetAssetMetadata' | 'SetAssetMetadataDetails' | 'RegisterAndSetLocalAssetMetadata' | 'RegisterAssetMetadataLocalType' | 'RegisterAssetMetadataGlobalType' | 'UpdateAssetType' | 'RemoveLocalMetadataKey' | 'RemoveMetadataValue' | 'ExemptAssetAffirmation' | 'RemoveAssetAffirmationExemption' | 'PreApproveAsset' | 'RemoveAssetPreApproval' | 'AddMandatoryMediators' | 'RemoveMandatoryMediators' | 'LinkTickerToAssetId'; } @@ -3498,7 +3498,7 @@ declare module '@polkadot/types/lookup' { readonly asDistribute: { readonly caId: PalletCorporateActionsCaId; readonly portfolio: Option; - readonly currency: PolymeshPrimitivesAssetAssetID; + readonly currency: PolymeshPrimitivesAssetAssetId; readonly perShare: u128; readonly amount: u128; readonly paymentAt: u64; @@ -3528,7 +3528,7 @@ declare module '@polkadot/types/lookup' { interface PalletAssetCheckpointCall extends Enum { readonly isCreateCheckpoint: boolean; readonly asCreateCheckpoint: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isSetSchedulesMaxComplexity: boolean; readonly asSetSchedulesMaxComplexity: { @@ -3536,12 +3536,12 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isCreateSchedule: boolean; readonly asCreateSchedule: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly schedule: PolymeshCommonUtilitiesCheckpointScheduleCheckpoints; } & Struct; readonly isRemoveSchedule: boolean; readonly asRemoveSchedule: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly id: u64; } & Struct; readonly type: 'CreateCheckpoint' | 'SetSchedulesMaxComplexity' | 'CreateSchedule' | 'RemoveSchedule'; @@ -3551,45 +3551,45 @@ declare module '@polkadot/types/lookup' { interface PalletComplianceManagerCall extends Enum { readonly isAddComplianceRequirement: boolean; readonly asAddComplianceRequirement: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly senderConditions: Vec; readonly receiverConditions: Vec; } & Struct; readonly isRemoveComplianceRequirement: boolean; readonly asRemoveComplianceRequirement: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly id: u32; } & Struct; readonly isReplaceAssetCompliance: boolean; readonly asReplaceAssetCompliance: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly assetCompliance: Vec; } & Struct; readonly isResetAssetCompliance: boolean; readonly asResetAssetCompliance: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isPauseAssetCompliance: boolean; readonly asPauseAssetCompliance: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isResumeAssetCompliance: boolean; readonly asResumeAssetCompliance: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isAddDefaultTrustedClaimIssuer: boolean; readonly asAddDefaultTrustedClaimIssuer: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly issuer: PolymeshPrimitivesConditionTrustedIssuer; } & Struct; readonly isRemoveDefaultTrustedClaimIssuer: boolean; readonly asRemoveDefaultTrustedClaimIssuer: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly issuer: PolymeshPrimitivesIdentityId; } & Struct; readonly isChangeComplianceRequirement: boolean; readonly asChangeComplianceRequirement: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly newReq: PolymeshPrimitivesComplianceManagerComplianceRequirement; } & Struct; readonly type: 'AddComplianceRequirement' | 'RemoveComplianceRequirement' | 'ReplaceAssetCompliance' | 'ResetAssetCompliance' | 'PauseAssetCompliance' | 'ResumeAssetCompliance' | 'AddDefaultTrustedClaimIssuer' | 'RemoveDefaultTrustedClaimIssuer' | 'ChangeComplianceRequirement'; @@ -3603,23 +3603,23 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isSetDefaultTargets: boolean; readonly asSetDefaultTargets: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly targets: PalletCorporateActionsTargetIdentities; } & Struct; readonly isSetDefaultWithholdingTax: boolean; readonly asSetDefaultWithholdingTax: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly tax: Permill; } & Struct; readonly isSetDidWithholdingTax: boolean; readonly asSetDidWithholdingTax: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly taxedDid: PolymeshPrimitivesIdentityId; readonly tax: Option; } & Struct; readonly isInitiateCorporateAction: boolean; readonly asInitiateCorporateAction: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly kind: PalletCorporateActionsCaKind; readonly declDate: u64; readonly recordDate: Option; @@ -3646,7 +3646,7 @@ declare module '@polkadot/types/lookup' { readonly asInitiateCorporateActionAndDistribute: { readonly caArgs: PalletCorporateActionsInitiateCorporateActionArgs; readonly portfolio: Option; - readonly currency: PolymeshPrimitivesAssetAssetID; + readonly currency: PolymeshPrimitivesAssetAssetId; readonly perShare: u128; readonly amount: u128; readonly paymentAt: u64; @@ -3668,7 +3668,7 @@ declare module '@polkadot/types/lookup' { /** @name PalletCorporateActionsInitiateCorporateActionArgs (440) */ interface PalletCorporateActionsInitiateCorporateActionArgs extends Struct { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly kind: PalletCorporateActionsCaKind; readonly declDate: u64; readonly recordDate: Option; @@ -3827,12 +3827,12 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isPreApprovePortfolio: boolean; readonly asPreApprovePortfolio: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly portfolioId: PolymeshPrimitivesIdentityIdPortfolioId; } & Struct; readonly isRemovePortfolioPreApproval: boolean; readonly asRemovePortfolioPreApproval: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly portfolioId: PolymeshPrimitivesIdentityIdPortfolioId; } & Struct; readonly isAllowIdentityToCreatePortfolios: boolean; @@ -3962,17 +3962,17 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isSetVenueFiltering: boolean; readonly asSetVenueFiltering: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly enabled: bool; } & Struct; readonly isAllowVenues: boolean; readonly asAllowVenues: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly venues: Vec; } & Struct; readonly isDisallowVenues: boolean; readonly asDisallowVenues: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly venues: Vec; } & Struct; readonly isUpdateVenueSigners: boolean; @@ -4134,18 +4134,18 @@ declare module '@polkadot/types/lookup' { interface PalletStatisticsCall extends Enum { readonly isSetActiveAssetStats: boolean; readonly asSetActiveAssetStats: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly statTypes: BTreeSet; } & Struct; readonly isBatchUpdateAssetStats: boolean; readonly asBatchUpdateAssetStats: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly statType: PolymeshPrimitivesStatisticsStatType; readonly values: BTreeSet; } & Struct; readonly isSetAssetTransferCompliance: boolean; readonly asSetAssetTransferCompliance: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly transferConditions: BTreeSet; } & Struct; readonly isSetEntitiesExempt: boolean; @@ -4162,9 +4162,9 @@ declare module '@polkadot/types/lookup' { readonly isCreateFundraiser: boolean; readonly asCreateFundraiser: { readonly offeringPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly raisingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; - readonly raisingAsset: PolymeshPrimitivesAssetAssetID; + readonly raisingAsset: PolymeshPrimitivesAssetAssetId; readonly tiers: Vec; readonly venueId: u64; readonly start: Option; @@ -4176,7 +4176,7 @@ declare module '@polkadot/types/lookup' { readonly asInvest: { readonly investmentPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; readonly fundingPortfolio: PolymeshPrimitivesIdentityIdPortfolioId; - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly id: u64; readonly purchaseAmount: u128; readonly maxPrice: Option; @@ -4184,24 +4184,24 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isFreezeFundraiser: boolean; readonly asFreezeFundraiser: { - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly id: u64; } & Struct; readonly isUnfreezeFundraiser: boolean; readonly asUnfreezeFundraiser: { - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly id: u64; } & Struct; readonly isModifyFundraiserWindow: boolean; readonly asModifyFundraiserWindow: { - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly id: u64; readonly start: u64; readonly end: Option; } & Struct; readonly isStop: boolean; readonly asStop: { - readonly offeringAsset: PolymeshPrimitivesAssetAssetID; + readonly offeringAsset: PolymeshPrimitivesAssetAssetId; readonly id: u64; } & Struct; readonly type: 'CreateFundraiser' | 'Invest' | 'FreezeFundraiser' | 'UnfreezeFundraiser' | 'ModifyFundraiserWindow' | 'Stop'; @@ -4339,27 +4339,27 @@ declare module '@polkadot/types/lookup' { interface PalletExternalAgentsCall extends Enum { readonly isCreateGroup: boolean; readonly asCreateGroup: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions; } & Struct; readonly isSetGroupPermissions: boolean; readonly asSetGroupPermissions: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly id: u32; readonly perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions; } & Struct; readonly isRemoveAgent: boolean; readonly asRemoveAgent: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly agent: PolymeshPrimitivesIdentityId; } & Struct; readonly isAbdicate: boolean; readonly asAbdicate: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } & Struct; readonly isChangeGroup: boolean; readonly asChangeGroup: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly agent: PolymeshPrimitivesIdentityId; readonly group: PolymeshPrimitivesAgentAgentGroup; } & Struct; @@ -4369,14 +4369,14 @@ declare module '@polkadot/types/lookup' { } & Struct; readonly isCreateGroupAndAddAuth: boolean; readonly asCreateGroupAndAddAuth: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions; readonly target: PolymeshPrimitivesIdentityId; readonly expiry: Option; } & Struct; readonly isCreateAndChangeCustomGroup: boolean; readonly asCreateAndChangeCustomGroup: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly perms: PolymeshPrimitivesSecondaryKeyExtrinsicPermissions; readonly agent: PolymeshPrimitivesIdentityId; } & Struct; @@ -4584,19 +4584,19 @@ declare module '@polkadot/types/lookup' { interface PalletNftCall extends Enum { readonly isCreateNftCollection: boolean; readonly asCreateNftCollection: { - readonly assetId: Option; + readonly assetId: Option; readonly nftType: Option; readonly collectionKeys: PolymeshPrimitivesNftNftCollectionKeys; } & Struct; readonly isIssueNft: boolean; readonly asIssueNft: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly nftMetadataAttributes: Vec; readonly portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind; } & Struct; readonly isRedeemNft: boolean; readonly asRedeemNft: { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly nftId: u64; readonly portfolioKind: PolymeshPrimitivesIdentityIdPortfolioKind; } & Struct; @@ -5033,9 +5033,9 @@ declare module '@polkadot/types/lookup' { readonly isInvalidTransferInvalidSenderCDD: boolean; readonly isTickerRegistrationNotFound: boolean; readonly isTickerIsAlreadyLinkedToAnAsset: boolean; - readonly isAssetIDGenerationError: boolean; + readonly isAssetIdGenerationError: boolean; readonly isTickerNotRegisteredToCaller: boolean; - readonly type: 'Unauthorized' | 'AssetAlreadyCreated' | 'TickerTooLong' | 'TickerNotAlphanumeric' | 'TickerAlreadyRegistered' | 'TotalSupplyAboveLimit' | 'NoSuchAsset' | 'AlreadyFrozen' | 'NotAnOwner' | 'BalanceOverflow' | 'TotalSupplyOverflow' | 'InvalidGranularity' | 'NotFrozen' | 'InvalidTransfer' | 'InsufficientBalance' | 'AssetAlreadyDivisible' | 'InvalidEthereumSignature' | 'TickerRegistrationExpired' | 'SenderSameAsReceiver' | 'NoSuchDoc' | 'MaxLengthOfAssetNameExceeded' | 'FundingRoundNameMaxLengthExceeded' | 'InvalidAssetIdentifier' | 'InvestorUniquenessClaimNotAllowed' | 'InvalidCustomAssetTypeId' | 'AssetMetadataNameMaxLengthExceeded' | 'AssetMetadataValueMaxLengthExceeded' | 'AssetMetadataTypeDefMaxLengthExceeded' | 'AssetMetadataKeyIsMissing' | 'AssetMetadataValueIsLocked' | 'AssetMetadataLocalKeyAlreadyExists' | 'AssetMetadataGlobalKeyAlreadyExists' | 'TickerFirstByteNotValid' | 'UnexpectedNonFungibleToken' | 'IncompatibleAssetTypeUpdate' | 'AssetMetadataKeyBelongsToNFTCollection' | 'AssetMetadataValueIsEmpty' | 'NumberOfAssetMediatorsExceeded' | 'InvalidTickerCharacter' | 'InvalidTransferFrozenAsset' | 'InvalidTransferComplianceFailure' | 'InvalidTransferInvalidReceiverCDD' | 'InvalidTransferInvalidSenderCDD' | 'TickerRegistrationNotFound' | 'TickerIsAlreadyLinkedToAnAsset' | 'AssetIDGenerationError' | 'TickerNotRegisteredToCaller'; + readonly type: 'Unauthorized' | 'AssetAlreadyCreated' | 'TickerTooLong' | 'TickerNotAlphanumeric' | 'TickerAlreadyRegistered' | 'TotalSupplyAboveLimit' | 'NoSuchAsset' | 'AlreadyFrozen' | 'NotAnOwner' | 'BalanceOverflow' | 'TotalSupplyOverflow' | 'InvalidGranularity' | 'NotFrozen' | 'InvalidTransfer' | 'InsufficientBalance' | 'AssetAlreadyDivisible' | 'InvalidEthereumSignature' | 'TickerRegistrationExpired' | 'SenderSameAsReceiver' | 'NoSuchDoc' | 'MaxLengthOfAssetNameExceeded' | 'FundingRoundNameMaxLengthExceeded' | 'InvalidAssetIdentifier' | 'InvestorUniquenessClaimNotAllowed' | 'InvalidCustomAssetTypeId' | 'AssetMetadataNameMaxLengthExceeded' | 'AssetMetadataValueMaxLengthExceeded' | 'AssetMetadataTypeDefMaxLengthExceeded' | 'AssetMetadataKeyIsMissing' | 'AssetMetadataValueIsLocked' | 'AssetMetadataLocalKeyAlreadyExists' | 'AssetMetadataGlobalKeyAlreadyExists' | 'TickerFirstByteNotValid' | 'UnexpectedNonFungibleToken' | 'IncompatibleAssetTypeUpdate' | 'AssetMetadataKeyBelongsToNFTCollection' | 'AssetMetadataValueIsEmpty' | 'NumberOfAssetMediatorsExceeded' | 'InvalidTickerCharacter' | 'InvalidTransferFrozenAsset' | 'InvalidTransferComplianceFailure' | 'InvalidTransferInvalidReceiverCDD' | 'InvalidTransferInvalidSenderCDD' | 'TickerRegistrationNotFound' | 'TickerIsAlreadyLinkedToAnAsset' | 'AssetIdGenerationError' | 'TickerNotRegisteredToCaller'; } /** @name PalletCorporateActionsDistributionError (644) */ @@ -5371,7 +5371,7 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshPrimitivesStatisticsStat1stKey (709) */ interface PolymeshPrimitivesStatisticsStat1stKey extends Struct { - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; readonly statType: PolymeshPrimitivesStatisticsStatType; } @@ -5717,7 +5717,7 @@ declare module '@polkadot/types/lookup' { /** @name PolymeshPrimitivesNftNftCollection (747) */ interface PolymeshPrimitivesNftNftCollection extends Struct { readonly id: u64; - readonly assetId: PolymeshPrimitivesAssetAssetID; + readonly assetId: PolymeshPrimitivesAssetAssetId; } /** @name PalletNftError (752) */ @@ -5748,8 +5748,8 @@ declare module '@polkadot/types/lookup' { readonly isInvalidNFTTransferSenderIdMatchesReceiverId: boolean; readonly isInvalidNFTTransferInvalidReceiverCDD: boolean; readonly isInvalidNFTTransferInvalidSenderCDD: boolean; - readonly isInvalidAssetID: boolean; - readonly type: 'BalanceOverflow' | 'BalanceUnderflow' | 'CollectionAlredyRegistered' | 'CollectionNotFound' | 'DuplicateMetadataKey' | 'DuplicatedNFTId' | 'InvalidAssetType' | 'InvalidMetadataAttribute' | 'InvalidNFTTransferCollectionNotFound' | 'InvalidNFTTransferSamePortfolio' | 'InvalidNFTTransferNFTNotOwned' | 'InvalidNFTTransferCountOverflow' | 'InvalidNFTTransferComplianceFailure' | 'InvalidNFTTransferFrozenAsset' | 'InvalidNFTTransferInsufficientCount' | 'MaxNumberOfKeysExceeded' | 'MaxNumberOfNFTsPerLegExceeded' | 'NftNotFound' | 'UnregisteredMetadataKey' | 'ZeroCount' | 'SupplyOverflow' | 'SupplyUnderflow' | 'InvalidNFTTransferNFTIsLocked' | 'InvalidNFTTransferSenderIdMatchesReceiverId' | 'InvalidNFTTransferInvalidReceiverCDD' | 'InvalidNFTTransferInvalidSenderCDD' | 'InvalidAssetID'; + readonly isInvalidAssetId: boolean; + readonly type: 'BalanceOverflow' | 'BalanceUnderflow' | 'CollectionAlredyRegistered' | 'CollectionNotFound' | 'DuplicateMetadataKey' | 'DuplicatedNFTId' | 'InvalidAssetType' | 'InvalidMetadataAttribute' | 'InvalidNFTTransferCollectionNotFound' | 'InvalidNFTTransferSamePortfolio' | 'InvalidNFTTransferNFTNotOwned' | 'InvalidNFTTransferCountOverflow' | 'InvalidNFTTransferComplianceFailure' | 'InvalidNFTTransferFrozenAsset' | 'InvalidNFTTransferInsufficientCount' | 'MaxNumberOfKeysExceeded' | 'MaxNumberOfNFTsPerLegExceeded' | 'NftNotFound' | 'UnregisteredMetadataKey' | 'ZeroCount' | 'SupplyOverflow' | 'SupplyUnderflow' | 'InvalidNFTTransferNFTIsLocked' | 'InvalidNFTTransferSenderIdMatchesReceiverId' | 'InvalidNFTTransferInvalidReceiverCDD' | 'InvalidNFTTransferInvalidSenderCDD' | 'InvalidAssetId'; } /** @name PalletElectionProviderMultiPhaseReadySolution (753) */