AssetCallApi

Struct AssetCallApi 

Source
pub struct AssetCallApi<'api> { /* private fields */ }

Implementations§

Source§

impl<'api> AssetCallApi<'api>

Source

pub fn register_unique_ticker(&self, ticker: Ticker) -> Result<WrappedCall>

Registers a unique ticker or extends the validity of an existing ticker.

This function allows the caller to register a new ticker or extend the registration of an existing ticker. The ticker validity does not carry forward when renewing.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • ticker - The ticker to register.
§Events
  • TickerRegistered - When a ticker is successfully registered.
§Errors
  • TickerAlreadyRegistered - If the ticker is already registered.
  • TickerTooLong - If the ticker length exceeds the maximum allowed length.
  • InvalidTickerCharacter - If the ticker contains invalid characters.
Source

pub fn accept_ticker_transfer(&self, auth_id: u64) -> Result<WrappedCall>

Accepts a ticker transfer.

Consumes the authorization auth_id (see pallet_identity::consume_auth). NB: To reject the transfer, call remove auth function in identity module.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • auth_id - Authorization ID of ticker transfer authorization.
§Events
  • TickerTransferred - When a ticker is successfully transferred.
§Errors
  • TickerRegistrationNotFound - If the ticker registration is not found.
  • TickerIsAlreadyLinkedToAnAsset - If the ticker is already linked to an asset.
Source

pub fn accept_asset_ownership_transfer( &self, auth_id: u64, ) -> Result<WrappedCall>

Accepts an asset ownership transfer.

Consumes the authorization auth_id (see pallet_identity::consume_auth). NB: To reject the transfer, call remove auth function in identity module.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • auth_id - Authorization ID of the asset ownership transfer authorization.
§Events
  • AssetOwnershipTransferred - When a asset ownership is successfully transferred.
§Errors
  • TickerRegistrationNotFound - If the ticker registration is not found.
  • TickerIsAlreadyLinkedToAnAsset - If the ticker is already linked to an asset.
Source

pub fn create_asset( &self, asset_name: AssetName, divisible: bool, asset_type: AssetType, asset_identifiers: Vec<AssetIdentifier>, funding_round_name: Option<FundingRoundName>, ) -> Result<WrappedCall>

Creates a new asset.

The total supply will initially be zero. To mint tokens, use [Pallet::issue].

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_name - The [AssetName] of the new asset.
  • divisible - Sets [AssetDetails::divisible], where true means the asset is divisible.
  • asset_type - The [AssetType] of the new asset.
  • asset_identifiers - A vector of [AssetIdentifier].
  • funding_round_name - The name of the funding round ([FundingRoundName]).
§Events
  • AssetCreated - When a new asset is successfully created.
§Errors
  • MaxLengthOfAssetNameExceeded - If the asset name length exceeds the maximum allowed length.
  • InvalidCustomAssetTypeId - If the custom asset type ID is invalid.
  • InvalidAssetIdentifier - If any of the asset identifiers are invalid.
Source

pub fn freeze(&self, asset_id: AssetId) -> Result<WrappedCall>

Freezes transfers of a given asset.

This function allows the asset issuer or an external agent to freeze transfers of a given asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The asset to freeze.
§Permissions
  • Asset
§Events
  • AssetFrozen - When an asset is successfully frozen.
§Errors
  • NoSuchAsset - If the asset does not exist.
  • AlreadyFrozen - If the asset is already frozen.
Source

pub fn unfreeze(&self, asset_id: AssetId) -> Result<WrappedCall>

Unfreezes transfers of a given asset.

This function allows the asset issuer or an external agent to unfreeze transfers of a given asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The asset to unfreeze.
§Permissions
  • Asset
§Events
  • AssetUnfrozen - When an asset is successfully unfrozen.
§Errors
  • NoSuchAsset - If the asset does not exist.
  • NotFrozen - If the asset is not frozen.
