如何将BSCScan的合同部署到Binance智能链上? [英] How to deploy a contract from BSCScan onto the Binance Smart Chain?

查看:61
本文介绍了如何将BSCScan的合同部署到Binance智能链上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于大多数BEP20-Tokens-Contracts可在GitHub或BSCScan上在线获得,因此您应该能够复制代码并将其粘贴到remix.ethereum.org中并进行部署.我这样做了,合同成功部署到了BSC,但是令牌信息丢失了.我做错了什么?这是我复制的代码:

as most of the BEP20-Tokens-Contracts are online available on GitHub or BSCScan you should be able to just copy the code and paste it into remix.ethereum.org and deploy it. I did that and the contract deployed successfully to the BSC but the token information are missing. What do I do wrong? Here is the code I copied: https://bscscan.com/address/0x0cF011A946f23a03CeFF92A4632d5f9288c6C70D#code and here is my contract deployed to the BSC: https://bscscan.com/address/0xf5be6f7f00a4870b46f3ab6d16f5095731da97d7 I have just changed the name of the token, but the token information are not showing up on BscScan nor do I see the token in my Wallet. Any help is appreciated!

解决方案

Your contract's bytecode contains just the Address contract bytecode. Since it's the first contract in the list (sorted alphabetically), I assume you simply forgot to select the contract that you wanted to compile.

You need to select the NyanCatToken contract (which effectively imports the Address as well) when compiling in Remix.

这篇关于如何将BSCScan的合同部署到Binance智能链上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