Non-Fungible Tokens (NFTs): A View into the Future

NFT is the modern representation of unique assets made possible by blockchain technology. To understands the whole picture that drives NFT adoption, we first need to define what an NFT is.

What Is an NFT?

An NFT, as its acronym indicates, is a Non-Fungible Token. This means that it is a token or cryptocurrency that represents the unique value of something, where that something can be anything we currently know in the world. One of the most used abstractions to explain NFTs is art. An NFT can be considered a work of art that cannot be replicated: there is only one original, with unique value and unique characteristics. Taking the concept to blockchain technology, an NFT is a unique value that cannot be changed or replaced by something else within the blockchain.

What Are the Current Uses of an NFT?

Recall the use of centennials, which are coins minted in different metals of X or Y value. These used to be purchased for safekeeping as an investment, and sell later for a higher price than they were purchased for. Today, NFTs are generated for similar use.

Currently, there are several networks or blockchains dedicated to specific markets such as collectors' networks, that are decentralized applications (dApps) running over the Internet. For example, in the case of digital art, different dApps have the functionality to sell / buy / exchange digital content such as images.

Other current uses of NFTs include validating copyrights, representing a person as the sole owner of virtual real estate, and as a security key. Among some famous applications using NFTs, we find CryptoKitties, Decentraland, Ether Legends, RareBits, and OpenSea.

Potential Use Cases for NFTs in the Future?

Many experts are betting on more extensive use of these Non-Fungible Tokens. There is a possibility that they could be leveraged in use cases that we could not even imagine now.

One use for which NFTs are favored is their function as ownership documents, not only of digital and/or physical real estate, but of anything, and even as official identification that endorses a person as an existing human being (to avoid fraud and identity theft).

It has also been mentioned that they can be used as an access card to universities and to certify if a certain level of schooling is met. Another area where the use of NFTs has also been considered is in the market for the sale of experiences (travel agencies, flights, etc.). Here the idea would be to exchange NFT Tickets with individuals without the need to outsource the service to airlines, travel agencies, and others.

Creating NFTs

To generate NFTs, a basic knowledge of object-oriented programming and handling of languages such as Solidity, and JavaScript (for the creation of Decentralized Applications or dApps), knowledge of how the blockchain works, and of course the ERC-271 standard is required. We will briefly touch on each of these concepts and definitions below.

  • Solidity is the specific language used to code Smart Contracts on various blockchain platforms. Smart contracts are simple programs that are stored in the blockchain and are executed when certain conditions, usually defined in the program, are met.
  • JavaScript, together with tools like HTML, CSS, and other frameworks, helps us to develop the user interface part of the application that connects to the blockchain. These web applications are called dApps.
  • dApps is the abbreviation for 'Decentralized Applications', which as the name suggests, are applications that can access any part of the blockchain without needing to live on a server with a backend that supports them; the backend for our dApps will be the Smart Contract.
  • The ERC721 standard is a series of interfaces developed in Solidity, used as templates with which any developer wishing to create NFTs, must comply. These interfaces define action methods such as the following: mining, token transfer, token query, token owner query, token validation and approval, etc.; these are the functionalities that our Smart Contract will work with.

The following are some of the tools needed to set up a local test environment and start developing our NFTs:

  •  A wallet in MetaMask to be able to connect to different blockchain networks, including the one we raise locally.
    Picture1-Nov-29-2022-04-10-49-8072-AM
  • Install Truffle Ganache, which is an Ethereum blockchain simulator, with a graphical interface that allows us to consult the blocks that we generate, as well as to see their metadata.
    Picture2-Nov-29-2022-04-11-32-3339-AM

Truffle is a command-line client that allows us to compile, deploy and execute the methods we create in our Smart Contract. It connects directly to the blockchain through the configuration we indicate.

Picture3-Nov-29-2022-04-12-03-6048-AM

We can use any IDE that supports Solidity as a programming language. Among the most popular ones are IntelliJ IDEA and Visual Code Studio, along with the installation of the corresponding Solidity plugin.

With all these tools previously installed and correctly configured, we can create a new project in the desired IDE. Below is an example of how a similar project can be organized.

 

Picture4-Nov-29-2022-04-12-31-6191-AM

Where:

  • The migrations directory contains the *.js files that will allow us to link our dApp with the blockchain.
  • The node_modules directory contains all the libraries that we will use from Node for our project. Here it is key to mention that within these libraries there is a very special one called Open Zeppelin Contracts (@openzepplin/contracts); this will help us to securely develop our Smart Contracts, as it ensures that we follow the development standards for NFTs.The public directory will contain all the public elements of our dApp, such as favicon.ico, index.html, etc.
    • The src directory contains all the source codes of our project. Inside this directory we highlight:
    o A subdirectory named contracts - will contain everything related to the contract we want to develop: our contract, the interfaces it depends on, auxiliary classes, etc.
    o abis directory - contains all the configuration files that are created when compiling the project.

The following is a code fragment of a Smart Contract, which we will use to review various points that we must comply with.

A Smart Contract is not an endless code file, as we can see.

Picture5-Nov-29-2022-04-15-23-0727-AM

Here we can see that the main Smart Contract is KryptoBird and it is inheriting ERC721Connector, which in turn is a contract that contains all the inheritance and use of the ERC-721 standard interfaces. The following UML diagram illustrates the correct way to handle inheritance to comply with the ERC-721 standard in an orderly manner.

Picture6-1

As a summary, these pieces of information code implement the kryptoBirdz, which are nothing more than tokens representing collectible virtual cards. Understanding these basics, as well as knowing concepts and tools, we canembark on some new application ideas for NFTs.

Conclusion:

NFTs represent a potentially important asset class driven by the unique properties of underlying blockchains. They enable creation of unique digital assets and digital ownership. They also represent key pieces of the emerging metaverse economy.

About Encora

Fast-growing tech companies partner with Encora to outsource product development and drive growth. Contact us to learn more about our software engineering capabilities.

Share this post

Table of Contents