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.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -64,13 +64,13 @@
pub enum Error<T> {
/// Not Refungible item data used to mint in Refungible collection.
NotRefungibleDataUsedToMintFungibleCollectionToken,
- /// Maximum refungibility exceeded
+ /// Maximum refungibility exceeded.
WrongRefungiblePieces,
- /// Refungible token can't be repartitioned by user who isn't owns all pieces
+ /// Refungible token can't be repartitioned by user who isn't owns all pieces.
RepartitionWhileNotOwningAllPieces,
- /// Refungible token can't nest other tokens
+ /// Refungible token can't nest other tokens.
RefungibleDisallowsNesting,
- /// Setting item properties is not allowed
+ /// Setting item properties is not allowed.
SettingPropertiesNotAllowed,
}
@@ -605,7 +605,6 @@
Ok(())
}
- /// todo:doc oh look, a precedent. not pub, too. but it has an unclear use-case.
/// Returns allowance, which should be set after transaction
fn check_allowed(
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.rsdiffbeforeafterboth286 }286 }287}287}288288289/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version)289/// Collection parameters, used in storage (see [`RpcCollection`] for the RPC version).290#[struct_versioning::versioned(version = 2, upper)]290#[struct_versioning::versioned(version = 2, upper)]291#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]291#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]292pub struct Collection<AccountId> {292pub struct Collection<AccountId> {327 pub meta_update_permission: MetaUpdatePermission,327 pub meta_update_permission: MetaUpdatePermission,328}328}329329330/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version)330/// Collection parameters, used in RPC calls (see [`Collection`] for the storage version).331#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]331#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]332#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]332#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]333pub struct RpcCollection<AccountId> {333pub struct RpcCollection<AccountId> {568 ReFungible(CreateReFungibleData),568 ReFungible(CreateReFungibleData),569}569}570570571/// Explicit NFT creation data with meta parameters571/// Explicit NFT creation data with meta parameters.572#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]572#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]573#[derivative(Debug)]573#[derivative(Debug)]574pub struct CreateNftExData<CrossAccountId> {574pub struct CreateNftExData<CrossAccountId> {577 pub owner: CrossAccountId,577 pub owner: CrossAccountId,578}578}579579580/// Explicit RFT creation data with meta parameters580/// Explicit RFT creation data with meta parameters.581#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]581#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]582#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]582#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]583pub struct CreateRefungibleExData<CrossAccountId> {583pub struct CreateRefungibleExData<CrossAccountId> {587 pub users: BoundedBTreeMap<CrossAccountId, u128, ConstU32<MAX_ITEMS_PER_BATCH>>,587 pub users: BoundedBTreeMap<CrossAccountId, u128, ConstU32<MAX_ITEMS_PER_BATCH>>,588}588}589589590/// Explicit item creation data with meta parameters, namely the owner590/// Explicit item creation data with meta parameters, namely the owner.591#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]591#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, TypeInfo, Derivative)]592#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]592#[derivative(Debug(bound = "CrossAccountId: fmt::Debug + Ord"))]593pub enum CreateItemExData<CrossAccountId> {593pub enum CreateItemExData<CrossAccountId> {635 }635 }636}636}637637638/// Token's address, dictated by its collection and token IDs638/// Token's address, dictated by its collection and token IDs.639#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]639#[derive(Encode, Decode, MaxEncodedLen, PartialEq, Clone, Debug, TypeInfo)]640#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]640#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]641// todo possibly rename to be used generally as an address pair641// todo possibly rename to be used generally as an address pair