Source

pub fn rename_asset( &self, asset_id: AssetId, asset_name: AssetName, ) -> Result<WrappedCall>

Updates the [AssetName] associated to an asset.

This function allows the asset issuer or an external agent to update the name of an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • asset_name - The new [AssetName] that will be associated to the asset.
§Permissions
  • Asset
§Events
  • AssetRenamed - When an asset is successfully renamed.
§Errors
  • MaxLengthOfAssetNameExceeded - If the asset name length exceeds the maximum allowed length.
  • NoSuchAsset - If the asset does not exist.
Source

pub fn issue( &self, asset_id: AssetId, amount: u128, portfolio_kind: PortfolioKind, ) -> Result<WrappedCall>

Issue (i.e mint) new tokens to the caller, which must be an authorized external agent.

This function allows the asset issuer or an external agent to mint new tokens for a given asset.

§Arguments
  • origin: A signer that has permissions to act as an agent of ticker.
  • asset_id: the [AssetId] associated to the asset.
  • amount: The amount of tokens that will be issued.
  • portfolio_kind: The [PortfolioKind] of the portfolio that will receive the minted tokens.
§Permissions
  • Asset
  • Portfolio
§Events
  • AssetBalanceUpdated - When the asset balance is successfully updated.
§Errors
  • UnexpectedNonFungibleToken - If the asset is a non-fungible token.
  • InvalidGranularity - If the amount to issue does not meet the granularity requirements.
  • TotalSupplyOverflow - If the total supply exceeds the maximum allowed limit.
Source

pub fn redeem( &self, asset_id: AssetId, value: u128, portfolio_kind: PortfolioKind, ) -> Result<WrappedCall>

Redeems (i.e burns) existing tokens by reducing the balance of the caller’s portfolio and the total supply of the asset.

This function allows the asset issuer or an external agent to redeem tokens from a given asset.

§Arguments
  • origin: is a signer that has permissions to act as an agent of asset_id.
  • asset_id: the [AssetId] associated to the asset.
  • value: amount of tokens to redeem.
  • portfolio_kind: the [PortfolioKind] that will have its balance reduced.
§Permissions
  • Asset
  • Portfolio
§Events
  • AssetBalanceUpdated - When the asset balance is successfully updated.
§Errors
  • UnexpectedNonFungibleToken - If the asset is a non-fungible token.
  • InvalidGranularity - If the value to redeem does not meet the granularity requirements.
  • TotalSupplyOverflow - If the total supply exceeds the maximum allowed limit.
Source

pub fn make_divisible(&self, asset_id: AssetId) -> Result<WrappedCall>

If the asset associated to asset_id is indivisible, sets [AssetDetails::divisible] to true.

This function allows the asset issuer or an external agent to make an indivisible asset divisible.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
§Permissions
  • Asset
§Events
  • DivisibilityChanged - When the divisibility of an asset is successfully changed.
§Errors
  • NoSuchAsset - If the asset does not exist.
  • UnexpectedNonFungibleToken - If the asset is a non-fungible token.
  • AssetAlreadyDivisible - If the asset is already divisible.
Source

pub fn add_documents( &self, docs: Vec<Document>, asset_id: AssetId, ) -> Result<WrappedCall>

Add documents for a given asset.

This function allows the asset issuer or an external agent to add documents to an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • docs - Documents to be attached to the asset.
§Permissions
  • Asset
§Events
  • DocumentAdded - When a document is successfully added to an asset.
§Errors
  • CounterOverflow - If the document ID counter overflows.
Source

pub fn remove_documents( &self, docs_id: Vec<DocumentId>, asset_id: AssetId, ) -> Result<WrappedCall>

Remove documents for a given asset.

This function allows the asset issuer or an external agent to remove documents from an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • docs_id - A vector of all [DocumentId] that will be removed from the asset.
§Permissions
  • Asset
§Events
  • DocumentRemoved - When a document is successfully removed from an asset.
