How to create your own BEP20 tokens on Binance Smart Chain (BSC) PlatoBlockchain Data Intelligence. Vertical Search. Ai.

How to create your own BEP20 tokens on Binance Smart Chain (BSC)


Disclaimer: This article is only for informative purposes. It doesn’t recommend you to buy, sell or trade any cryptocurrencies, and doing so is highly subjected to market risks. The code is not suitable for production. The purpose is only to give an overview of how things work.

Right from the beginning of the DeFi Summer of 2020, a lot of new cryptocurrency and blockchain-related projects flooded the Ethereum network which resulted in the hike in gas price. People were in a situation to pay a 100$ gas fee for a 10$ transaction. So, everyone started to migrate their projects and infrastructure to various gas efficient platforms and one among those platforms is the Binance Smart Chain (BSC).

In a nutshell, BSC is almost a similar blockchain to Ethereum, but with some small changes. It has EVM support as well. So any smart contract that runs on Ethereum can be deployed on the BSC. As of May 14, 2021 — the number of daily transactions has reached a tremendous mark of 12M.

How to create your own BEP20 tokens on Binance Smart Chain (BSC) PlatoBlockchain Data Intelligence. Vertical Search. Ai.
bscscan.com

Almost in all DeFi projects, one of the common components is a BEP20 token native to the project which will be used for some specific purposes within or even outside their platform. BEP20 token standard is almost similar to the ERC20 standard on Ethereum.

In this article, we will learn to create and deploy a very basic and simple BEP20 token to the BSC testnet using the Remix IDE and MetaMask.

  • Name: SampleBEP20 Token
  • Symbol: SBT
  • Total Supply: 1 million SBT

Note: We are going to deploy the contract to BSC Testnet using MetaMask, so please make sure that you have MetaMask added to your browser with BSC testnet configured. For adding BSC Testnet/Mainnet to your MetaMask, you can refer here.

#1. Open up your browser (in which MetaMask is configured) and navigate to https://remix.ethereum.org

Remix IDE Landing Page

#2. You can import the file using this Gist link. Or you can also create a new file called SampleBEP20Token.sol and add the code of the BEP20 Token Contract given above.

#3. We should compile our code before deployment. Pressing Ctrl + S keys will compile the code. Also we can navigate to the compilation page by clicking the second option on the navigation panel (leftmost).

We have specified the solidity version as 0.8.4 in our code, so we need to choose the same compiler version in the remix also.

#4. After successful compilation, we can move ahead to the deployment panel by clicking the icon below the “Compiler” icon.

The ENVIRONMENT should be Injected Web3 as we are using MetaMask to deploy. Also make sure that you have selected the SampleBEP20Token contract in the CONTRACT dropdown (above the Deploy button).

Note: We need some testnet BNB to pay for gas during contract creation.We can get testnet BNB from this faucet.

We are all set to deploy our SBT token. Hit the Deploy button. It will trigger a MetaMask popup for confirmation. Click Confirm to deploy the token.

MetaMask Confirmation

#5. Once the transaction is mined, we can see the logs as well as the contract details will appear under the Deployed Contracts section.

Source: https://medium.com/geekculture/how-to-create-your-own-bep20-tokens-on-binance-smart-chain-bsc-d7075ba2f057?source=rss——-8—————–cryptocurrency

Time Stamp:

More from Medium