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:
use pop_api::nonfungibles::<function>;
Note that the lack of version equals latest. As an example, the user could explicitly specify the version as:
use pop_api::v0::nonfungibles::<function>;
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 items AccountBalance and Allowances and update the following logic + unit tests to support the new storage items.
pallets/api/nonfungibles: Built on top of the pallet-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.
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.
pallet + pop-api
example contracts
pop-drink