We will be servicing ERC1155 smart contracts.
What is smart contract?
Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary’s involvement or time loss.
ERC1155
ERC-1155 is a unique token that supports non-fungible (NFTs) and fungible tokens. It’s faster and more efficient to use in batch token transfers. Developed by Enjin, it is called, “the next generation multi-token standard.”
ERC-1155 can use a single contract to make various types of NFTs. Gas fees are cut by 90%, making it an affordable way for anyone to start minting on blockchain. The only real draw back is that the NFT is harder to track in terms of ownership — to save data stored on blockchain ERC-1155 has specifications on the Etheruem logs that have less robust information.
Why were ERC-1155s created?
To understand why ERC-1155 tokens were created, it is necessary to examine some intermediate points that will give us a better understanding of this point. Among those points we can mention:
The limitations of the ERC-20 token
The ERC-20 (for fungible tokens) and ERC-721 (for non-fungible, NFT) tokens of Ethereum are widely used within the ecosystem. Just take a look at Etherscan to see the enormous number of tokens of this type that exist. However, both tokens have limitations, some of them quite severe.
For example, in the ERC-20 token, a major limitation of it is the lack of a way to “react” to ERC-20 transfer events. This results in ERC-20 tokens being trapped forever in contracts when users accidentally sent tokens to the wrong address. In this way, if you transfer to an incorrect ERC-20 address, what you have transferred is lost forever.
The limitations of the ERC-721 token
For their part, ERC-721 tokens also have their own limitations. For example, obtaining a token identifier directly is impossible, and this makes transactions with these tokens difficult. In fact, if, for example, you have a set of 10 NFTs that you want to transfer to another person, that transfer will require you to carry out 10 different transactions, with their corresponding commission charge and that greatly increases the cost of this simple operation, as well as the load operations of the network, having a tremendous impact on the usability of the Ethereum network. In these scenarios you will have to transfer token by token, being impossible to transfer all 10 at the same time, something quite absurd actually.
Another problem is traversing the ERC-721 tokens. This requires that all tokens within the contract be traversed for the purposes of providing a response to the DApp and the user in question. Imagine for a moment that an ERC-721 contract has under its registration 1 million tokens, that means that, if a person wants to know the status of their tokens, they must send a transaction to the network which will go through this million tokens, it will match them with the user’s addresses and then deliver the response. That is the greatest demonstration of inefficiency that can be had in a system of this type.
Incompatibility between ERC-20 and ERC-721 tokens
Along with this, the ERC-20 and ERC-721 tokens are incompatible with each other. In fact, the contracts are so different that creating additional functionality that links the two is a daunting task, and would likely have a heavy impact on the network, potential failures, and high commission costs.
This is especially important because many DApps make use of both types of tokens, and due to this limitation, the logic of their operation becomes more complex. If a single smart contract could be used to handle everything, it would be much easier to program, as well as being more secure and less complex to design.
A more efficient way to use resources and schedule
Against this background, ERC-1155 has been created in order to unite both worlds under the same contract, overcoming the limitations already described and making their management more efficient. Not only that, this solution would even avoid the enormous fragmentation of tokens that exists today, allowing the same type of contract to control both types of tokens.
This, for example, would allow a DApp developer to use ERC-1155 so that its users can register fungible tokens (tokens that can be used as payment currencies) and non-fungible tokens (collectibles, exchangeable elements within the DApp or game) using the same contract, the same address and simplifying the logic of the DApps and the associated smart contracts. Without a doubt, it is a more efficient use of resources, something that would not come more in blockchains like Ethereum and its limited resources.
Current use of ERC-1155 tokens
Currently there are few platforms that make active use of ERC-1155 tokens, one of them being the game producer Enjin, known for building the Minecraft game. In fact, Enjin is one of the companies that most means has put to promote the use of this new standard, something logical, considering that he has been one of the creators of this new system, by the hand of developer Witek Radomski.
Enjin has demonstrated the power of this new token by creating a vast number of games that are powered by its Enjin Coin (an ERC-20 token), which is linked to a series of smart contracts that game developers send to ENJ. to create new and unique ERC-1155 fungible or non-fungible tokens. These tokens can be traded on the Enjin Marketplace, or exchanged for your ENJ at any time. As more custom tokens are minted, more ENJ is removed from the ecosystem, making it scarcer. The result, its ecosystem has grown significantly and, in fact, the ENJ token is positioned as one of the fastest growing tokens this 2020.