Specific token standards have been created to support the use of a blockchain in games. These include CryptoKitties' Ethereum ERC-721 standard and the more recent Ethereum ERC-1155 standard.
Ethereum ERC-721 Non-Fungible Token Standard
Ethereum ERC-721 was the first standard for the representation of non-fungible digital assets and standardised interface for creating NFTs. ERC-721 is a Solidity contract standard. It is inheritable, which means that developers can easily create new ERC-721 compliant contracts by importing the OpenZeppelin library. ERC-721 is a free, open standard that describes how to create unique or distinctive tokens on the Ethereum blockchain. Although most tokens are interchangeable (each token is the same as any other token), all ERC-721 tokens are unique.
ERC-721t is the most widely used. It is unchanging, transparent in ownership and security. Consequently, it is not interchangeable, a true NFT. It cannot be separated and is a single asset that exchanges places. It is great for creating and keeping track of unique NFTs. Although transferable, trying to transfer an entire collection with it can be slow and inefficient.
However, the biggest problem with the ERC-721 is that at a high gas price, creating an NFT can cost the artist a tidy sum in Etheruem. So when you need to mint NFTs in bulk, it doesn't make sense to use this contract.
Each NFT is identified using a
uint256 identifier. They can be transferred by two different functions:
SafeTransferFrom(), which verifies that
msg.sender, i.e. the user running the function, is the owner of the token or an authorised user who is allowed to transfer the token.
- Unprotected trasfer
transferFrom()without prior authorisation. The developer of the token is responsible for implementing a snippet of code in this function, which checks whether the person responsible for calling the function is authorized to do so. In this function, the user calling it must also make sure that the recipient is authorised to receive the token. If these checks are not met, tokens can be lost forever.
ERC721 tokens must implement the proposed ERC165 interface. This standard allows the detection of interfaces implemented in the contract. This is really useful because it allows to detect the interface that the token implements and therefore to adapt the method/code to interact with it.
ERC721 was written to standardise non-interchangeable tokens. By standardising NFT, the development community has opened up a new ecosystem of digital content, games and applications that use NFT. Thanks to ERC721 we have things like Decentraland, CryptoBeasties, Etheremon and CryptoKitties.
Ethereum ERC-1155 Multi Token Standard
The Ethereum ERC-1155 standard, brings the concept of semi-fungibility to the NFT world and provides a superset of ERC-721 functionality, meaning that an ERC-721 token could be built using ERC1155.
ERC-1155 is a NFT standard that supports interchangeable (NFT) and interchangeable tokens. It is faster and more efficient to use when batching tokens. Developed by Enjin, it is referred to as the "next generation multiple token standard".
ERC-1155 can use a single contract to create different types of NFTs. The fee is reduced by 90%, making it affordable for anyone who wants to start mining on the blockchain. The only real disadvantage is that NFTs are harder to track from an ownership perspective - ERC-1155 has Etheruem log specifications, which contain less reliable information, to preserve the data stored in the blockchain.
Standard interface for contracts managing multiple token types. A single deployed contract can include any combination of interchangeable tokens, non-interchangeable tokens or other configurations (e.g. semi-exchangeable tokens).
Token standards such as ERC-20 and ERC-721 require the deployment of a separate contract for each interchangeable token or NFT token/collection. This puts a lot of redundant byte code into the Ethereum blockchain and limits certain functionality by separating each token contract into its own allowed address. With the advent of cryptogames and platforms such as Enjin Coin, game developers can create thousands of tokens, and a new type of token standard is needed to support this.
With this design, new features are possible, such as the simultaneous transfer of multiple token types, saving on transaction costs. Trading (escrow/atomic swaps) of multiple tokens can be built on this standard, and this eliminates the need to "approve" separate token contracts. It is also easy to describe and mix multiple interchangeable or non-interchangeable tokens into a single contract.
safeBatchTransferFrom function allows for the batch transfer of multiple token IDs and values. Gas savings are improved as the number of token types in a batch transfer is increased compared to a single transfer with multiple transactions.
Approval of certain token values based on a single token has been dropped in favour of
setApprovalForAll, which allows the operator to manage the entire set of tokens on behalf of the approver. To restrict approval to a specific set or number of tokens, we recommend deploying a contract containing the desired rules and instruct end users to approve this contract to manage their token set.
The FLOW blockchain which uses proof of stake consensus model supports NFTs, for example NBA Top Shot is run on the FLOW blockchain. Cryptokitties plans to switch from Ethereum to FLOW in the future.
Tezos is a blockchain network that operates on proof of stake and supports the sale of NFT art.
The Solana blockchain also supports non-fungible tokens.
Visit our media section for a complete overview.