BNB Smart Chain

Build web3 dApps effortlessly

BNB 信標鏈

Sunset Complete

BNB Chain 生態系的質押與治理層

Staking

Earn BNB and rewards effortlessly

文件FaucetBscScanBSCTrace文件Faucet跨鏈橋opBNBScan文件Faucet跨鏈橋GreenfieldScanDCellarLearn more about FusionToken Recovery Tool信標鏈瀏覽器Native StakingLiquid Staking

開發人員

Wallets

Your gateway to BNB Chain

Solutions

Discover real-world solutions and use cases

Explorers

Track transactions, blocks, and smart contracts across the BNB ecosystem.


Submit dApps

Real World Assets TokenizationCompany TokenizationNFT Loyalty ProgramMEV ProtectionAI AgentMemecoinPaymentBNB Chain Layer 2BNB Chain BTCFiBNB Smart ChainBNB GreenfieldopBNBBscScanopBNBScanGreenfieldScan

生態系

社群

Careers🔥

Explore Opportunities on BNB Chain

BNB Chain CareersEcosystem Jobs
Get Started
Get Started

Binance Smart Chain DAPP Dev Tutorial - Part II How to create a BEP20 Token

2020.11.9  •  3 min read
Blog post image.
This blog is from Math Wallet

This is part 2 of a Binance Smart Chain development series. Read part 1 here.

Develop Environment

Please check the BSC DAPP Dev Tutorial(1)

Compile and Deploy

Open https://remix.ethereum.org

Delete the default files, and create a new file: Token.sol

Copy the Token.sol code from below repo

https://github.com/mathwallet/BSC-Contracts/blob/main/Contracts/BEP20.sol

You need to modify BEP20Token code based on your needs, including name, symbol, decimals, totalSupply

Compile:

Go to 2nd tab, click Compile Token.sol

Deploy:

Go to 3rd tab

ENVIRONMENT select Injected Web3, Remix will connect to MathWallet which is need to sign the deployment transaction

Click 'Deploy' to start

In the popup MathWallet confirm window, click 'Accept'

After few seconds, you can find your new smart contract on Bscscan

Verify Contract

Only after the contract is verified on Bscscan, everyone is able to see the source code of your contract and verify it. People can also query and write the contract on Bscscan directly.

On the contract page of Bscscan, go to 'contract' tab, click 'Verify and Publish'

You need to select the contract information (for version information, you can get it from Remix)

Copy the code from Remix and leave the other fields as default

Click 'Verify and Publish'

Config Contract

Go to 'Write Contract' and click 'Connect to Web3', Bscscan will connect to MathWallet

Mint Token

Find mint function, enter the address and amount (remember to add the decimals in the amount field)

Open transfer

Find unpause function, click 'Write', sign the transaction

Now your BEP20 token is ready to transfer

In the Bscscan contract URL, change contract to token, and you will able to review the detail token information.

https://testnet.bscscan.com/token/0x

Submit Token

Now you can submit your token to MathWallet so that more people can use it

https://m.maiziqianbao.net/submit/token?type=BSC

You may also create a icon for your token, size: 188*188px

Share