difftreelog
doc: minor fixes + typos
in: master
7 files changed
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -50,6 +50,7 @@
account: CrossAccountId,
at: Option<BlockHash>,
) -> Result<Vec<TokenId>>;
+
/// Get tokens contained in collection
#[method(name = "unique_collectionTokens")]
fn collection_tokens(
@@ -57,6 +58,7 @@
collection: CollectionId,
at: Option<BlockHash>,
) -> Result<Vec<TokenId>>;
+
/// Check if token exists
#[method(name = "unique_tokenExists")]
fn token_exists(
@@ -65,6 +67,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<bool>;
+
/// Get token owner
#[method(name = "unique_tokenOwner")]
fn token_owner(
@@ -73,6 +76,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<Option<CrossAccountId>>;
+
/// Get token owner, in case of nested token - find the parent recursively
#[method(name = "unique_topmostTokenOwner")]
fn topmost_token_owner(
@@ -81,6 +85,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<Option<CrossAccountId>>;
+
/// Get tokens nested directly into the token
#[method(name = "unique_tokenChildren")]
fn token_children(
@@ -89,6 +94,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<Vec<TokenChild>>;
+
/// Get collection properties
#[method(name = "unique_collectionProperties")]
fn collection_properties(
@@ -97,6 +103,7 @@
keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<Property>>;
+
/// Get token properties
#[method(name = "unique_tokenProperties")]
fn token_properties(
@@ -106,6 +113,7 @@
keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<Property>>;
+
/// Get property permissions
#[method(name = "unique_propertyPermissions")]
fn property_permissions(
@@ -114,6 +122,7 @@
keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<Vec<PropertyKeyPermission>>;
+
/// Get token data
#[method(name = "unique_tokenData")]
fn token_data(
@@ -123,9 +132,11 @@
keys: Option<Vec<String>>,
at: Option<BlockHash>,
) -> Result<TokenData<CrossAccountId>>;
+
/// Get amount of unique collection tokens
#[method(name = "unique_totalSupply")]
fn total_supply(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<u32>;
+
/// Get owned amount of any user tokens
#[method(name = "unique_accountBalance")]
fn account_balance(
@@ -134,6 +145,7 @@
account: CrossAccountId,
at: Option<BlockHash>,
) -> Result<u32>;
+
/// Get owned amount of specific account token
#[method(name = "unique_balance")]
fn balance(
@@ -143,6 +155,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<String>;
+
/// Get allowed amount
#[method(name = "unique_allowance")]
fn allowance(
@@ -153,6 +166,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<String>;
+
/// Get admin list
#[method(name = "unique_adminlist")]
fn adminlist(
@@ -160,6 +174,7 @@
collection: CollectionId,
at: Option<BlockHash>,
) -> Result<Vec<CrossAccountId>>;
+
/// Get allowlist
#[method(name = "unique_allowlist")]
fn allowlist(
@@ -167,6 +182,7 @@
collection: CollectionId,
at: Option<BlockHash>,
) -> Result<Vec<CrossAccountId>>;
+
/// Check if user is allowed to use collection
#[method(name = "unique_allowed")]
fn allowed(
@@ -175,9 +191,11 @@
user: CrossAccountId,
at: Option<BlockHash>,
) -> Result<bool>;
+
/// Get last token ID created in a collection
#[method(name = "unique_lastTokenId")]
fn last_token_id(&self, collection: CollectionId, at: Option<BlockHash>) -> Result<TokenId>;
+
/// Get collection by specified ID
#[method(name = "unique_collectionById")]
fn collection_by_id(
@@ -185,9 +203,11 @@
collection: CollectionId,
at: Option<BlockHash>,
) -> Result<Option<RpcCollection<AccountId>>>;
+
/// Get collection stats
#[method(name = "unique_collectionStats")]
fn collection_stats(&self, at: Option<BlockHash>) -> Result<CollectionStats>;
+
/// Get number of blocks when sponsored transaction is available
#[method(name = "unique_nextSponsored")]
fn next_sponsored(
@@ -197,6 +217,7 @@
token: TokenId,
at: Option<BlockHash>,
) -> Result<Option<u64>>;
+
/// Get effective collection limits
#[method(name = "unique_effectiveCollectionLimits")]
fn effective_collection_limits(
@@ -204,6 +225,7 @@
collection_id: CollectionId,
at: Option<BlockHash>,
) -> Result<Option<CollectionLimits>>;
+
/// Get total pieces of token
#[method(name = "unique_totalPieces")]
fn total_pieces(
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -334,7 +334,7 @@
///
/// * collection_id: ID of the collection to which the item belongs.
///
- /// * item_id: ID of the item trasnferred.
+ /// * item_id: ID of the item transferred.
///
/// * sender: Original owner of the item.
///
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -58,13 +58,13 @@
pub enum Error<T> {
/// Not Fungible item data used to mint in Fungible collection.
NotFungibleDataUsedToMintFungibleCollectionToken,
- /// Not default id passed as TokenId argument
+ /// Not default id passed as TokenId argument.
FungibleItemsHaveNoId,
- /// Tried to set data for fungible item
+ /// Tried to set data for fungible item.
FungibleItemsDontHaveData,
- /// Fungible token does not support nested
+ /// Fungible token does not support nesting.
FungibleDisallowsNesting,
- /// Setting item properties is not allowed
+ /// Setting item properties is not allowed.
SettingPropertiesNotAllowed,
}
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -171,7 +171,7 @@
QueryKind = ValueQuery,
>;
- /// Amount of tokens owned in a collection.s
+ /// Amount of tokens owned in a collection.
#[pallet::storage]
pub type AccountBalance<T: Config> = StorageNMap<
Key = (
@@ -182,7 +182,7 @@
QueryKind = ValueQuery,
>;
- /// todo doc
+ /// todo:doc
#[pallet::storage]
pub type Allowance<T: Config> = StorageNMap<
Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
pallets/refungible/src/lib.rsdiffbeforeafterboth64 pub enum Error<T> {64 pub enum Error<T> {65 /// Not Refungible item data used to mint in Refungible collection.65 /// Not Refungible item data used to mint in Refungible collection.66 NotRefungibleDataUsedToMintFungibleCollectionToken,66 NotRefungibleDataUsedToMintFungibleCollectionToken,67 /// Maximum refungibility exceeded67 /// Maximum refungibility exceeded.68 WrongRefungiblePieces,68 WrongRefungiblePieces,69 /// Refungible token can't be repartitioned by user who isn't owns all pieces69 /// Refungible token can't be repartitioned by user who isn't owns all pieces.70 RepartitionWhileNotOwningAllPieces,70 RepartitionWhileNotOwningAllPieces,71 /// Refungible token can't nest other tokens71 /// Refungible token can't nest other tokens.72 RefungibleDisallowsNesting,72 RefungibleDisallowsNesting,73 /// Setting item properties is not allowed73 /// Setting item properties is not allowed.74 SettingPropertiesNotAllowed,74 SettingPropertiesNotAllowed,75 }75 }7676605 Ok(())605 Ok(())606 }606 }607607608 /// todo:doc oh look, a precedent. not pub, too. but it has an unclear use-case.609 /// Returns allowance, which should be set after transaction608 /// Returns allowance, which should be set after transaction610 fn check_allowed(609 fn check_allowed(611 collection: &RefungibleHandle<T>,610 collection: &RefungibleHandle<T>,pallets/structure/src/lib.rsdiffbeforeafterboth--- a/pallets/structure/src/lib.rs
+++ b/pallets/structure/src/lib.rs
@@ -31,7 +31,7 @@
DepthLimit,
/// While iterating over children, reached the breadth limit.
BreadthLimit,
- /// Couldn't find the token owner that is a token. Perhaps, it does not yet exist. todo:doc? rephrase?
+ /// Couldn't find the token owner that is itself a token.
TokenNotFound,
}
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -286,7 +286,7 @@
}
}
-/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version)
+/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version).
#[struct_versioning::versioned(version = 2, upper)]
#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
pub struct Collection<AccountId> {
@@ -327,7 +327,7 @@
pub meta_update_permission: MetaUpdatePermission,
}
-/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version)
+/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version).
#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct RpcCollection<AccountId> {
@@ -568,7 +568,7 @@
ReFungible(CreateReFungibleData),
}
-/// Explicit NFT creation data with meta parameters
+/// Explicit NFT creation data with meta parameters.
#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
#[derivative(Debug)]
pub struct CreateNftExData<CrossAccountId> {
@@ -577,7 +577,7 @@
pub owner: CrossAccountId,
}
-/// Explicit RFT creation data with meta parameters
+/// Explicit RFT creation data with meta parameters.
#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]
pub struct CreateRefungibleExData<CrossAccountId> {
@@ -587,7 +587,7 @@
pub users: BoundedBTreeMap<CrossAccountId, u128, ConstU32<MAX_ITEMS_PER_BATCH>>,
}
-/// Explicit item creation data with meta parameters, namely the owner
+/// Explicit item creation data with meta parameters, namely the owner.
#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]
#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]
pub enum CreateItemExData<CrossAccountId> {
@@ -635,7 +635,7 @@
}
}
-/// Token's address, dictated by its collection and token IDs
+/// Token's address, dictated by its collection and token IDs.
#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
// todo possibly rename to be used generally as an address pair