Source

pub fn set_funding_round( &self, asset_id: AssetId, funding_round_name: FundingRoundName, ) -> Result<WrappedCall>

Sets the name of the current funding round.

This function allows the asset issuer or an external agent to set the name of the current funding round for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • funding_round_name - The [FundingRoundName] of the current funding round.
§Permissions
  • Asset
§Events
  • FundingRoundSet - When the funding round name is successfully set.
§Errors
  • FundingRoundNameMaxLengthExceeded - If the funding round name length exceeds the maximum allowed length.
Source

pub fn update_identifiers( &self, asset_id: AssetId, asset_identifiers: Vec<AssetIdentifier>, ) -> Result<WrappedCall>

Updates the asset identifiers associated to the asset.

This function allows the asset issuer or an external agent to update the asset identifiers for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • asset_identifiers - A vector of [AssetIdentifier] that will be associated to the asset.
§Permissions
  • Asset
§Events
  • IdentifiersUpdated - When the asset identifiers are successfully updated.
§Errors
  • InvalidAssetIdentifier - If any of the asset identifiers are invalid.
Source

pub fn controller_transfer( &self, asset_id: AssetId, value: u128, from_portfolio: PortfolioId, ) -> Result<WrappedCall>

Forces a transfer of tokens from from_portfolio to the caller’s default portfolio.

This function allows the asset issuer or an external agent to force a transfer of tokens from one portfolio to another.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • value - The [Balance] of tokens that will be transferred.
  • from_portfolio - The [PortfolioId] that will have its balance reduced.
§Permissions
  • Asset
  • Portfolio
§Events
  • ControllerTransfer - When tokens are successfully transferred.
§Errors
  • UnexpectedNonFungibleToken - If the asset is a non-fungible token.
  • InvalidGranularity - If the amount to transfer does not meet the granularity requirements.
  • TotalSupplyOverflow - If the total supply exceeds the maximum allowed limit.
Source

pub fn register_custom_asset_type(&self, ty: Vec<u8>) -> Result<WrappedCall>

Registers a custom asset type.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • ty - Contains the string representation of the asset type.
§Events
  • CustomAssetTypeRegistered - When a new custom asset type is successfully registered.
  • CustomAssetTypeAlreadyRegistered - When the custom asset type is already registered.
§Errors
  • TooLong - If the custom asset type length exceeds the maximum allowed length.
Source

pub fn create_asset_with_custom_type( &self, asset_name: AssetName, divisible: bool, custom_asset_type: Vec<u8>, asset_identifiers: Vec<AssetIdentifier>, funding_round_name: Option<FundingRoundName>, ) -> Result<WrappedCall>

Creates a new asset with a new custom asset type.

The total supply will initially be zero. To mint tokens, use [Pallet::issue].

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_name - The [AssetName] of the new asset.
  • divisible - Sets [AssetDetails::divisible], where true means the asset is divisible.
  • custom_asset_type - The custom asset type of the asset.
  • asset_identifiers - A vector of [AssetIdentifier].
  • funding_round_name - The name of the funding round ([FundingRoundName]).
§Events
  • AssetCreated - When a new asset is successfully created.
  • CustomAssetTypeRegistered - When a new custom asset type is successfully registered.
  • CustomAssetTypeAlreadyRegistered - When the custom asset type is already registered.
§Errors
  • MaxLengthOfAssetNameExceeded - If the asset name length exceeds the maximum allowed length.
  • InvalidCustomAssetTypeId - If the custom asset type ID is invalid.
  • InvalidAssetIdentifier - If any of the asset identifiers are invalid.
  • TooLong - If the custom asset type length exceeds the maximum allowed length.
Source

pub fn set_asset_metadata( &self, asset_id: AssetId, key: AssetMetadataKey, value: AssetMetadataValue, detail: Option<AssetMetadataValueDetail<u64>>, ) -> Result<WrappedCall>

