-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nonfungibles): add pallet-api/nonfungibles
#388
feat(nonfungibles): add pallet-api/nonfungibles
#388
Conversation
…fts' into chungquantin/feat-nfts
pallet-api/nonfungibles
pallet-api/nonfungibles
/// The namespace of the attribute. | ||
namespace: AttributeNamespaceOf<T>, | ||
/// The key of the attribute. | ||
key: BoundedVec<u8, T::KeyLimit>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
6ab88c1
to
f83bdc5
Compare
3dd9a9e
into
chungquantin/feat-main_pallet_nonfungibles
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
origin
to accountto
.One extra storage read for the collection item owner to emit it in the
Transfer
event.approve()
Either approve or cancel approval for an
operator
to perform transfers of a specific collection item or all collection items owned by theorigin
.approved
- A boolean indicating the desired approval status:true
to approve theoperator
.false
to 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
delegate
will 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 byowner
tooperator
changes.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 anoperator
approved 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.