Most are familiar with ERC20, perhaps you may even own a few. But did you know there are other improved standards besides besides ERC20? Lets find out from this post.
ERC20
These specifications became known as the ERC- 20(Ethereum Request for Comments 20). ERC20 has become the standard that has enabled seamless interaction and development of tokens with smart contracts. Other Wallet offering services that hold digital tokens also adopt this framework in their wallet applications to enable them to receive, exchange, store and send tokens. Tokens developed using the ERC20 standard is also known as Fungible Tokens.ERC20 defines the following set of functions when using smart contracts balanceOf , totalSupply , transfer , transferFrom , approve , and allowance . There are also a few optional functions like the token name, symbol, and the number of decimal places with which a token should have.
TotalSupply(): Using this function, it allows for the computation of the total amount of the token that is in circulation
BalanceOf(): This function permits the storage and return of balances of a provided address. The function accepts an address as a parameter.
Approve(): With this function, the owner of the contract approves, the given address to withdraw instances of the token from the owner’s address.
Transfer(): The transfer function lets the owner of the contract to send a set amount of a token to another person or address, this is normally done every time an owner of a token wants to send an amount to another.
TransferFrom(): This function when implemented in a smart contract, it allows a user to automate the transfer process to send a given amount of the token on behalf of the owner without doing it manually.
the optional functions are descriptive of their purpose. thus token symbol, token name and token decimal
ERC-721
ERC-721 ushered in a new standard for Non Fungible Tokens(NFT). NFTs are unique tokens that have different value than another similar token of the same smart contract. Differences exist as a result of rarity, expertise of creator or age of the item. These tokens are useful to platforms that offer collectible items like in basketball, lottery items, sports and art. This standard is much more complex that the defacto ERC20 and it can represent ownership of NFT.
ERC777
Just like the ERC20, ERC777 is a standard for fungible tokens, its focus is extending the functionalities to allow for more interactions when trading tokens.
The standard has multiple enhancements, one of such is minting and burning tokens with events, among others, prominent being the receive hooks function. This is simply a function in a contract that is called when tokens are sent to it, meaning accounts and contracts can respond to receiving tokens.
This has opened up interesting use cases, including easy transfers using tokens Approving and transferFrom in two separate transactions no longer a norm, rejecting receipt of tokens (thus reverting on the hook call when a condition is met without losing tokens), redirecting or splitting the received tokens to other addresses when received. All these changes come with the ERC-777 standard.
ERC1155
ERC1155, being a new token standard, it brings the best from earlier standards to create a much more complete and gas-efficient token contract.
ERC1155 draws ideas from all of ERC20, and ERC777.The distinctive feature of ERC1155 is that it uses a single smart contract to represent multiple tokens at once. Thus both fungible and NFTs, in ERC1155 accounts have a distinct balance for each token contained, and non-fungible tokens are implemented by simply minting a single one of them.
This approach enables massive gas savings for smart contract projects that require interaction with multiple tokens. No need to deploy a new contract for each token type, a single ERC1155 contract can hold the smart contract state, reducing deployment costs and complexity.
Because all state is held in a single contract, Using batch operations, multiple tokens be it fungible and non fungible can reside within a single transaction very efficiently. The standard provides two functions, balanceOfBatch and safeBatchTransferFrom, that make querying multiple balances and transferring multiple tokens simpler and less gas-intensive.
How do I create a smart Contract?
Smart contract involved coding business logic on the blockchain. To start with its development one must have knowledge in programming solidity, other secondary knowledge areas may become necessary as one advances.Conclusion
With the advancement in the development of Ethereum standards, most people still widely know and use the defacto ERC-20 standard. As time goes on, Improvements might be made if there is a need for further proposals.Page Links
- HomeBuyer's Guide to Understanding Mortgages and Rental Options in the US
- PWAs vs. Native Apps: Better Performance, Cost, and User Experience?
- The Future of Driving: Top Electric Vehicles to Watch now and Beyond
- Your Guide to Identity Theft: What You Need to Know to Stay Safe
- Deep Fakes: What They Are and Why They Matter
- Mastering Sales: Key Traits of Highly Successful Salesmen
- How to Write an Effective Business Plan: A Step-by-Step Guide
- Unveiled: Benefits of Neem No One Told You About
- 401(K) vs IRA: The Keys to Retirement Wealth
- Adopting Sustainability: A DIY Guide to Crafting Bio-Pesticides for Your Garden
- BRICS: Shaping the Future of Global Collaboration
- Ingenious Strategies to Skyrocket Your Website Traffic in 2024
- The Forex Battlefield: Tactical Tips to Shield Your Capital
- Cracking the Bid-Ask Spread Code: Journey into the Stock Market Price Dance
- Cracking the Green Vault: A Daring Dive into Carbon Credits
- Unraveling SEO Mystery in 2024 for bloggers
- Walking with Electric Vehicles (EVS)
- Benefits: Six sigma and learn in process improvement and profitability
- Do I need keto to lose weight?
- Build muscles with these 5 food
- Want to lose weight? 10 foods to stop eating
- 5 exercises that enhances your stamina instantly
- Bitcoin ETF: How does it work?
- ESG Rating: 12 Agencies that tell ESG Investors where to invest
- Achieving Sustainable ESG (Environmental, Social & Governance)
- The 9 Reasons: A business case for insurance
- CodeIgniter 4 | Choosing a faster PHP framework