Enum noble_assets::Call[][src]

pub enum Call<T: Config> {
    create(T::AssetId, <T::Lookup as StaticLookup>::Sourceu32, T::Balance),
    force_create(T::AssetId, <T::Lookup as StaticLookup>::Sourceu32, T::Balance),
    destroy(T::AssetIdu32),
    force_destroy(T::AssetIdu32),
    mint(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance),
    burn(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance),
    transfer(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance),
    force_transfer(T::AssetId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, T::Balance),
    freeze(T::AssetId, <T::Lookup as StaticLookup>::Source),
    thaw(T::AssetId, <T::Lookup as StaticLookup>::Source),
    freeze_asset(T::AssetId),
    thaw_asset(T::AssetId),
    transfer_ownership(T::AssetId, <T::Lookup as StaticLookup>::Source),
    set_team(T::AssetId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source),
    set_max_zombies(T::AssetIdu32),
    set_metadata(T::AssetIdVec<u8>, Vec<u8>, u8),
    // some variants omitted
}

Dispatchable calls.

Each variant of this enum maps to a dispatchable function from the associated module.

Variants

create(T::AssetId, <T::Lookup as StaticLookup>::Sourceu32, T::Balance)

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

This new asset class has no assets initially.

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

Funds of sender are reserved according to the formula: AssetDepositBase + AssetDepositPerZombie * max_zombies.

Parameters:

  • id: The identifier of the new asset. This must not be currently in use to identify an existing asset.
  • owner: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using transfer_ownership and set_team.
  • max_zombies: The total number of accounts which may hold assets in this class yet have no existential deposit.
  • min_balance: The minimum balance of this new asset that any single account must have. If an account’s balance is reduced below this, then it collapses to zero.

Emits Created event when successful.

Weight: O(1)

force_create(T::AssetId, <T::Lookup as StaticLookup>::Sourceu32, T::Balance)

Issue a new class of 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.

  • id: The identifier of the new asset. This must not be currently in use to identify an existing asset.
  • owner: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using transfer_ownership and set_team.
  • max_zombies: The total number of accounts which may hold assets in this class yet have no existential deposit.
  • min_balance: The minimum balance of this new asset that any single account must have. If an account’s balance is reduced below this, then it collapses to zero.

Emits ForceCreated event when successful.

Weight: O(1)

destroy(T::AssetIdu32)

Destroy a class of fungible assets owned by the sender.

The origin must be Signed and the sender must be the owner of the asset id.

  • id: The identifier of the asset to be destroyed. This must identify an existing asset.

Emits Destroyed event when successful.

Weight: O(z) where z is the number of zombie accounts.

force_destroy(T::AssetIdu32)

Destroy a class of fungible assets.

The origin must conform to ForceOrigin.

  • id: The identifier of the asset to be destroyed. This must identify an existing asset.

Emits Destroyed event when successful.

Weight: O(1)

mint(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance)

Mint assets of a particular class.

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

  • id: The identifier of the asset to have some amount minted.
  • beneficiary: The account to be credited with the minted assets.
  • amount: The amount of the asset to be minted.

Emits Destroyed event when successful.

Weight: O(1) Modes: Pre-existing balance of beneficiary; Account pre-existence of beneficiary.

burn(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance)

Reduce the balance of who by as much as possible up to amount assets of id.

Origin must be Signed and the sender should be the Manager of the asset id.

Bails with BalanceZero if the who is already dead.

  • id: The identifier of the asset to have some amount burned.
  • who: The account to be debited from.
  • amount: The maximum amount by which who’s balance should be reduced.

Emits Burned with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero.

Weight: O(1) Modes: Post-existence of who; Pre & post Zombie-status of who.

transfer(T::AssetId, <T::Lookup as StaticLookup>::Source, T::Balance)

Move some assets from the sender account to another.

Origin must be Signed.

  • id: The identifier of the asset to have some amount transferred.
  • target: The account to be credited.
  • amount: The amount by which the sender’s balance of assets should be reduced and target’s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero.

Emits Transferred with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero.

Weight: O(1) Modes: Pre-existence of target; Post-existence of sender; Prior & post zombie-status of sender; Account pre-existence of target.

force_transfer(T::AssetId, <T::Lookup as StaticLookup>::Source, <T::Lookup as StaticLookup>::Source, T::Balance)

Move some assets from one account to another.

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

  • id: The identifier of the asset to have some amount transferred.
  • source: The account to be debited.
  • dest: The account to be credited.
  • amount: The amount by which the source’s balance of assets should be reduced and dest’s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the source balance above zero but below the minimum balance. Must be greater than zero.

Emits Transferred with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero.

Weight: O(1) Modes: Pre-existence of dest; Post-existence of source; Prior & post zombie-status of source; Account pre-existence of dest.

freeze(T::AssetId, <T::Lookup as StaticLookup>::Source)

