mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 06:11:07 +00:00
Document weight for asset, system and timestamp pallets (#5593)
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -158,6 +158,13 @@ decl_module! {
|
||||
/// Issue a new class of fungible assets. There are, and will only ever be, `total`
|
||||
/// such assets and they'll all belong to the `origin` initially. It will have an
|
||||
/// identifier `AssetId` instance: this will be specified in the `Issued` event.
|
||||
///
|
||||
/// # <weight>
|
||||
/// - `O(1)`
|
||||
/// - 1 storage mutation (codec `O(1)`).
|
||||
/// - 2 storage writes (condec `O(1)`).
|
||||
/// - 1 event.
|
||||
/// # </weight>
|
||||
#[weight = MINIMUM_WEIGHT]
|
||||
fn issue(origin, #[compact] total: T::Balance) {
|
||||
let origin = ensure_signed(origin)?;
|
||||
@@ -172,6 +179,13 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Move some assets from one holder to another.
|
||||
///
|
||||
/// # <weight>
|
||||
/// - `O(1)`
|
||||
/// - 1 static lookup
|
||||
/// - 2 storage mutations (codec `O(1)`).
|
||||
/// - 1 event.
|
||||
/// # </weight>
|
||||
#[weight = MINIMUM_WEIGHT]
|
||||
fn transfer(origin,
|
||||
#[compact] id: T::AssetId,
|
||||
@@ -191,6 +205,13 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Destroy any assets of `id` owned by `origin`.
|
||||
///
|
||||
/// # <weight>
|
||||
/// - `O(1)`
|
||||
/// - 1 storage mutation (codec `O(1)`).
|
||||
/// - 1 storage deletion (codec `O(1)`).
|
||||
/// - 1 event.
|
||||
/// # </weight>
|
||||
#[weight = MINIMUM_WEIGHT]
|
||||
fn destroy(origin, #[compact] id: T::AssetId) {
|
||||
let origin = ensure_signed(origin)?;
|
||||
|
||||
Reference in New Issue
Block a user