Set asset metadata value.

This function allows the asset issuer or an external agent to set metadata for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • key - The [AssetMetadataKey] associated to the asset.
  • value - The [AssetMetadataValue] of the given metadata key.
  • details - Optional [AssetMetadataValueDetail] (expire, lock status).
§Permissions
  • Asset
§Events
  • SetAssetMetadataValue - When the asset metadata value is successfully set.
§Errors
  • AssetMetadataKeyIsMissing - If the metadata key is missing.
  • AssetMetadataValueIsLocked - If the metadata value is locked.
  • AssetMetadataValueMaxLengthExceeded - If the metadata value length exceeds the maximum allowed length.
Source

pub fn set_asset_metadata_details( &self, asset_id: AssetId, key: AssetMetadataKey, detail: AssetMetadataValueDetail<u64>, ) -> Result<WrappedCall>

Set asset metadata value details (expire, lock status).

This function allows the asset issuer or an external agent to set metadata details for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • key - The [AssetMetadataKey] associated to the asset.
  • details - The [AssetMetadataValueDetail] (expire, lock status) that will be associated to the asset.
§Permissions
  • Asset
§Events
  • SetAssetMetadataValueDetails - When the asset metadata value details are successfully set.
§Errors
  • AssetMetadataKeyIsMissing - If the metadata key is missing.
  • AssetMetadataValueIsLocked - If the metadata value is locked.
  • AssetMetadataValueIsEmpty - If the metadata value is empty.
Source

pub fn register_and_set_local_asset_metadata( &self, asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, value: AssetMetadataValue, detail: Option<AssetMetadataValueDetail<u64>>, ) -> Result<WrappedCall>

Registers and set local asset metadata.

This function allows the asset issuer or an external agent to register and set local metadata for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • name - The [AssetMetadataName].
  • spec - The asset metadata specifications ([AssetMetadataSpec]).
  • value - The [AssetMetadataValue] of the given metadata key.
  • details - Optional [AssetMetadataValueDetail] (expire, lock status).
§Permissions
  • Asset
§Events
  • RegisterAssetMetadataLocalType - When the local asset metadata type is successfully registered.
  • SetAssetMetadataValue - When the asset metadata value is successfully set.
§Errors
  • AssetMetadataLocalKeyAlreadyExists - If the local metadata key already exists.
  • AssetMetadataValueIsLocked - If the metadata value is locked.
  • AssetMetadataValueMaxLengthExceeded - If the metadata value length exceeds the maximum allowed length.
Source

