Share on Twitter
Share on Facebook
Share on Reddit
Share via Email
Share on LinkedIn
Share via RSS
Share on Google+

The development team Splyse, known for NEO projects such as HashPuppies and Master Contract Token, has released an updated non-fungible token smart contract template for the NEO blockchain. The version 2.0 contract, which is written in Python, is noted to be a “significant re-write” when compared to the original template.

Non-fungible Tokens

Unlike NEP-5 tokens, which are fungible (identical and therefore interchangeable), non-fungible tokens (NFTs) are used to represent unique assets. This allows them to act as digitized counterparts to physical assets, giving them a wide range of potential applications.

An NFT could be used to represent a legal document, an access key or a physical commodity. They are also commonly used for virtual game items, as they can be easily traded between players to create a permissionless marketplace with real-world value.

Python Template

Splyse provided an example NFT contract written in Python that can be found here, which allows new NFTs to be minted and sent to a specified address. The example code includes comments that explain noteworthy details, such as how to specify the owner of the contract, the various event notifications and common errors.

One notable difference when compared to the NEP-5 token standard is the inclusion of a URI (unique resource identifier) method. The URI would typically take the form of a URL pointing to an image, allowing an asset’s uniqueness to be visually represented in a form that can easily be comprehended by human eyes.

Operations are also included that allow properties to be defined as read-only or read/write data. This allows greater flexibility by allowing an NFT to evolve or adapt without requiring a new contract or token swap.

The template also includes some overlap with operations defined in the NEP-5 token standard, with the intention of making adoption easier for API writers. It also includes support for NEP-10, Composite Smart Contracts, which refers to the supportedStandards operation that allows a contract to declare which NEP specifications it conforms to.

NFT Standard Proposal

The contract template is an example that follows the NFT standard submitted by Splyse as a NEO Enhancement Proposal. This token standard proposal has been marked as accepted and is now pending finalization.

The standard will be finalized following testing and experimentation by developers, who can build and deploy their NFT contracts following the standard on TestNet in an effort to detect any potential shortcomings.

The discussion on the proposal may be found here.