Closed chungquantin closed 3 weeks ago
Attention: Patch coverage is 79.39815%
with 356 lines
in your changes missing coverage. Please review.
Project coverage is 70.06%. Comparing base (
0460a44
) to head (1943669
).
@@ Coverage Diff @@
## chungquantin/sub0-pallet_nfts #353 +/- ##
=================================================================
+ Coverage 67.37% 70.06% +2.68%
=================================================================
Files 69 72 +3
Lines 11731 12975 +1244
Branches 11731 12975 +1244
=================================================================
+ Hits 7904 9091 +1187
- Misses 3568 3608 +40
- Partials 259 276 +17
Files with missing lines | Coverage Δ | |
---|---|---|
pallets/api/src/fungibles/mod.rs | 92.59% <ø> (ø) |
|
pallets/api/src/fungibles/tests.rs | 99.73% <100.00%> (+0.03%) |
:arrow_up: |
pallets/api/src/mock.rs | 100.00% <100.00%> (ø) |
|
pallets/api/src/nonfungibles/tests.rs | 100.00% <100.00%> (ø) |
|
pallets/nfts/src/benchmarking.rs | 85.79% <ø> (ø) |
|
pallets/nfts/src/common_functions.rs | 81.39% <100.00%> (+1.39%) |
:arrow_up: |
...lets/nfts/src/features/create_delete_collection.rs | 84.70% <100.00%> (+0.36%) |
:arrow_up: |
pallets/nfts/src/features/create_delete_item.rs | 89.56% <100.00%> (+0.35%) |
:arrow_up: |
pallets/nfts/src/tests.rs | 99.88% <100.00%> (+<0.01%) |
:arrow_up: |
pallets/nfts/src/types.rs | 67.11% <ø> (ø) |
|
... and 9 more |
Nonfungible contracts size:
Description
In an effort to provide a unifying experience for developers to access runtime functionality for non-fungible tokens, APIs compliant to the PSP34 standard will be provided, as well as a set of extra functions (see Management). The interface as defined by this specification will be accessible for smart contracts via:
Note that the lack of version equals latest. As an example, the user could explicitly specify the version as:
The PR includes changes made to the forked pallet-nfts following what has been discussed in the internal spec. Introducing two new pallets;
pallets/nfts
: Changes made to the forked version to add new storage itemsAccountBalance
andAllowances
and update the following logic + unit tests to support the new storage items.pallets/api/nonfungibles
: Built on top of thepallet-nfts
to expose READs and DISPATCHs for pop-api library.The Nonfungible API provides the contract ability to mint / burn a new item, transfer and approve following the PSP34 Standard. There are additional features to manage the Nonfungible such as create / destroy a collection, set / clear metadata, set / clear / approve / cancel_approve item attribute.
Becnhmarking:
AccountBalance
read case.approved_transfer
,transfer
andcancel_approval
to countAllowances
storage read.