pub fn register_asset_metadata_local_type( &self, asset_id: AssetId, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> Result<WrappedCall>

Registers asset metadata local type.

This function allows the asset issuer or an external agent to register a local metadata type for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • name - The [AssetMetadataName].
  • spec - The asset metadata specifications ([AssetMetadataSpec]).
§Permissions
  • Asset
§Events
  • RegisterAssetMetadataLocalType - When the local asset metadata type is successfully registered.
§Errors
  • AssetMetadataLocalKeyAlreadyExists - If the local metadata key already exists.
  • AssetMetadataNameMaxLengthExceeded - If the metadata name length exceeds the maximum allowed length.
  • AssetMetadataTypeDefMaxLengthExceeded - If the metadata type definition length exceeds the maximum allowed length.
Source

pub fn register_asset_metadata_global_type( &self, name: AssetMetadataName, spec: AssetMetadataSpec, ) -> Result<WrappedCall>

Registers asset metadata global type.

This function allows the root origin to register a global metadata type.

§Arguments
  • origin - The root origin.
  • name - The [AssetMetadataName].
  • spec - The asset metadata specifications ([AssetMetadataSpec]).
§Events
  • RegisterAssetMetadataGlobalType - When the global asset metadata type is successfully registered.
§Errors
  • AssetMetadataGlobalKeyAlreadyExists - If the global metadata key already exists.
  • AssetMetadataNameMaxLengthExceeded - If the metadata name length exceeds the maximum allowed length.
  • AssetMetadataTypeDefMaxLengthExceeded - If the metadata type definition length exceeds the maximum allowed length.
Source

pub fn update_asset_type( &self, asset_id: AssetId, asset_type: AssetType, ) -> Result<WrappedCall>

Updates the type of an asset.

This function allows the asset issuer or an external agent to update the type of an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the asset.
  • asset_type - The new [AssetType] of the asset.
§Permissions
  • Asset
§Events
  • AssetTypeChanged - When the asset type is successfully changed.
§Errors
  • NoSuchAsset - If the asset does not exist.
  • InvalidCustomAssetTypeId - If the custom asset type ID is invalid.
  • IncompatibleAssetTypeUpdate - If the new asset type is incompatible with the existing asset type.
Source

pub fn remove_local_metadata_key( &self, asset_id: AssetId, local_key: AssetMetadataLocalKey, ) -> Result<WrappedCall>

Removes the asset metadata key and value of a local key.

This function allows the asset issuer or an external agent to remove a local metadata key and its value for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the local metadata key.
  • local_key - The [AssetMetadataLocalKey] that will be removed.
§Permissions
  • Asset
§Events
  • LocalMetadataKeyDeleted - When the local metadata key is successfully deleted.
§Errors
  • AssetMetadataKeyIsMissing - If the local metadata key is missing.
  • AssetMetadataValueIsLocked - If the metadata value is locked.
  • AssetMetadataKeyBelongsToNFTCollection - If the metadata key belongs to an NFT collection.
Source

pub fn remove_metadata_value( &self, asset_id: AssetId, metadata_key: AssetMetadataKey, ) -> Result<WrappedCall>

Removes the asset metadata value of a metadata key.

This function allows the asset issuer or an external agent to remove a metadata value for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] associated to the metadata key.
  • metadata_key - The [AssetMetadataKey] that will have its value deleted.
§Permissions
  • Asset
§Events
  • MetadataValueDeleted - When the metadata value is successfully deleted.
§Errors
  • AssetMetadataKeyIsMissing - If the metadata key is missing.
  • AssetMetadataValueIsLocked - If the metadata value is locked.
Source

pub fn exempt_asset_affirmation(&self, asset_id: AssetId) -> Result<WrappedCall>

Pre-approves the receivement of the asset for all identities.

This function allows the root origin to pre-approve the receivement of an asset for all identities.

§Arguments
  • origin - The root origin.
  • asset_id - The [AssetId] that will be exempt from affirmation.
§Events
  • AssetAffirmationExemption - When the asset is successfully exempted from affirmation.
Source

pub fn remove_asset_affirmation_exemption( &self, asset_id: AssetId, ) -> Result<WrappedCall>

Removes the pre-approval of the asset for all identities.

This function allows the root origin to remove the pre-approval of an asset for all identities.

§Arguments
  • origin - The root origin.
  • asset_id - The [AssetId] that will have its exemption removed.
§Events
  • RemoveAssetAffirmationExemption - When the asset’s affirmation exemption is successfully removed.
Source

pub fn pre_approve_asset(&self, asset_id: AssetId) -> Result<WrappedCall>

Pre-approves the receivement of an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] that will be exempt from affirmation.
§Permissions
  • Asset
§Events
  • PreApprovedAsset - When the asset is successfully pre-approved for receivement.
Source

pub fn remove_asset_pre_approval( &self, asset_id: AssetId, ) -> Result<WrappedCall>

Removes the pre-approval of an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_id - The [AssetId] that will have its exemption removed.
§Permissions
  • Asset
§Events
  • RemovePreApprovedAsset - When the asset’s pre-approval is successfully removed.
Source

pub fn add_mandatory_mediators( &self, asset_id: AssetId, mediators: BTreeSet<IdentityId>, ) -> Result<WrappedCall>

