NEP11

May 14, 2024 2:47:57 PM

What is NEP-11?

NEP-11 is a standard for creating non-fungible tokens (NFTs) on the Neo blockchain. NFTs are unique digital assets that represent ownership of a specific item, such as art, collectibles, or virtual real estate. By following the NEP-11 standard, developers can create NFTs that are interoperable with various applications and smart contracts on the Neo platform.

The implementation of NEP-11 tokens is similar to the ERC-721 standard on Ethereum, providing a common set of rules for creating and managing NFTs. NEP-11 tokens are unique, indivisible, and can have metadata associated with them, providing additional information about the asset they represent. Developers can use the onNEP17Payment method to mint new NFTs when it receive cryptocurrency payments, including NEO and GAS.

While cryptocurrencies like NEO and GAS are fungible tokens that are traded in exchanges, NFTs are bought and sold based on marketplaces and auctions. Each NFT has a unique token ID that distinguishes it from other tokens, allowing users to verify ownership and transfer the asset securely.

Royalties are defined in the NEP-24 standard, allowing creators to earn a percentage of the resale value when their NFTs are sold in secondary markets.

Divisible NFTs

NEP-11 tokens can be divisible, allowing users to own a fraction of an NFT. This feature is useful for high-value assets that can be shared among multiple owners, such as real estate or investment funds. The implementation of divisible NFTs is more complex than indivisible tokens, as it requires additional logic to manage ownership and transfer of fractional shares.

Key Concepts — NEP-11

  • Non-Fungible Tokens (NFTs): Unique digital assets that represent ownership of a specific item.
  • Properties: NFTs can have metadata associated with them, providing additional information about the asset.
  • Token ID: A unique identifier for each NFT, used to distinguish between different tokens.
  • Minting: The process of creating new NFTs, often triggered by specific events or conditions.
  • Not just for Art: NFTs can represent various assets, including collectibles, in-game items and real-world assets.
  • Rarity: The scarcity of an NFT can affect its value, with rarer items often fetching higher prices.
  • Legal in Most Jurisdictions: Different from cryptocurrencies, NFTs can be sold and traded legally in most countries.

NEP-11 Standard

The NEP-11 standard defines the interface for NFT contracts on the Neo blockchain. It defines the following methods, events and callbacks that NFT contracts should implement to be compatible with the standard.

The methods defined in the NEP-11 standard are:

  • name: Returns the name of the NFT contract.
  • symbol: Returns the symbol of the NFT contract.
  • decimals: Returns the number of decimals used for token balances.
  • totalSupply: Returns the total number of NFTs issued by the contract.
  • balanceOf: Returns the number of NFTs owned by a specific address.
  • properties: Returns the metadata associated with a specific NFT.
  • ownerOf: Returns the owner of a specific NFT. (Optional)

The following events and callbacks are defined in the NEP-11 standard:

  • Transfer: Triggered when an NFT is transferred from one address to another.
  • onNEP11Payment: Triggered when the contract receives a payment in NEP-11 tokens.