Enum pallet_uniques::pallet::Call[][src]

pub enum Call<T: Config<I>, I: 'static = ()> {
Show variants create(T::ClassId, <T::Lookup as StaticLookup>::Source), force_create(T::ClassId, <T::Lookup as StaticLookup>::Sourcebool), destroy(T::ClassIdDestroyWitness), mint(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source), burn(T::ClassId, T::InstanceIdOption<<T::Lookup as StaticLookup>::Source>), transfer(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source), redeposit(T::ClassIdVec<T::InstanceId>), freeze(T::ClassId, T::InstanceId), thaw(T::ClassId, T::InstanceId), freeze_class(T::ClassId), thaw_class(T::ClassId), transfer_ownership(T::ClassId, <T::Lookup as StaticLookup>::Source), set_team(T::ClassId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source), approve_transfer(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source), cancel_approval(T::ClassId, T::InstanceIdOption<<T::Lookup as StaticLookup>::Source>), force_asset_status(T::ClassId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Sourceboolbool), set_attribute(T::ClassIdOption<T::InstanceId>, BoundedVec<u8, T::KeyLimit>, BoundedVec<u8, T::ValueLimit>), clear_attribute(T::ClassIdOption<T::InstanceId>, BoundedVec<u8, T::KeyLimit>), set_metadata(T::ClassId, T::InstanceIdBoundedVec<u8, T::StringLimit>, bool), clear_metadata(T::ClassId, T::InstanceId), set_class_metadata(T::ClassIdBoundedVec<u8, T::StringLimit>, bool), clear_class_metadata(T::ClassId), // some variants omitted
}
Expand description

Contains one variant per dispatchable that can be called by an extrinsic.

Variants

create(T::ClassId, <T::Lookup as StaticLookup>::Source)

Issue a new class of non-fungible assets from a public origin.

This new asset class has no assets initially and its owner is the origin.

The origin must be Signed and the sender must have sufficient funds free.

AssetDeposit funds of sender are reserved.

Parameters:

Emits Created event when successful.

Weight: O(1)

force_create(T::ClassId, <T::Lookup as StaticLookup>::Sourcebool)

Issue a new class of non-fungible assets from a privileged origin.

This new asset class has no assets initially.

The origin must conform to ForceOrigin.

Unlike create, no funds are reserved.

Emits ForceCreated event when successful.

Weight: O(1)

destroy(T::ClassIdDestroyWitness)

Destroy a class of fungible assets.

The origin must conform to ForceOrigin or must be Signed and the sender must be the owner of the asset class.

Emits Destroyed event when successful.

Weight: O(n + m) where:

mint(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source)

Mint an asset instance of a particular class.

The origin must be Signed and the sender must be the Issuer of the asset class.

Emits Issued event when successful.

Weight: O(1)

burn(T::ClassId, T::InstanceIdOption<<T::Lookup as StaticLookup>::Source>)

Destroy a single asset instance.

Origin must be Signed and the sender should be the Admin of the asset class.

Emits Burned with the actual amount burned.

Weight: O(1) Modes: check_owner.is_some().

transfer(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source)

Move an asset from the sender account to another.

Origin must be Signed and the signing account must be either:

Arguments:

Emits Transferred.

Weight: O(1)

redeposit(T::ClassIdVec<T::InstanceId>)

Reevaluate the deposits on some assets.

Origin must be Signed and the sender should be the Owner of the asset class.

NOTE: This exists as a best-effort function. Any asset instances which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn’t going to call this on instances whose existing deposit is less than the refreshed deposit as it would only cost them, so it’s of little consequence.

It will still return an error in the case that the class is unknown of the signer is not permitted to call it.

Weight: O(instances.len())

freeze(T::ClassId, T::InstanceId)

Disallow further unprivileged transfer of an asset instance.

Origin must be Signed and the sender should be the Freezer of the asset class.

Emits Frozen.

Weight: O(1)

thaw(T::ClassId, T::InstanceId)

Re-allow unprivileged transfer of an asset instance.

Origin must be Signed and the sender should be the Freezer of the asset class.

Emits Thawed.

Weight: O(1)

freeze_class(T::ClassId)

Disallow further unprivileged transfers for a whole asset class.