Sets all identities in the mediators set as mandatory mediators for any instruction transferring asset_id.

This function allows the asset issuer or an external agent to add mandatory mediators for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • 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
§Events
  • AssetMediatorsAdded - When the mandatory mediators are successfully added.
§Errors
  • NumberOfAssetMediatorsExceeded - If the number of mandatory mediators exceeds the maximum allowed limit.
Source

pub fn remove_mandatory_mediators( &self, asset_id: AssetId, mediators: BTreeSet<IdentityId>, ) -> Result<WrappedCall>

Removes all identities in the mediators set from the mandatory mediators list for the given asset_id.

This function allows the asset issuer or an external agent to remove mandatory mediators for an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • 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
§Events
  • AssetMediatorsRemoved - When the mandatory mediators are successfully removed.

Establishes a connection between a ticker and an AssetId.

This function allows the asset issuer or an external agent to link a ticker to an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • ticker - The [Ticker] that will be linked to the given asset_id.
  • asset_id - The [AssetId] that will be connected to ticker.
§Permissions
  • Asset
§Events
  • TickerLinkedToAsset - When the ticker is successfully linked to the asset.
§Errors
  • TickerNotRegisteredToCaller - If the ticker is not registered to the caller.
  • TickerRegistrationExpired - If the ticker registration has expired.
  • TickerRegistrationNotFound - If the ticker registration is not found.
  • TickerIsAlreadyLinkedToAnAsset - If the ticker is already linked to an asset.
  • AssetIsAlreadyLinkedToATicker - If the asset is already linked to a ticker.

Removes the link between a ticker and an asset.

This function allows the asset issuer or an external agent to unlink a ticker from an asset.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • ticker - The [Ticker] that will be unlinked from the given asset_id.
  • asset_id - The [AssetId] that will be unlinked from ticker.
§Permissions
  • Asset
§Events
  • TickerUnlinkedFromAsset - When the ticker is successfully unlinked from the asset.
§Errors
  • TickerNotRegisteredToCaller - If the ticker is not registered to the caller.
  • TickerRegistrationNotFound - If the ticker registration is not found.
  • TickerIsNotLinkedToTheAsset - If the ticker is not linked to the asset.
Source

pub fn update_global_metadata_spec( &self, asset_metadata_name: AssetMetadataName, asset_metadata_spec: AssetMetadataSpec, ) -> Result<WrappedCall>

Updates the global metadata specification.

§Arguments
  • origin - The origin of the call, which can be the primary or secondary key of an identity.
  • asset_metadata_name - The [AssetMetadataName] associated with the global metadata.
  • asset_metadata_spec - The new [AssetMetadataSpec] that will be associated with the global metadata.
§Events
  • GlobalMetadataSpecUpdated - When the global metadata specification is successfully updated.
§Errors
  • BadOrigin - If the origin is not authorized.
  • TooLong - If the metadata url or description length exceeds the maximum allowed length.
  • AssetMetadataTypeDefMaxLengthExceeded - If the metadata type definition length exceeds the maximum allowed length.

Trait Implementations§

Source§

impl<'api> Clone for AssetCallApi<'api>

Source§

fn clone(&self) -> AssetCallApi<'api>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'api> From<&'api Api> for AssetCallApi<'api>

Source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'api> Freeze for AssetCallApi<'api>

§

impl<'api> !RefUnwindSafe for AssetCallApi<'api>

§

impl<'api> Send for AssetCallApi<'api>

§

impl<'api> Sync for AssetCallApi<'api>

§

impl<'api> Unpin for AssetCallApi<'api>

§

impl<'api> !UnwindSafe for AssetCallApi<'api>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedConversion for T

Source§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
Source§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

Source§

fn into_tuple(self) -> Dest

Source§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

Source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

Source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatedConversion for T

Source§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
Source§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

Source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Source§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

Source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T