{"id":4181,"date":"2020-11-06T06:53:11","date_gmt":"2020-11-06T06:53:11","guid":{"rendered":"http:\/\/blog.mathwallet.xyz\/?p=4181"},"modified":"2020-11-06T10:05:55","modified_gmt":"2020-11-06T10:05:55","slug":"bsc-kai-fa-ru-men-2-ru-he-zaibsc-shang-chuang-jian","status":"publish","type":"post","link":"https:\/\/blog.mathwallet.xyz\/?p=4181","title":{"rendered":"BSC\u5f00\u53d1\u5165\u95e8\uff082\uff09- \u5982\u4f55\u5728BSC\u4e0a\u521b\u5efa\u4e00\u4e2aBEP20 Token"},"content":{"rendered":"<p>BSC\u5f00\u53d1\u5165\u95e8\u7cfb\u5217\u6559\u7a0b\u5168\u96c6<br \/>\n<a href=\"http:\/\/blog.mathwallet.xyz\/?tag=BSCdapp\">http:\/\/blog.mathwallet.xyz\/?tag=BSCdapp<\/a><\/p>\n<p>\u672c\u6587\u4f1a\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u5728BSC\uff08\u5e01\u5b89\u667a\u80fd\u94fe\uff09\u4e0a\u521b\u5efa\u4e00\u4e2a\u6807\u51c6\u7684BEP20\u7684Token<\/p>\n<h2 id=\"toc_0\">\u5f00\u53d1\u73af\u5883\u914d\u7f6e<\/h2>\n<p>\u89c1\u4e4b\u524d\u7684\u6587\u7ae0\uff1aBSC\u5f00\u53d1\u5165\u95e8\uff081\uff09- \u5982\u4f55\u642d\u5efaBSC\u667a\u80fd\u5408\u7ea6\u5f00\u53d1\u6d4b\u8bd5\u73af\u5883<br \/>\n<a href=\"http:\/\/blog.mathwallet.xyz\/?p=4179\">http:\/\/blog.mathwallet.xyz\/?p=4179<\/a><\/p>\n<h2 id=\"toc_1\">\u7f16\u8bd1\u90e8\u7f72\u5408\u7ea6<\/h2>\n<p>\u6253\u5f00 <a href=\"https:\/\/remix.ethereum.org\">https:\/\/remix.ethereum.org<\/a><\/p>\n<p>\u5220\u9664\u9ed8\u8ba4\u7684\u6587\u4ef6\uff0c\u65b0\u5efa\u4e00\u4e2a Token.sol<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046499469366.jpg\" alt=\"\"\/><\/p>\n<p>\u4ece\u4ee5\u4e0b\u4ed3\u5e93\u4e2d\u590d\u5236\u5408\u7ea6\u4ee3\u7801\u5230 Token.sol<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>\u6700\u540e\u7684 BEP20Token \u4ee3\u7801\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u8fdb\u884c\u4fee\u6539\uff0c\u5305\u62ec name, symbol, decimals, \u4ee5\u53ca totalSupply\uff08\u4e0b\u56fe\u4e2d\u7684\u603b\u91cf\u662f 10000 \u4e2a\uff09<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046500570434.jpg\" alt=\"\"\/><\/p>\n<p>\u7f16\u8bd1\uff1a<br \/>\n\u8fdb\u5165\u7b2c\u4e8c\u4e2atab\uff0c\u70b9\u51fb Compile Token.sol<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046501720182.jpg\" alt=\"\"\/><\/p>\n<p>\u90e8\u7f72\uff1a<br \/>\n\u8fdb\u5165\u7b2c\u4e09\u4e2atab<br \/>\nENVIRONMENT\u9009\u62e9 Injected Web3, IDE\u4f1a\u81ea\u52a8\u8fde\u63a5\u63d2\u4ef6\u94b1\u5305\uff0c\u5e76\u4f7f\u7528\u9009\u4e2d\u7684\u5730\u5740\u53d1\u8d77\u90e8\u7f72\u4ea4\u6613<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046502362638.jpg\" alt=\"\"\/><\/p>\n<p>\u70b9\u51fb\u3010Deploy\u5f00\u59cb\u90e8\u7f72\u3011<br \/>\n\u9ea6\u5b50\u6d4f\u89c8\u5668\u63d2\u4ef6\u94b1\u5305\u4f1a\u5f39\u51fa\u4ea4\u6613\u786e\u8ba4\u7a97\u53e3\uff0c\u70b9\u51fb\u3010Accept\u3011<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046503158444.jpg\" alt=\"\"\/><\/p>\n<p>\u51e0\u79d2\u949f\u540e\u67e5\u8be2 Bscscan \u53ef\u4ee5\u53d1\u73b0\u5408\u7ea6\u5df2\u90e8\u7f72<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046504245594.jpg\" alt=\"\"\/><\/p>\n<h2 id=\"toc_2\">\u9a8c\u8bc1\u5408\u7ea6<\/h2>\n<p>\u9a8c\u8bc1\u5408\u7ea6\u5408\u7ea6\u540e\uff0c\u5408\u7ea6\u624d\u80fd\u5728Bscscan\u4e0a\u5f00\u6e90\uff0c\u4ee5\u4f9b\u6240\u6709\u4eba\u9a8c\u8bc1\u5b89\u5168\u6027\u3002<\/p>\n<p>\u5728BscScan\u4e0a\u8fdb\u5165\u90e8\u7f72\u7684Contract\uff0c\u8fdb\u5165\u3010Contract\u3011tab\uff0c\u70b9\u51fb\u201cVerify and Publish\u201d<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046504759171.jpg\" alt=\"\"\/><\/p>\n<p>\u9009\u62e9\u76f8\u5e94\u4fe1\u606f\uff08\u7248\u672c\u7b49\u4fe1\u606f\u53ef\u4eceIDE\u4e2d\u83b7\u5f97\uff09<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046506319889.jpg\" alt=\"\"\/><\/p>\n<p>\u5c06IDE\u4e2d\u4ee3\u7801\u5b8c\u6574\u590d\u5236\u8fc7\u6765\uff0c\u5176\u5b83\u4f7f\u7528\u9ed8\u8ba4\u503c\u5373\u53ef<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507002828.jpg\" alt=\"\"\/><\/p>\n<p>\u70b9\u51fb Verify and Publish \u5728 Contract \u9875\u9762\u53ef\u4ee5\u770b\u5230 Code\uff0c\u5e76\u80fd\u591f\u8fdb\u884c Read \u548c Write<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507473119.jpg\" alt=\"\"\/><\/p>\n<h2 id=\"toc_3\">\u914d\u7f6e\u5408\u7ea6<\/h2>\n<p>\u8fdb\u5165 Write Contract\uff0c\u5e76\u70b9\u51fb Connect to Web3<\/p>\n<p><img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046507976101.jpg\" alt=\"\"\/><\/p>\n<p>Mint Token &#8211; \u5728\u603b\u91cf\u8303\u56f4\u5185\u53d1\u884ctoken\u7ed9\u67d0\u5730\u5740<br \/>\n\u627e\u5230 mint \u65b9\u6cd5\uff0c\u8f93\u5165\u63a5\u53d7\u5730\u5740\u548c\u6570\u91cf\uff0c\u6570\u91cf\u9700\u8981\u52a0\u4e0a\u76f8\u5e94\u7684\u5c0f\u6570\u4f4d\u4e2a0\uff0c\u5728\u63d2\u4ef6\u94b1\u5305\u5f39\u51fa\u7a97\u53e3\u4e2d\u786e\u8ba4\u7b7e\u540d<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046508859398.jpg\" alt=\"\"\/><\/p>\n<p>\u5f00\u542f\u8f6c\u8d26 &#8211; \u8be5\u5408\u7ea6\u9ed8\u8ba4\u505c\u6b62\u8f6c\u8d26\u7684\uff0c\u9700\u8981\u6253\u5f00\u76f8\u5e94\u5f00\u5173<br \/>\n\u627e\u5230 unpause \u65b9\u6cd5\uff0c\u70b9\u51fbWrite\uff0c\u7b7e\u540d\u786e\u8ba4<br \/>\n<img src=\"http:\/\/qiniu.eth.fm\/2020-11-06-16046510225935.jpg\" alt=\"\"\/><\/p>\n<p>\u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u7528transfer\u65b9\u6cd5\u6d4b\u8bd5\u8f6c\u8d26\u4e86<\/p>\n<p>\u628aURL\u4e2d\u7684contract\u6539\u4e3atoken\uff0c\u5373\u53ef\u67e5\u770btoken\u7684\u4fe1\u606f<br \/>\n<a href=\"https:\/\/testnet.bscscan.com\/token\/0x\">https:\/\/testnet.bscscan.com\/token\/0x<\/a><\/p>\n<h2 id=\"toc_4\">\u63d0\u4ea4Token<\/h2>\n<p>Token\u8f6c\u8d26\u6d4b\u8bd5\u6ca1\u95ee\u9898\u540e\u5c31\u53ef\u4ee5\u5c06Token\u63d0\u4ea4\u7ed9\u94b1\u5305\uff0c\u8ba9\u66f4\u591a\u7528\u6237\u53c2\u4e0e\u4f7f\u7528\u4e86<\/p>\n<p>\u9996\u5148\u4f60\u53ef\u4ee5\u5236\u4f5c\u4e00\u4e2atoken\u56fe\u6807\uff0c\u5927\u5c0f 188*188px<\/p>\n<p>\u7136\u540e\u901a\u8fc7\u4e0b\u9762\u7684\u94fe\u63a5\u5c06Token\u63d0\u4ea4\u7ed9\u9ea6\u5b50\u94b1\u5305<br \/>\n<a href=\"https:\/\/m.maiziqianbao.net\/submit\/token?type=BSC\">https:\/\/m.maiziqianbao.net\/submit\/token?type=BSC<\/a><\/p>\n<p>\u52a0\u5165 MATH BSC \u5f00\u53d1\u8005\u793e\u7fa4\uff0c\u6dfb\u52a0\u5fae\u4fe1\u53f7\uff1amathwallet999\uff0c\u5907\u6ce8\u201cBSC\u5f00\u53d1\u8005\u201d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BSC\u5f00\u53d1\u5165\u95e8\u7cfb\u5217\u6559\u7a0b\u5168\u96c6 http:\/\/blog.mathwallet.xyz\/?tag=BSCdapp \u672c\u6587\u4f1a\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u5728BSC\uff08\u5e01\u5b89\u667a\u80fd\u94fe\uff09\u4e0a\u521b\u5efa\u4e00\u4e2a\u6807\u51c6\u7684BEP20\u7684Token \u5f00\u53d1\u73af\u5883\u914d\u7f6e \u89c1\u4e4b\u524d\u7684\u6587\u7ae0\uff1aBSC\u5f00\u53d1\u5165\u95e8\uff081\uff09- \u5982\u4f55\u642d\u5efaBSC\u667a\u80fd\u5408\u7ea6\u5f00\u53d1\u6d4b\u8bd5\u73af\u5883 http:\/\/blog.mathwallet.xyz\/?p=4179 \u7f16\u8bd1\u90e8\u7f72\u5408\u7ea6 \u6253\u5f00 https:\/\/remix.ethereum.org \u5220\u9664\u9ed8\u8ba4\u7684\u6587\u4ef6\uff0c\u65b0\u5efa\u4e00\u4e2a Token.sol \u4ece\u4ee5\u4e0b\u4ed3\u5e93\u4e2d\u590d\u5236\u5408\u7ea6\u4ee3\u7801\u5230 Token.sol https:\/\/github.com\/mathwallet\/BSC-Contracts\/blob\/main\/Contracts\/BEP20.sol \u6700\u540e\u7684 BEP20Token \u4ee3\u7801\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u8fdb\u884c\u4fee\u6539\uff0c\u5305\u62ec name, symbol, decimals, \u4ee5\u53ca totalSupply\uff08\u4e0b\u56fe\u4e2d\u7684\u603b\u91cf\u662f 10000 \u4e2a\uff09 \u7f16\u8bd1\uff1a \u8fdb\u5165\u7b2c\u4e8c\u4e2atab\uff0c\u70b9\u51fb Compile Token.sol \u90e8\u7f72\uff1a \u8fdb\u5165\u7b2c\u4e09\u4e2atab ENVIRONMENT\u9009\u62e9 Injected Web3, IDE\u4f1a\u81ea\u52a8\u8fde\u63a5\u63d2\u4ef6\u94b1\u5305\uff0c\u5e76\u4f7f\u7528\u9009\u4e2d\u7684\u5730\u5740\u53d1\u8d77\u90e8\u7f72\u4ea4\u6613 \u70b9\u51fb\u3010Deploy\u5f00\u59cb\u90e8\u7f72\u3011 \u9ea6\u5b50\u6d4f\u89c8\u5668\u63d2\u4ef6\u94b1\u5305\u4f1a\u5f39\u51fa\u4ea4\u6613\u786e\u8ba4\u7a97\u53e3\uff0c\u70b9\u51fb\u3010Accept\u3011 \u51e0\u79d2\u949f\u540e\u67e5\u8be2 Bscscan \u53ef\u4ee5\u53d1\u73b0\u5408\u7ea6\u5df2\u90e8\u7f72 \u9a8c\u8bc1\u5408\u7ea6 \u9a8c\u8bc1\u5408\u7ea6\u5408\u7ea6\u540e\uff0c\u5408\u7ea6\u624d\u80fd\u5728Bscscan\u4e0a\u5f00\u6e90\uff0c\u4ee5\u4f9b\u6240\u6709\u4eba\u9a8c\u8bc1\u5b89\u5168\u6027\u3002 \u5728BscScan\u4e0a\u8fdb\u5165\u90e8\u7f72\u7684Contract\uff0c\u8fdb\u5165\u3010Contract\u3011tab\uff0c\u70b9\u51fb\u201cVerify and Publish\u201d \u9009\u62e9\u76f8\u5e94\u4fe1\u606f\uff08\u7248\u672c\u7b49\u4fe1\u606f\u53ef\u4eceIDE\u4e2d\u83b7\u5f97\uff09 \u5c06IDE\u4e2d\u4ee3\u7801\u5b8c\u6574\u590d\u5236\u8fc7\u6765\uff0c\u5176\u5b83\u4f7f\u7528\u9ed8\u8ba4\u503c\u5373\u53ef \u70b9\u51fb Verify and Publish \u5728 Contract \u9875\u9762\u53ef\u4ee5\u770b\u5230 Code\uff0c\u5e76\u80fd\u591f\u8fdb\u884c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[117,120,22],"_links":{"self":[{"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/4181"}],"collection":[{"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4181"}],"version-history":[{"count":4,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/4181\/revisions"}],"predecessor-version":[{"id":4188,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=\/wp\/v2\/posts\/4181\/revisions\/4188"}],"wp:attachment":[{"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mathwallet.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}