Origin must be Signed and the sender should be the Freezer of the asset class.

Emits ClassFrozen.

Weight: O(1)

thaw_class(T::ClassId)

Re-allow unprivileged transfers for a whole asset class.

Origin must be Signed and the sender should be the Admin of the asset class.

Emits ClassThawed.

Weight: O(1)

transfer_ownership(T::ClassId, <T::Lookup as StaticLookup>::Source)

Change the Owner of an asset class.

Origin must be Signed and the sender should be the Owner of the asset class.

Emits OwnerChanged.

Weight: O(1)

set_team(T::ClassId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source)

Change the Issuer, Admin and Freezer of an asset class.

Origin must be Signed and the sender should be the Owner of the asset class.

Emits TeamChanged.

Weight: O(1)

approve_transfer(T::ClassId, T::InstanceId, <T::Lookup as StaticLookup>::Source)

Approve an instance to be transferred by a delegated third-party account.

Origin must be Signed and must be the owner of the asset instance.

Emits ApprovedTransfer on success.

Weight: O(1)

cancel_approval(T::ClassId, T::InstanceIdOption<<T::Lookup as StaticLookup>::Source>)

Cancel the prior approval for the transfer of an asset by a delegate.

Origin must be either:

Arguments:

Emits ApprovalCancelled on success.

Weight: O(1)

force_asset_status(T::ClassId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Sourceboolbool)

Alter the attributes of a given asset.

Origin must be ForceOrigin.

Emits AssetStatusChanged with the identity of the asset.

Weight: O(1)

set_attribute(T::ClassIdOption<T::InstanceId>, BoundedVec<u8, T::KeyLimit>, BoundedVec<u8, T::ValueLimit>)

Set an attribute for an asset class or instance.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset class.

If the origin is Signed, then funds of signer are reserved according to the formula: MetadataDepositBase + DepositPerByte * (key.len + value.len) taking into account any already reserved funds.

Emits AttributeSet.

Weight: O(1)

clear_attribute(T::ClassIdOption<T::InstanceId>, BoundedVec<u8, T::KeyLimit>)

Set an attribute for an asset class or instance.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset class.

If the origin is Signed, then funds of signer are reserved according to the formula: MetadataDepositBase + DepositPerByte * (key.len + value.len) taking into account any already reserved funds.

Emits AttributeSet.

Weight: O(1)

set_metadata(T::ClassId, T::InstanceIdBoundedVec<u8, T::StringLimit>, bool)

Set the metadata for an asset instance.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset class.

If the origin is Signed, then funds of signer are reserved according to the formula: MetadataDepositBase + DepositPerByte * data.len taking into account any already reserved funds.

Emits MetadataSet.

Weight: O(1)

clear_metadata(T::ClassId, T::InstanceId)

Clear the metadata for an asset instance.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset instance.

Any deposit is freed for the asset class owner.

Emits MetadataCleared.

Weight: O(1)

set_class_metadata(T::ClassIdBoundedVec<u8, T::StringLimit>, bool)

Set the metadata for an asset class.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset class.

If the origin is Signed, then funds of signer are reserved according to the formula: MetadataDepositBase + DepositPerByte * data.len taking into account any already reserved funds.

Emits ClassMetadataSet.

Weight: O(1)

clear_class_metadata(T::ClassId)

Clear the metadata for an asset class.

Origin must be either ForceOrigin or Signed and the sender should be the Owner of the asset class.

Any deposit is freed for the asset class owner.

Emits ClassMetadataCleared.

Weight: O(1)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

Convert self to a slice and append it to the destination.

If possible give a hint of expected size of the encoding. Read more

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

Calculates the encoded size. Read more

Return the function name of the Call.

Return all function names.

Return a DispatchInfo, containing relevant information of this dispatch. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The origin type of the runtime, (i.e. frame_system::Config::Origin).

Dispatch this call but do not check the filter in origin.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

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

Decode Self and consume all of the given input data. Read more

Decode Self and consume all of the given input data. Read more

Decode Self with the given maximum recursion depth. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

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

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

Performs the conversion.

Cast reference.

Cast reference.

Cast mutable reference.

Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Return an encoding of Self prepended by given slice.

Should always be Self

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

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

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.