1

This question will be very similar to this one, but I'm stuck and don't know what to do:

Token contract source code not verified

Anyways, my friend sent me 2 pieces of code, the actual contract code, which can be found here:

https://remix.ethereum.org/#optimize=true&version=soljson-v0.4.25+commit.59dbf8f1.js

And the interface:

https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20Interface.sol

Now I'm a coder and I understand that pasting just the first part of the code obviously wont work, so I deleted the import part and pasted in the interface. Then I ran the solidity-flattener over the code, and this is the output:

https://pastebin.com/xvtT3e1Z

However, the code isnt being verified on https://etherscan.io/verifyContract2 I get the following error:

https://puu.sh/BQMOg/fd3217d62e.png

What should I do, what am I doing wrong? The contract address is 0x3C403c5371113a7d3f91d4b9C9A88333Ca567e74, the compiler 0.4.21+commit.dfe3193c and contract name Victory.

Thank you for your help.

  • 1
    2) Constructor Arguments ABI-encoded (For contracts that accept constructor parameters): Did you supply the ABI code for the constructor arguments? – vhie Oct 26 '18 at 0:48
  • I did, still have the same problem. If I compare expected result and my generated bytecode, my bytecode is substantially shorter. – Rok Dolinar Oct 26 '18 at 8:34
  • Have you tried Optimization = No? – vhie Oct 26 '18 at 9:03
  • Yes, but the optimization must be Yes, because that's what my friend did when he created the contract. – Rok Dolinar Oct 26 '18 at 11:12
  • How were the contracts deployed? Did you try different versions of the compiler? You may also try setting optimization runs to 0. – Ismael Oct 26 '18 at 19:36
0

I successfully verified your contract in Etherscan and Blockscout: https://etherscan.io/address/0x3c403c5371113a7d3f91d4b9c9a88333ca567e74#code https://blockscout.com/eth/mainnet/address/0x3c403c5371113a7d3f91d4b9c9a88333ca567e74/contracts

I think the problem was with the wrong constructor arguments provided. But since Etherscan made the possibility to automatically auto-fill constructor arguments, verification process became easier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.