Disallow further unprivileged transfers from an account.

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

  • id: The identifier of the asset to be frozen.
  • who: The account to be frozen.

Emits Frozen.

Weight: O(1)

thaw(T::AssetId, <T::Lookup as StaticLookup>::Source)

Allow unprivileged transfers from an account again.

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

  • id: The identifier of the asset to be frozen.
  • who: The account to be unfrozen.

Emits Thawed.

Weight: O(1)

freeze_asset(T::AssetId)

Disallow further unprivileged transfers for the asset class.

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

  • id: The identifier of the asset to be frozen.

Emits Frozen.

Weight: O(1)

thaw_asset(T::AssetId)

Allow unprivileged transfers for the asset again.

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

  • id: The identifier of the asset to be frozen.

Emits Thawed.

Weight: O(1)

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

Change the Owner of an asset.

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

  • id: The identifier of the asset to be frozen.
  • owner: The new Owner of this asset.

Emits OwnerChanged.

Weight: O(1)

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

Change the Issuer, Admin and Freezer of an asset.

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

  • id: The identifier of the asset to be frozen.
  • issuer: The new Issuer of this asset.
  • admin: The new Admin of this asset.
  • freezer: The new Freezer of this asset.

Emits TeamChanged.

Weight: O(1)

set_max_zombies(T::AssetIdu32)

Set the maximum number of zombie accounts for an asset.

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

Funds of sender are reserved according to the formula: AssetDepositBase + AssetDepositPerZombie * max_zombies taking into account any already reserved funds.

  • id: The identifier of the asset to update zombie count.
  • max_zombies: The new number of zombies allowed for this asset.

Emits MaxZombiesChanged.

Weight: O(1)

set_metadata(T::AssetIdVec<u8>, Vec<u8>, u8)

Set the metadata for an asset.

NOTE: There is no unset_metadata call. Simply pass an empty name, symbol, and 0 decimals to this function to remove the metadata of an asset and return your deposit.

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

Funds of sender are reserved according to the formula: MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len) taking into account any already reserved funds.

  • id: The identifier of the asset to update.
  • name: The user friendly name of this asset. Limited in length by StringLimit.
  • symbol: The exchange symbol for this asset. Limited in length by StringLimit.
  • decimals: The number of decimals this asset uses to represent one unit.

Emits MaxZombiesChanged.

Weight: O(1)

Trait Implementations

impl<T: Config> Clone for Call<T>[src]

impl<T: Config> Debug for Call<T>[src]

impl<T: Config> Decode for Call<T> where
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    T::Balance: Decode,
    T::Balance: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    <T::Lookup as StaticLookup>::Source: Decode,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact
[src]

impl<T: Config> Encode for Call<T> where
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    T::Balance: Encode,
    T::Balance: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact
[src]

impl<T: Config> EncodeLike<Call<T>> for Call<T> where
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    T::Balance: Encode,
    T::Balance: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    <T::Lookup as StaticLookup>::Source: Encode,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::Balance: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact,
    T::AssetId: HasCompact
[src]

impl<T: Config> Eq for Call<T>[src]

impl<T: Config> GetCallName for Call<T>[src]

impl<T: Config> GetDispatchInfo for Call<T>[src]

impl<T: Config> PartialEq<Call<T>> for Call<T>[src]

impl<T: Config> UnfilteredDispatchable for Call<T>[src]

type Origin = T::Origin

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

Auto Trait Implementations

impl<T> RefUnwindSafe for Call<T> where
    T: RefUnwindSafe,
    <T as Config>::AssetId: RefUnwindSafe,
    <T as Config>::Balance: RefUnwindSafe,
    <<T as Config>::Lookup as StaticLookup>::Source: RefUnwindSafe

impl<T> Send for Call<T> where
    T: Send,
    <<T as Config>::Lookup as StaticLookup>::Source: Send

impl<T> Sync for Call<T> where
    T: Sync,
    <<T as Config>::Lookup as StaticLookup>::Source: Sync

impl<T> Unpin for Call<T> where
    T: Unpin,
    <T as Config>::AssetId: Unpin,
    <T as Config>::Balance: Unpin,
    <<T as Config>::Lookup as StaticLookup>::Source: Unpin

impl<T> UnwindSafe for Call<T> where
    T: UnwindSafe,
    <T as Config>::AssetId: UnwindSafe,
    <T as Config>::Balance: UnwindSafe,
    <<T as Config>::Lookup as StaticLookup>::Source: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Decode + Encode
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynClone for T where
    T: Clone
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: ToOwned + Encode
[src]

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 
[src]

impl<T> Hashable for T where
    T: Codec
[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

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

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

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Member for T where
    T: 'static + Send + Sync + Debug + Eq + PartialEq<T> + Clone
[src]

impl<T> Parameter for T where
    T: Codec + EncodeLike<T> + Clone + Eq + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

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

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