{"id":2359,"date":"2020-11-06T10:04:05","date_gmt":"2020-11-06T10:04:05","guid":{"rendered":"http:\/\/blog.mathwallet.org\/?p=2359"},"modified":"2021-09-04T01:07:12","modified_gmt":"2021-09-04T01:07:12","slug":"bsc-dapp-dev-tutorial2-how-to-create-a-bep20-token","status":"publish","type":"post","link":"https:\/\/blog.mathwallet.org\/?p=2359","title":{"rendered":"BSC DAPP Dev Tutorial\uff082\uff09- How to create a BEP20 Token"},"content":{"rendered":"<p>BSC DAPP Dev Tutorial Serie<br \/>\n<a href=\"http:\/\/blog.mathwallet.org\/?tag=BSCdapp\">http:\/\/blog.mathwallet.org\/?tag=BSCdapp<\/a><\/p>\n<h2 id=\"toc_0\">Develop Environment<\/h2>\n<p>Please check the BSC DAPP Dev Tutorial\uff081\uff09<br \/>\n<a href=\"http:\/\/blog.mathwallet.org\/?p=2357\">http:\/\/blog.mathwallet.org\/?p=2357<\/a><\/p>\n<h2 id=\"toc_1\">Compile and Deploy<\/h2>\n<p>Open <a href=\"https:\/\/remix.ethereum.org\">https:\/\/remix.ethereum.org<\/a><\/p>\n<p>Delete the default files, and create a new file: Token.sol<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046499469366.jpg\" alt=\"\" \/><\/p>\n<p>Copy the Token.sol code from below repo<br \/>\n<a href=\"https:\/\/github.com\/mathwallet\/BSC-Contracts\/blob\/main\/Contracts\/BEP20.sol\">https:\/\/github.com\/mathwallet\/BSC-Contracts\/blob\/main\/Contracts\/BEP20.sol<\/a><\/p>\n<p>You need to modify BEP20Token code based on your needs, including name, symbol, decimals, totalSupply<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046500570434.jpg\" alt=\"\" \/><\/p>\n<p>Compile:<br \/>\nGo to 2nd tab, click Compile Token.sol<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046501720182.jpg\" alt=\"\" \/><\/p>\n<p>Deploy\uff1a<br \/>\nGo to 3rd tab<br \/>\nENVIRONMENT select Injected Web3, Remix will connect to MathWallet which is need to sign the deployment transaction<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046502362638.jpg\" alt=\"\" \/><\/p>\n<p>Click &#8216;Deploy&#8217; to start<br \/>\nIn the popup MathWallet confirm window, click &#8216;Accept&#8217;<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046503158444.jpg\" alt=\"\" \/><\/p>\n<p>After few seconds, you can find your new smart contract on Bscscan<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046504245594.jpg\" alt=\"\" \/><\/p>\n<h2 id=\"toc_2\">Verify Contract<\/h2>\n<p>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.<\/p>\n<p>On the contract page of Bscscan, go to &#8216;contract&#8217; tab, click &#8216;Verify and Publish&#8217;<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046504759171.jpg\" alt=\"\" \/><\/p>\n<p>You need to select the contract information (for version information, you can get it from Remix)<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046506319889.jpg\" alt=\"\" \/><\/p>\n<p>Copy the code from Remix and leave the other fields as default<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507002828.jpg\" alt=\"\" \/><\/p>\n<p>Click &#8216;Verify and Publish&#8217;<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507473119.jpg\" alt=\"\" \/><\/p>\n<h2 id=\"toc_3\">Config Contract<\/h2>\n<p>Go to &#8216;Write Contract&#8217; and click &#8216;Connect to Web3&#8217;, Bscscan will connect to MathWallet<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507976101.jpg\" alt=\"\" \/><\/p>\n<p>Mint Token<br \/>\nFind mint function, enter the address and amount (remember to add the decimals in the amount field)<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046508859398.jpg\" alt=\"\" \/><\/p>\n<p>Open transfer<br \/>\nFind unpause function, click &#8216;Write&#8217;, sign the transaction<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046510225935.jpg\" alt=\"\" \/><\/p>\n<p>Now your BEP20 token is ready to transfer<\/p>\n<p>In the Bscscan contract URL, change contract to token, and you will able to review the detail token information.<br \/>\n<a href=\"https:\/\/testnet.bscscan.com\/token\/0x\">https:\/\/testnet.bscscan.com\/token\/0x<\/a><\/p>\n<h2 id=\"toc_4\">Submit Token<\/h2>\n<p>Now you can deploy the contract in BSC mainnet, and submit your token to MathWallet so that more people can use it<br \/>\n<a href=\"https:\/\/m.maiziqianbao.net\/submit\/token?type=BSC\">https:\/\/m.maiziqianbao.net\/submit\/token?type=BSC<\/a><\/p>\n<p>You may also create a icon for your token, size: 188*188px<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BSC DAPP Dev Tutorial Serie http:\/\/blog.mathwallet.org\/?tag=BSCdapp Develop Environment Please check the BSC DAPP Dev Tutorial\uff081\uff09 http:\/\/blog.mathwallet.org\/?p=2357 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: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"unlock_protocol_post_locks":""},"categories":[1],"tags":[56,76,97],"_links":{"self":[{"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/posts\/2359"}],"collection":[{"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2359"}],"version-history":[{"count":3,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions"}],"predecessor-version":[{"id":2897,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions\/2897"}],"wp:attachment":[{"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mathwallet.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}