Let’s create your own BEP20 Token on Binance Smart Chain(Step-by-Step by using BEP20-Token Template)

Sila Pakdeewong
7 min readMay 5, 2021

Hello everyone today I gonna tell you how to create your own BEP20 Token on Binance Smart Chain. Let’s take a look how’s easy it’s.

1.Firstly because of the BEP20 token everything is simply and every token do the same implementation or coding (I’m talking about just normal BEP20 Token, but if you prefer or want to create significantly or want some feature on your token maybe this article maybe not cover about it.) luckily for us because Binance already created the BEP20 Token template for us. Shall we take a look.

And then feel free to spent your time to read more about the Binance Smart Chain BEP20 Token docs for your understanding. Then when you ready let’s download the BEP20Token.templete files

When your download finish you will receive some file like this. Just open it in whatever text editor your have and then copy all of the code in this file.

2.Open Remix — Ethereum IDE on your browser. Then when you opened it will be start at the Home page right ? then you just click New File and then just named it whatever you want.

For this example I will named it just Token.sol like this

Then open the Token.sol or file that you recently created. And then just paste the code that your already copy it from BEP20Token.templete

And then don’t worry about the error. Just find about it (It should be on the line 352 like I’m show to you now) we will modifying it just a little bit to make it work !

In Line 352 to 355 It need a little bit modifying. Let’s see what we need to do at this point.

_name = This’s what you want you token to be named.

_symbol = This’s symbol for you Token (e.g. Bitcoin = BTC, Binance Coins = BNB)

_decimals = decimals for your token

_totalSupply = And this is Total Supply for token that you want to create

In this example l will create my own token with Name is Sila Pakdeewong (V.2) — Token, Symbol is SILAPDW, Decimals is 9, Total Supply is 21,000,000

And then before we go to the next step, I need you scroll up to on top of your file and you will see that we specified that this file will use pragma solidity 0.5.16;

3. Let’s compile our Solidity file (Token.sol)

Remember that recently that I tell you that our contract using pragma solidity 0.5.16; so it’s mean we need to select the compiler for our Solidity to (Version 0.5.16). And then when everything is ready for us let’s compile it and just wait for a little bit

before we go to the next step be sure to set your network on your Metamask to Binance Smart Chain

for someone who don’t set up Binance Smart Chain on your Metamask you can set up your Metamask for Binance Smart Chain by go to Settings

And then go to networks tabs on the left and then add Binance Smart Chain (Mainnet) network like this

Network Name: Smart Chain

New RPC URL: https://bsc-dataseed.binance.org/

ChainID: 56

Symbol: BNB

Block Explorer URL: https://bscscan.com

Same methods for the Binance Smart Chain (Mainnet) but for Testnet they have something's different

Network Name: Smart Chain — Testnet

New RPC URL: https://data-seed-prebsc-1-s1.binance.org:8545/

ChainID: 97

Symbol: BNB

Block Explorer URL: https://testnet.bscscan.com

Okay, now your Metamask already support for Binance Smart Chain (depend on your what network you add, but I recommended you to add both Mainnet and Testnet trust me you will use them in feature.)

But for me I’m gonna choosing to Binance Smart Chain — Testnet because I’m just want to create it for this example, I’m not really want to create it on mainnet (and It’s have a little bit BNB to pay for fee if you want to prefer to mainnet !!!)

before your go to the next step in Testnet it require some BNB from you to pay for fee ! but we’re in the testnet that Binance offer you can Faucet BNB or peggy BEP20 Token to you as much as you want. So what you wating for Let’s go and give some BNB to your self.

We don’t care about fee because we using Testnet that we can Faucet BNB to you as much as your want ! (Sounds like you will be rich in Testnet right ! LOL, but remember that BNB that you Faucet can’t transfer to mainnet !)”

3. Deploy our Contract to Binance Smart Chain, now our contract is ready for deploy let’s click to Deploy tabs on your left.

And then in environment be sure to select it to Injected Web3 (Because we want to use our metamask to deploy to network that we’re connected on our Metamask)

Just a sec, It should be have popup from Metamask for you to Connect to Remix.ethereum.org (be sure to check information that appear on your metamask everytime when you connect it for your security of your funds) and then if everything it checked just press Connect to allow remix connect with your Metamask.

Then when you’re already connect it, in the account should be appear your Address and your available BNB Balance. And then select your contract that your created and modified it on Step 2, And then just click Deploy.

And then It’s will show you that for this deployment it need some BNB from you to spent for a fee, just review it and then if you sure just Confirm your transaction.

And then just wait for a while, and if your console show like this it’s mean your smart contract and your BEP20 token just recently deployed to Binance Smart Chain.

Let’s go back to Deploy & Run Transactions tabs and copy your BEP20 Token’s contract address that deployed on Binance Smart Chain.

for then next step to view your BEP20 Token information it’s will be depend on what Binance Smart Chain network that you deployed to.

If you deployed your Mainnet you can view your BEP20 Token information on

https://bscscan.com/address/”YOUR_CONTRACT_ADDRESS”

and if you deployed to testnet like me you can view on

https://testnet.bscscan.com/address/“YOUR_CONTRACT_ADDRESS”

Wow, Congratulation you just deployed first smart contract and BEP20 token. next step let’s see how can you add token on your Metamask.

4. Let’s add your token on your metamask just scroll down and click “Add Token” button

And then paste your BEP20 Token contract address to Token Contract Address, and just a little bit It will automatically appear your Token Symbol and your token Decimals of precision for you. Just click on next

And then WOW ! now you are seeing your first BEP20 that your created by your own.

Congratulation on your first BEP20 Token and Smart Contract deployment to Binance Smart Chain. Can’t wait to see how powerful BEP20 token that you will create in future. And see you in the next article.

Be sure to follow me on Medium for don’t miss any new article from me in the future. (if you want)

Thanks fully for reading until the end of this article. May be I need sorry for my English some word maybe I’m might using not 100 percent correctly or some grammatically feel free to report or suggest me to edit if something wrong.

Contract Me @

LinkedIn : https://www.linkedin.com/in/sila-pakdeewong/

Facebook :https://web.facebook.com/Silapakdeewong2546

GitHub : https://github.com/misterfocusth

Twitter : https://twitter.com/FocusPakdeewong

YouTube : https://www.youtube.com/channel/UCXKxAvmusB9dPvW7UUr_etQ

--

--

Sila Pakdeewong

1st Year — School of #IT20 Student at KMITL | Student / Tech Blogger / Content Creator / Developer — MS Certified AZ / Data / AI Fundamentals | #JWC12 #MLSA