feat(nonfungibles): add pallet-api/nonfungibles#388
Merged
chungquantin merged 143 commits intochungquantin/feat-main_pallet_nonfungiblesfrom Jan 16, 2025
Merged
Conversation
…fts' into chungquantin/feat-nfts
pallet-api/nonfungiblespallet-api/nonfungibles
20 tasks
chungquantin
commented
Nov 19, 2024
| /// The namespace of the attribute. | ||
| namespace: AttributeNamespaceOf<T>, | ||
| /// The key of the attribute. | ||
| key: BoundedVec<u8, T::KeyLimit>, |
Contributor
Author
There was a problem hiding this comment.
Could this parameter be changed to Vec and we handle the length check in the runtime, so contract api implementation does not need to handle it?
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## frank/nfts-balance-deposit #388 +/- ##
==============================================================
+ Coverage 70.65% 73.05% +2.39%
==============================================================
Files 72 77 +5
Lines 13207 14628 +1421
Branches 13207 14628 +1421
==============================================================
+ Hits 9332 10686 +1354
- Misses 3604 3672 +68
+ Partials 271 270 -1
|
6c8d5b6 to
df965e1
Compare
f4c02f7 to
1aa79f3
Compare
Base automatically changed from
frank/nfts-balance-deposit
to
chungquantin/feat-nfts
January 9, 2025 15:13
6ab88c1 to
f83bdc5
Compare
3dd9a9e
into
chungquantin/feat-main_pallet_nonfungibles
7 of 19 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The non-fungibles pallet offers a streamlined interface for interacting with non-fungible assets. The goal is to provide a simplified, consistent API that adheres to standards in the smart contract space. Built on top of the optimized version of the
pallet-nfts(See #387).CHANGELOG
Dispatchable Functions
transfer()
Transfers the collection item from the
originto accountto.One extra storage read for the collection item owner to emit it in the
Transferevent.approve()
Either approve or cancel approval for an
operatorto perform transfers of a specific collection item or all collection items owned by theorigin.approved- A boolean indicating the desired approval status:trueto approve theoperator.falseto cancel the approval granted to theoperator.clear_all_transfer_approvals()
Cancel all the approvals of a specific item.
clear_collection_approvals()
Cancel approvals to transfer all owner's collection items.
create()
Issue a new collection of non-fungible items from a public origin.
destroy()
Destroy a collection of fungible items.
set_attribute()
Set an attribute for a collection or item.
clear_attribute()
Clear an attribute for the collection or item.
set_metadata()
Set the metadata for an item.
approve_item_attribute()
cancel_item_attributes_approval()
Cancel the previously provided approval to change item's attributes. All the previously set attributes by the
delegatewill be removed.set_max_supply()
Set the maximum number of items a collection could have.
mint()
Mint an item of a particular collection.
burn()
Destroy a single collection item.
Events
Approval: Event emitted when allowance byownertooperatorchanges.Transfer: Event emitted when a token transfer occurs.Created: Event emitted when a collection is created.Reads
TotalSupply: Total item supply of a specifiedcollection.BalanceOf: Account balance for a specifiedcollection.Allowance: Allowance for anoperatorapproved by anowner, for a specified collection or item.OwnerOf: Owner of a specified collection item.GetAttribute: Attribute value of a specified collection item.Collection: Details of a specified collection.NextCollectionId: Next collection ID.ItemMetadata: Metadata of a specified collection item.Read Result
Results of state reads for the non-fungibles API.