![](/img/trans.png)
[英]How to generate same wallet address in both BEP20 and ERC20 using web3
[英]Can't verify ERC20/BEP20 token on BSCScan
我使用truffle
和openzepplin
在 binance 智能链上部署了一个 ERC20/BEP20 令牌。 现在我想验证这个智能合约,但我遇到了一些问题。
$ truffle run verify MyToken --network bsc
Verifying MyToken
Unable to process the standard-input-json you uploaded
Failed to verify 1 contract(s): MyToken
让我们尝试另一种方式:
$ npx truffle-flattener ./contracts/MyToken.sol > ./contracts/token/FlatMyToken.sol
After copy/paste the output code into the bscscan I receive this error:
ParserError: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses. Please see https://spdx.org for more information.
--> myc
使用第二种方法,当我删除相关行时,字节码发生变化!
这些方法对我不起作用。
我建议使用https://github.com/hjubb/solt
跑步:
solt write ./contracts/MyToken.sol
然后,一旦您获得了 solc-input-MyToken.json 文件,您就可以将其直接上传到 BscScan。
第一种方法不起作用,因为松露验证存在一些奇怪的问题,因为它没有提交有效的 JSON。第二种方法不起作用,因为 SPDX 标识符不同。 但是,我不知道为什么删除 spdx 标识符会导致不同的字节码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.