簡體   English   中英

無法在 BSCScan 上驗證 ERC20/BEP20 令牌

[英]Can't verify ERC20/BEP20 token on BSCScan

我使用truffleopenzepplin在 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM