Born for blockchain games, ERC-1155 became the official token standard for Ethereum

A year ago, Enjin Chief Technology Officer Witek Radomski pushed the first version of the ERC-1155 multi-generation standard to the Github repository in Ethereum.

Since then, this token standard has undergone more than 50 revisions, and it has received 400 comments from the community that provide valuable insights and help ERC-1155 complete to the final version.

To this day, ERC-1155 has become a formal Ethereum token standard.

Since the Ethereum community has sealed it as "final", this means that ERC-1155 will not have more changes.

The problem is coming. This token standard is dry. Why do you have to spend so much energy to do this?

The official summary is:

"Standard interface for managing multi-contract type contracts. A single-deployed contract can include any combination of replaceable tokens, non-replaceable tokens, or other configurations (such as semi-replaceable tokens)."

Hard to understand, right? No hurry, let's first understand the motives for this token standard:

Ethereum token standards like ERC-20 and ERC-721 require a separate contract for each token type or collection, which creates a large number of redundant bytecodes on the Ethereum blockchain (simple It is a waste) and limits certain features by separating the nature of each token contract into its own licensed address. With the rise of blockchain gaming platforms, game developers may create thousands of token types, which requires a new type of token standard to support them.

In short, ERC-1155 came into being in order to allow developers to create and manage thousands of game tokens at the same time.

However, ERC-1155 is not specific to games, and many other applications can benefit from this flexible token standard.

This design can achieve new features, such as transferring multiple token types at a time, saving transaction costs. Multiple token transactions (managed/atomic exchange) can be built on top of this standard, eliminating the need to separately “approve” a single token contract.

In general, this token standard is currently the biggest beneficiary, blockchain game developers.

P1

a smart contract, multiple tokens

Like the ERC-20 and ERC-721 token standards, new smart contracts need to be deployed for each new "category" of tokens, and the core concept behind the ERC-1155 is that a single smart contract can manage an unlimited number of tokens.

Think of it as a vending machine with a variety of sodas, juices and even snacks. The customer interacts with the machine using a single secure interface (insert coins, push buttons) and the machine assigns the items of their choice. Similarly, the ERC-1155 contract for a game can contain a wide variety of items, from weapons and armor to health potions, magic scrolls, and more.

Each of these items can be "replaceable" with multiple copies available. Alternate tokens are used for divisible currencies (most ERC-20 tokens), and they are also useful for stackable items that don't need to be distinguished, such as a bunch of bows and arrows.

One-of-a-kind tokens, also known as irreplaceable tokens (NFT), allow each token to have its own unique parameters, history, and real-world mirroring. The pet dragon in video games may be an NFT, which has its own unique name, a power level, and a rich game history.

Support bulk trading

With ERC-1155, you can send multiple tokens in one transaction, saving you the cost of gas! It also prevents the need to wait for each block in a single transfer.

For example, in the example below, tester Phillippe implemented 155 asset transfers per second via ERC-1155 tokens.

P5

With the ERC-1155 project, atomic exchange can also be built using the same basic design, allowing users to exchange a token with absolute security, which does not involve intermediate parties and thus avoids fraud.

Strict rules make token reliable

The ERC-1155 Token Standard also has a very good feature that is achieved through a strict set of rules that tokens must follow.

ERC-1155 tokens, you can execute a deterministic smart contract function by simply sending the token to the address.

This is very meaningful.

For example, as long as the token is sent to a DEX exchange address, the exchange can immediately return another token to the sender's address. Similarly, blockchain games can perform game functions immediately after receiving the user's ERC-1155 token. Tokens can be packaged, converted, produced or hosted without the need to access the ABI or interact directly with the smart contract.

This type of functionality was originally proposed in ERC-223, but the standard failed to keep up. ERC-721 also implements " safeTransferFrom ", but it has a big problem, that is, it does not strictly require this rule for all transmissions, which means that users may permanently lose their tokens.

Guaranteed log tracking

With the continuous development of the Ethereum ecosystem, many dApps rely on traditional database and browser API services to retrieve and classify data. The ERC-1155 standard guarantees that the event log issued by the smart contract will provide enough data to create an accurate record of all current token balances. The database or resource manager can listen for events and provide indexing and categorical searches for each ERC-1155 token in the contract.

Smart contracts no longer need to maintain an index of each token ID, and the ID does not need to be succeeded in any way.

Imagine, no matter which smart contract you analyze, you can analyze the usage patterns and lifecycle of completely different ERC-1155 tokens by time rewinding and fast forwarding.

Well, a brief introduction to the characteristics of the ERC-1155 token standard, if you are interested in understanding the token agreement, then its token standard specification, may wish to look at it: https://github.com/ethereum /EIPs/blob/master/EIPS/eip-1155.md

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Blockchain

In-depth explanation of Web3 game engine: Origins and development status of racing tracks, as well as network effects.

We are pleased to see the development process at every level, the release of new games, and the emergence of new engi...

Market

Wu's Weekly Picks CoinEX attacked, FTX's coin selling rules, Binance US layoffs, and Top 10 news (September 9-15)

Author | Wu's Top 10 Blockchain News This Week. US August Unadjusted CPI Annual Rate 3.7% Core...

Blockchain

Is the 'big boss' of the cryptocurrency world, Binance, starting to decline?

LianGuaiBitpushNews Mary Liu As 2022 comes to a close, it seems that Zhao Changpeng, co-founder and CEO of Binance, ...

Blockchain

Who is the information of the user who sells the coin? What have the leaked information been taken?

While enjoying the convenience of the Internet, it also makes privacy data a step closer to streaking. Recently, many...

Policy

FTX Creditors' Lawyers Strike a Sweet Deal Investors to Feast on 90% of the Remaining SBF's Empire

Non-U.S. creditors of FTX are being told by lawyers that they will receive a favorable deal in the exchange's bankrup...

Blockchain

Guide to secure deposits: How to better hide the Bitcoin in your hands?

In an era of constant economic uncertainty, surveillance, professional cybercrime, and hacking, knowing how to more s...