r0gue-io / pop-node

Pop Network makes it easy for smart contract developers to use the Power of Polkadot.
The Unlicense
24 stars 6 forks source link

feat(devnet): pop-api + non-fungibles use case #335

Open chungquantin opened 1 month ago

chungquantin commented 1 month ago

Nonfungible contracts size:

Original wasm size: 61.5K, Optimized: 21.7K

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:

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;

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

chungquantin commented 3 days ago