ThomasDEV
ThomasDEV

Reputation: 95

Issue Verifying Implementation Smart Contract (from upgradeable) on etherscan

I am trying to verify an implementation smart contract, however I get the following error(s), it was deployed using hardhat deployProxy, all 3 contracts are deployed and working fine.

Screenshot from etherscan

What I've done:

  1. After deploying, I copy-paste the .sol file to Remix, where I flatten the file, then I copy paste to etherscan and add // SPDX-License-Identifier: MIT at the top, since I receive an error if I don't, saying it's not found.
  2. Fill in the settings, optimization 200 runs, 0.8.2 complier, MIT license
  3. Click verify and receive error...

What I've checked:

  1. The code from here https://etherscan.io/address/0xb6450c438d7e68be1f1c4534a8a354bf3d85c72e#code is identical to "deployedBytecode": from artifacts/contract/ json file.
  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. The bytecode from etherscan complier "- vs what we got -" #2 isn't found in the json file mentioned above, from artifacts inside hardhat project.

Extra info:

I tried verifying with etherscan-verify however I get an error in the console saying something along the lines that "did you change any files in the smart contract, wrong bytecode", I don't recall exactly, I'm willing to verify manually obviously!

Thank you very much!

Upvotes: 0

Views: 938

Answers (1)

ThomasDEV
ThomasDEV

Reputation: 95

The issue was I was using the wrong address, instead of using the implementation contract address i was using the transparent proxy address, the one you use to integrate with the dapp...

Upvotes: 0

Related Questions