How to create a token in Binance Smart Chain. (Step by Step)

Esteban Suárez

If you want to create a crypto asset because your business model, project or interest in learning so warrants, you can choose to make a coin or a token. A coin has its own blockchain, while a token is built on top of a pre-existing network. Cryptocurrencies are based on blockchains for their security and decentralized nature.

Creating a token requires less experience and effort than making a cryptocurrency. A coin will generally need a team of developers and experts to make it. A token still requires technical knowledge, but it is possible to create them in minutes using other blockchains, such as Ethereum, Binance Smart Chain, Solana, and Polygon.

In this article you will learn how to create a token on Binance Smart Chain for less than 2 USD.

To do so, the following requirements must be met.

  1. Have a computer or mobile device.
  2. Have an active Internet connection.
  3. Have Metamask or another wallet that you can use to sign the transaction on the BSC network.
  4. Add the BSC to your wallet
  5. Have BNB to pay the commission when mining the cryptocurrency

In this example I will be using Metamask and the BSC public network so the token that will be made in this tutorial will be available on the network.

Step number 1

Add BSC to metamask. For this we are going to go in our Wallet to Settings -> Networks -> ADD Networks

Binance Smart Chain data for our Metamask wallet

Network name: SmartChain

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

ChainID: 56

Symbol: BNB

Block Explorer URL: https://bscscan.com

Step Number 2

Add some BNB to your wallet to be able to pay the creation fee for our new token.

Step number 3. Start creating our BEP20 token

We go to the website Remix ID

Remix Website

Step Number 4

We go to the contracts folder, click on new contract and write the name of the contract to create. It can be whatever name you choose but in this case I chose cut.sol referring to the token I’m creating.

Now copy the following code and make all the modifications that must be made in the name of the Token, Maximum Quantity of the Asset, its code and number of decimals. You are going to paste this code into the body of the file you created in the contracts folder.

token.sol

 

pragma solidity ^0.8.2;

contract Token {
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowance;
uint public totalSupply = 1000 * 10 ** 18;
string public name = "CUT";
string public symbol = "CUT";
uint public decimals = 18;

event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);

constructor() {
    balances[msg.sender] = totalSupply;
}

function balanceOf(address owner) public returns(uint) {
    return balances[owner];
}

function transfer(address to, uint value) public returns(bool) {
    require(balanceOf(msg.sender) >= value, 'balance too low');
    balances[to] += value;
    balances[msg.sender] -= value;
   emit Transfer(msg.sender, to, value);
    return true;
}

function transferFrom(address from, address to, uint value) public returns(bool) {
    require(balanceOf(from) >= value, 'balance too low');
    require(allowance[from][msg.sender] >= value, 'allowance too low');
    balances[to] += value;
    balances[from] -= value;
    emit Transfer(from, to, value);
    return true;   
}

function approve(address spender, uint value) public returns (bool) {
    allowance[msg.sender][spender] = value;
    emit Approval(msg.sender, spender, value);
    return true;   
}

}

Now that we have our smart contract ready we click on the Solidity Compiler and choose the exact version of our smart contract. In this case solidity ^0.8.2.

Now we click on Compile to compile our Smart Contract. If all goes well you will get two compiler warnings but no errors. If so, you go to Deploy and Run Transactions to execute our smart contract and start with the first transactions on the network.

In Environment we are going to choose Injected Web 3 and we will make the connection with our wallet through Metamask.

Step Number 5

We connect to the website and accept in the Metamask.

Now we click on Deploy and we will be executing our code in the BSC. The Metamask will be opened for us to authorize the transaction and pay the cost of it, which would be about 0.004 BNB, which is extremely low when compared to the high prices to issue a token on the Ethereum network.

If everything went well, our transaction must have been carried out on the network and now we will pass the created tokens to the signing wallet.

Step Number 6

To do this, we go down to Transfer and write the wallet address and the number of tokens we want to transfer. Then you click on transact, the cost of that transaction will be only a few cents.

Now you can verify in your Metamask and the 1000 CUT tokens should be shown, which is the asset that we created and transferred. We now turn to the Binance Block Scanner. And we paste the address of our Smart Contract

In this way we can obtain all the data of the newly created asset by us.

Step Number 7. Provide liquidity to our new asset

For this we are going to go to Pancake Swap

Here we are going to connect our wallet and we are going to provide liquidity to our asset.

We choose the pairs in which we are going to create liquidity in this case BNB and the CUT which is the asset that we have created.

It is worth noting that the more liquid an asset has, the better it is for the project it represents. And that due to the ease with which new assets can be created in the BSC, it is necessary that before investing in any type of token, you verify that it is a legitimate project.

I hope this tutorial has been useful to you. If you want to create an asset, smart contract or any project you can contact me to get a quote.