在 etherscan 上发布验证实施智能合约(来自可升级)

Issue Verifying Implementation Smart Contract (from upgradeable) on etherscan

我正在尝试验证智能合约的实施,但出现以下错误,它是使用 hardhat deployProxy 部署的,所有 3 个合约都已部署并且工作正常。

我做了什么:

  1. 部署后,我将 .sol 文件复制粘贴到 Remix,在那里我将文件展平,然后我将粘贴复制到 etherscan 并在顶部添加 // SPDX-License-Identifier: MIT,因为我收到了如果我不这样做会出错,说找不到。
  2. 填写设置,优化200次运行,0.8.2编译器,MIT许可证
  3. 单击验证并收到错误...

我检查过的内容:

  1. 此处 https://etherscan.io/address/0xb6450c438d7e68be1f1c4534a8a354bf3d85c72e#code 中的代码与“deployedBytecode”相同:来自 artifacts/contract/json 文件。
  2. The code from etherscan compiler output "ByteCode (what we are looking for) is identical to "bytecode" from he same json file above EXCEPT it has this extra at the end a26469706673582212208fd45fec4fd2404bbdee05ddd55fd9b30a80a5c1b9d089bf70b72b233847c35064736f6c63430008020033
  3. 来自 etherscan 编译器的字节码“- vs 我们得到的 -”#2 在上面提到的 json 文件中找不到,来自 hardhat 项目中的工件。

额外信息:

我尝试使用 etherscan-verify 进行验证,但是我在控制台中收到一条错误消息,内容类似“您是否更改了智能合约中的任何文件,字节码错误”,我记不太清楚了,我'很明显我愿意手动验证!

非常感谢!

问题是我使用了错误的地址,而不是使用实施合约地址,我使用的是透明代理地址,你用来与 dapp 集成的地址...