In this post, I shared the steps on how to create a BEP-20 token.
BEP-20 tokens became popular with the launch of the Binance Smart Chain (BSC).
Developers are leveraging the speed and affordability of BSC to deploy DeFi apps.
Interestingly, the native tokens of most of these DeFi apps are BEP-20 tokens.
They are similar to Ethereum's ERC-20 tokens and are doing pretty well in the market.
So, what are BEP-20 tokens? And have they replaced ERC-20 tokens?
Keep reading to find answers to these questions and more.
Post Summary What Are BEP-20 Tokens? How To Create A BEP-20 Token? Popular BEP-20 Tokens And Their Market Cap What Does The Future Hold For BEP-20 Tokens? Conclusion You can click on any item above to read its details right away.
Enjoy your read!
1. What Are BEP-20 Tokens? BEP-20 tokens are tokens that are based on the BEP-20 standard.
This standard exists on the Binance Smart Chain.
It plays the same role as the ERC-20 standard of the Ethereum Blockchain .
The BEP-20 standard determines the parameters of the tokens like how they can be spent and who can spend them.
Also, it is compatible with the ERC-20 and BEP-2 standards.
BEP-2 is a technical standard for the issuance and implementation of tokens on the Binance Chain.
https://academy.binance.com/en/glossary/bep-2
This means that BSC communicates with the Ethereum network and the Binance chain.
And BEP-20 tokens help make that feasible. They facilitate transactions across these chains.
BEP-20 standard was written to enable developers to launch a range of different tokens on BSC.
Additionally, it makes it possible to peg tokens from other blockchains on BSC.
Such tokens are called Peggy coins, i.e. BEP-20 versions of other crypto assets.
For example, Binance-Peg Cardano Token (ADA) is a token of the Cardano network that is pegged on BSC.
You should also know that transactions involving BEP-20 tokens attract some fees in BNB .
The fees serve as an incentive for validators to include the transactions in the blockchain.
If you want more information on the BEP-20 standard, you can check out the draft proposal on GitHub .
I will now show you how to create your own BEP-20 token.
Tag along!
2. How To Create A BEP-20 Token? There are two ways to go about this – writing the smart contract by yourself or letting the platform do it for you.
Let's take them one after the other…
a. Writing the smart contract by yourself Step 1 – Define your token (name, symbol, and total supply)
E.g. Name – CraspToken Symbol – CRP Total supply - 1 million CRP Step 2 – Write the smart contract of your token with Solidity programming language
It will look like this
Step 3 – Deploy the contract to the BSC Testnet using MetaMask
To do this, you have to first compile the contract:
i. Configure your MetaMask to BSC test net. Don't know how to do it? Check here .
ii. Also, load the wallet with some Testnet BNB. Do that here .
iii. Now, go to Remix from your browser in which MetaMask is configured.
iv. Import your contract from any of the options (Gist, GitHub, Swarm, etc.)
Or select 'New File' to paste it directly
You'll be shown where to put the title; input 'CraspToken.sol' and hit Enter.
Then on the open field, paste the code of the contract.
vi. Hit Crtl + S to compile your contract.
Alternatively, you can click on the second button on the leftmost menu and hit 'Compile CraspToken'
Step 4 – It's time to deploy!
i. Click on the third button on the leftmost menu to deploy the contract
ii. Change the environment to 'injected web3'
iii. You'll be prompted to unlock your MetaMask wallet
iv. After doing that, hit 'Deploy'
v. Then confirm the transaction on MetaMask
vi. You'll be notified of a successful transaction
vii. Notice also that your token has been created.
Step 5 – Transfer the token to the address you want it stored i. Click on the drop-down arrow behind your token's address
ii. Then input the required addresses (as specified in each field).
To get the unit256 value, copy the contract address of your token and paste it in the 'balanceOf' field and hit 'Call'.
It will generate a figure that you can use to complete the other fields.
iii. After completing the fields, select 'Transact' and then confirm the transaction on MetaMask
You'll be notified of a successful transaction. Bravo!
For some peace of mind, you can paste your token's contract address on BSCScan to view it on the network.
Since you succeeded in launching a test token, you can go ahead and switch to the BSC mainnet on your MetaMask to launch the real token.
But this time, you'll need to load your wallet with real BNB.
All the best!
Here's an easier option for creating BEP-20 tokens.
Follow these steps:
i. Define the parameters of your token like we did earlier (name, symbol, total supply)
ii. Go to Token Create and connect your wallet.
*Make sure your wallet is loaded with BNB
iii. Then complete the empty fields and hit 'Create Token'.
Also, you are to confirm the transaction from your MetaMask window
Note: Can Burn: specifies whether your tokens can be burned to decrease the supply. Can Mint: shows that more tokens can be created to increase the initial supply. Pause: specifies whether your token and all associated operations can be halted and resumed whenever needed. It is used to control malicious attacks. Blacklist: enables the backlisting of an account that acts maliciously. Deflation: for deflationary tokens. Turning on this option will require other info like transaction fee, burn fee, receive address, etc. iv. You'll be notified of a successful token creation. Hit 'confirm' and 'add token' on MetaMask to add it to your wallet.
v. Lastly, click on the address of your token at the bottom of the page to view it on BSCScan
I guess Congratulations are in order!
Earlier, I mentioned that most BEP-20 tokens are doing well in the market.
You will find some of them in the next section.
Keep reading!
3. Popular BEP-20 Tokens And Their Market Cap This list includes both pegged and non-pegged tokens …
Coin Market Cap DODO bird (DODO) $121,523,609.00 Newscrypto (NWC) $108,477,328.00 AlphaToken (ALPHA) $108,434,855.00 Binance-Peg Ethereum Token (ETH) $227,308,864,141.00 Wrapped BNB (WBNB) $45,609,534,182.00 Binance-Peg Cardano Token (ADA) $43,233,023,173.00 Zilliqa (ZIL) $933,921,438.00 Wazirx token (WRX) $512,332,996.00 Swipe (SXP) $176,104,373.00 Venus BTC (vBTC) $142,251,794.00 SafeMoon (SAFEMOON) $1,868,052,591 PancakeSwap (CAKE) $2,411,158,241 BakerySwap (BAKE) $520,498,535 Corra.Finance (CORA) $14,559,108
You will find the complete list of BEP-20 tokens and other relevant parameters here .
So, is the future bright for these tokens?
Find out in the next section.
4. What Does The Future Hold For BEP-20 Tokens? The future looks very bright for BEP-20 tokens because of the hosting blockchain, BSC.
Most decentralized applications are moving to the Binance Smart Chain because of its speed, low cost, and interoperability.
This means that their tokens are pegged to the chain, thereby increasing the utility of BEP-20 tokens.
Also, new apps launching on the chain, create BEP-20 native tokens.
Furthermore, DeFi apps like PancakeSwap (CAKE) and BakerySwap (BAKE) hosted on the chain are already faring well in the market as more traders farm in their pools.
Therefore, as BSC gains popularity and usage, so will BEP-20 tokens. Cool!
5. Conclusion We have now come to the end of our discussion on how to create BEP-20 tokens. I hope you enjoyed the read.
Now, I'd love to hear from you; will you create your own BEP-20 token?
And which method would you use, writing your codes or letting BSC do all the hard work?
Let your fingers do the talking for you in the comments.
Also, share this post with your friends, thank you!
Interesting reads for you...
No comments:
Post a Comment