0

I just tried to verify my token contract in Etherscan with a flattened version of the contract, generated from the Remix feature. It is a standard openzeppelin ERC20 contract and got the following error:

Optimization Enabled: False
Runs: 0
Bytecode (what we are looking for):
61016060405234801562000011575f80fd5b5060405162002a5a38038062002a5a8339818101604052810190620000379190620004c0565b6040518060400160405280600781526020017f4d795<<shortened>>

- vs what we got -

We tried looking for a match from the list of compiled contract bytecode outputs (as listed below), but was unable to find an exact match.

1) ECDSA
6055604b600b8282<<shortened>>

2) Math
6055604b600b8282823<<shortened>>

3) MessageHashUtils
6055604b600b8282823980515f1<<shortened>>

4) MyToken
61016060405234801562000011<<shortened>>

6) SignedMath
6055604b600b8282823980<<shortened>>

7) StorageSlot
6055604b600b828282398051<<shortened>>

8) Strings
6055604b600b8282823980<<shortened>>

I've checked the compiler version and it's correct. Chat GPT suggests it's an error with the flattener tool in remix.

Has anyone else had this problem? How did you fix it?

I have tried verifying with the etherscan plugin to no success - the verifications get stuck in pending.

1
  • How was the contract deployed? Are you sure you used the same contract versions? Also check the compilation parameters: runs, optimizations, compiler version, etc.
    – Ismael
    Commented Feb 1 at 4:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.