Skip to main content
AI tutorials

Create and Deploy a BEP-20 Token on Binance Smart Chain

Learn how to use the repository’s Solidity contract to create a BEP-20 token with configurable supply, ownership controls, and buy and sell fees, then deploy it through Remix and MetaMask, verify it on BscScan, and prepare a PancakeSwap liquidity pair.

Create and Deploy a BEP-20 Token on Binance Smart Chain

What This Project Does

Create Binance Smart Chain Token is a basic Solidity project for learning how to create and deploy a BEP-20 token on Binance Smart Chain. The provided Token.sol source is intended to be edited, compiled in Remix, deployed through MetaMask, and verified on BscScan.

The contract includes basic administrative and taxable-token capabilities. It can be used as a practical starting point for understanding token deployment and blockchain transactions.

Key Features

  • BEP-20 token creation: Deploy a fungible token on Binance Smart Chain.
  • Configurable identity: Set the token name and symbol in the Solidity source.
  • Configurable decimals and supply: Define the token’s decimal precision and initial total supply.
  • Ownership controls: Renounce ownership or assign a new administrator.
  • Tax settings: Configure buy and sell fees, with values supported up to 99% according to the project README.
  • Trading preparation: Create a BNB and token liquidity pair on PancakeSwap after deployment.

This is an educational starter project. Review and test the contract carefully before deploying it or supplying assets to a liquidity pool.

What You Need

  • The repository’s Token.sol source code.
  • A web browser that can open Remix IDE.
  • MetaMask configured to connect to Binance Smart Chain.
  • Access to BscScan for contract verification.
  • Access to PancakeSwap if you plan to create a trading pair.

Step 1: Create the Solidity File in Remix

  1. Open Remix IDE.
  2. Create a new file with a .sol extension, such as NewBSCToken.sol.
  3. Copy the repository’s Token.sol source into the new file.

Using a descriptive filename makes the contract easier to identify, but the token’s public name and symbol are controlled by values inside the source code.

Step 2: Configure the Token

Find the relevant token settings in the source and replace the placeholder values with your preferred name, symbol, decimals, and total supply.

Name: My New Token
Symbol: MNT
Decimals: 18
Whole-token supply: 1000000
Base-unit supply: 1000000000000000000000000

Understanding the Supply Value

The README recommends using 18 decimals. With 18 decimals, one whole token is represented by 10^18 base units. Therefore, a supply of one million whole tokens must be entered as:

1000000 × 10^18 = 1000000000000000000000000

Count the digits carefully. An incorrect base-unit value can produce a supply that is much larger or smaller than intended.

Configure Fees Carefully

The contract supports taxable-token settings, including buy and sell fees of up to 99%. Confirm the values and how they are expressed in the source before deployment. A high fee can leave users receiving only a small portion of a transaction, so the maximum supported value should not be treated as a recommended setting.

Step 3: Compile the Contract

  1. Open Remix’s Solidity compiler panel.
  2. Select compiler version 0.8.0.
  3. Confirm that the selected compiler matches the Solidity version declared in Token.sol.
  4. Compile the token contract.
  5. Resolve any compiler errors before attempting deployment.

Matching the compiler to the version expected by the source reduces the chance of compilation or later verification problems.

Step 4: Deploy with MetaMask

  1. Open the deployment panel in Remix.
  2. Select the browser-wallet environment so Remix can connect to MetaMask.
  3. Verify that MetaMask is connected to the intended Binance Smart Chain network and account.
  4. Select the compiled token contract.
  5. Start the deployment and approve the transaction in MetaMask.
  6. Wait for the required blocks to be committed.

Do not navigate away while deployment is pending. Wait for the transaction to complete and for the tokens to be transferred to your wallet as described by the project instructions.

After confirmation, record the deployed contract address. This address uniquely identifies the token contract and will be needed for verification and liquidity setup.

Step 5: Confirm the Token in Your Wallet

If the new token is not displayed automatically, use the deployed contract address when adding the token to your wallet. Confirm that the displayed symbol, decimal precision, and balance match the values configured in the source.

Step 6: Verify the Contract on BscScan

The README recommends waiting at least one minute after deployment before attempting verification.

  1. Open BscScan.
  2. Search for the deployed contract address.
  3. Start the contract verification process.
  4. Use the same Solidity compiler version used in Remix.
  5. Provide the matching contract source and required verification settings.
  6. Submit the verification request and review the result.

Compiler and source settings should match the deployment. Changing the source after deployment does not change the bytecode already stored on the blockchain.

Step 7: Add Liquidity on PancakeSwap

To prepare the token for trading, the project recommends creating a BNB/NewToken liquidity pair on PancakeSwap.

  1. Open PancakeSwap and connect the wallet used for the token.
  2. Choose the liquidity interface.
  3. Select BNB as one side of the pair.
  4. For the other side, paste the deployed token’s contract address.
  5. Check that the imported token details are correct.
  6. Review the amounts and wallet confirmations before supplying liquidity.

Use the contract address rather than relying only on the token name or symbol. Names and symbols are not necessarily unique.

Using the Administrative Features

The source includes ownership-related capabilities such as setting a new administrator and renouncing ownership. The exact controls and available functions should be reviewed directly in Token.sol and in the deployed contract interface.

  • Set a new administrator: Use this only after checking the destination address carefully.
  • Renounce ownership: Treat this as a significant administrative action. Review the source to understand which controls will no longer be available afterward.
  • Tax configuration: Confirm who can manage buy and sell fees and what happens after ownership changes.

Advanced Tips

Keep Deployment Inputs Consistent

Record the source file, compiler version, configured name, symbol, decimals, supply, and fee settings used for deployment. These details are useful when verifying the contract or reviewing the final token configuration.

Check Addresses Character by Character

Before transferring administration, importing the token, or creating liquidity, compare the full contract or wallet address. A transaction sent to the wrong address generally cannot be corrected through the token contract.

Review the Source Before Using Ownership Controls

The README lists both new-admin and ownership-renunciation features, but it does not document their exact function names or side effects. Inspect the implementation before calling either feature.

Verify Before Promoting the Token

Contract verification allows users to inspect the published Solidity source on BscScan. Complete verification and confirm the token details before sharing the address publicly.

Do Not Confuse Maximum Fees with Sensible Defaults

The contract supports buy and sell fees up to 99%, but that is only the documented upper limit. Choose values deliberately and understand their effect on transfers and trading before deployment.

Conclusion

This project provides a straightforward workflow for practicing BEP-20 token creation: edit Token.sol, calculate the supply in base units, compile with Solidity 0.8.0, deploy through MetaMask, verify on BscScan, and optionally create a BNB pair on PancakeSwap. Review every configuration value and administrative action carefully because deployed blockchain transactions and contract settings may be difficult or impossible to reverse.

For the upstream Binance Smart Chain ecosystem, visit BNB Chain on GitHub. The project README also lists its Telegram contact for help or special requirements.