BNB Smart Chain

Build web3 dApps effortlessly

BNB 信標鏈

Sunset Complete

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

文件GitHubFaucetStake BNBBscScanBSCTraceDev ToolsLearn more about Fusion文件信標鏈瀏覽器Token Recovery Tool文件GitHubFaucet跨鏈橋GreenfieldScanDCellarDev Tools文件GitHubFaucet跨鏈橋opBNBScanDev Tools文件GitHub

開發人員


Submit dApps

BNB Smart ChainBNB GreenfieldopBNBzkBNBBNB HackBNB Incubation Alliance (BIA)MVB 加速器計畫BNB Chain Grants開始Gas GrantsTVL Incentive ProgramMEME Coins Innovation查看所有計畫

生態系

Staking

Earn BNB and rewards effortlessly

Tokenization Solutions

Get Your Business Into Web3

Native StakingLiquid StakingCompany TokenizationReal World Assets TokenizationNFT Loyalty Program

社群

聯繫我們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