-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change(pallet-assets): improve documentation
- Loading branch information
Showing
2 changed files
with
9 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
pub mod sufficiency { | ||
use sp_runtime::DispatchResult; | ||
|
||
/// Trait for providing the sufficient state of an asset. | ||
/// Trait for providing the sufficiency of an asset. | ||
pub trait Inspect<AssetId> { | ||
/// Returns whether an asset is sufficient or not. | ||
fn is_sufficient(asset_id: AssetId) -> bool; | ||
} | ||
|
||
/// Trait for mutating the sufficient state of an asset | ||
/// Trait for mutating the sufficiency of an asset | ||
pub trait Mutate<AssetId> { | ||
/// Makes the asset to be sufficient. | ||
/// | ||
/// ### Errors | ||
/// | ||
/// - [`Unknown`][crate::Error::Unknown] when the asset ID is unknown. | ||
/// Makes the asset sufficient. | ||
fn make_sufficient(asset_id: AssetId) -> DispatchResult; | ||
|
||
/// Makes the asset to be insufficient. | ||
/// | ||
/// ### Errors | ||
/// | ||
/// - [`Unknown`][crate::Error::Unknown] when the asset ID is unknown. | ||
/// Makes the asset insufficient. | ||
fn make_insufficient(asset_id: AssetId) -> DispatchResult; | ||
} | ||
} |