Giter Site home page Giter Site logo

neo-nft-template's Introduction

Neo Non-Fungible Token Template

What is a non-fungible token?

A non-fungible token (NFT) can be thought of like a property deed - each one is unique and carries some non-mutable information (e.g. the physical address of the property) although other information, such as the owner of the property can be changed. An NFT smart contract is useful to track ownership of real-world items, as well as in online gaming, allowing users to posess unique characters or items of a limited supply, that can be transferred between users without requiring the permission of the game owner.

The NFT proposal standard for the Neo Smart Economy is currently in development. This is a draft template example in Python showing how such a smart contract might be written. There is some overlap between NEP-5 (fungible) token functionality to make adoption easier by API writers.

Smart Contract Operations

The operations of the NFT template contract are:

  • allowance(tokenid): returns approved third-party spender of a token
  • approve(owner, spender, tokenid, revoke): approve third party to spend a token
  • balanceOf(owner): returns owner's current total tokens owned
  • circulation(): returns current number of tokens in circulation
  • decimals(): returns number of decimals of token
  • mintToken(owner, ROData, RWData, URI): create a new NFT token
  • modifyRWData(tokenid, RWData): modify a token's read/write data
  • modifyURI(tokenid, URI): modify a token's URI
  • name(): returns name of token
  • ownerOf(tokenid): returns owner of a token
  • symbol(): returns token symbol
  • tokenOfOwnerByIndex(owner, idx): returns one token from owner's collection
  • tokenROData(tokenid): returns a token's read-only data
  • tokenRWData(tokenid): returns a token's read/write data
  • tokenURI(tokenid): returns a token's URI
  • transfer(from, to, tokenid): transfers a token
  • transferFrom(from, to, tokenid): transfers a token by authorized spender

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.