Help Verifying ERC20 Contract

Hi there,

I am in need of help verifying a simple ERC20 contract deployed in remix. I have followed these tutorials:

And still have no solution.

Here is the error when compiling the flattened contract, with repo version specified...

Compiler debug log:
 Error! Unable to generate Contract Bytecode and ABI
 Found the following ContractName(s) in source code : Context, ECDSA, EIP712, ERC20, ERC20Burnable, ERC20Permit, IERC1155Errors, IERC20, IERC20Errors, IERC20Metadata, IERC20Permit, IERC5267, IERC721Errors, Math, MessageHashUtils, MyToken, Nonces, Ownable, ShortStrings, SignedMath, StorageSlot, Strings
 But we were unable to locate a matching bytecode (err_code_2)
 For troubleshooting, you can try compiling your source code with the Remix - Solidity IDE and check for exceptions


Compiler Version: v0.8.20+commit.a1b79de6
Optimization Enabled: True
Runs: 200
Bytecode (what we are looking for):
61016060405<<<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
60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f526<<<shortened>>>

2) Math
60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281<<<shortened>>>

3) MessageHashUtils
60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000<<<shortened>>>

4) MyToken
61016060405234801562000011575f80fd5b50604051620015d6380380620015d6833981016040819052620000349162000292565b6040518060400160405280600781526020016626bcaa37b5b2b760c91b81525080604051806040016040528060018152602001603160f81b815250836040518060400160405280600781526020016626bcaa37b5b2b760c91b815250604051806040016040528060038152602001624d544b60e81b8152508160039081620000bd919062000361565b506004620000cc828262000361565b5050506001<<<shortened>>>

5) ShortStrings
60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281<<<shortened>>>

6) SignedMath
60556032600b8282823980515f1a607314602657634e487b<<<shortened>>>

7) StorageSlot
60556032600b8282823980515f1a607314602657634e487b7<<<shortened>>>

8) Strings
60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f5260738153<<<shortened>>>

This is on the sepolia test network.

The contract address is:

0x2b9f6d02228b572e33b2A4cda06dcdC49e527d37

and the constructor arguments are:

00000000000000000000000001e0a771dc549744685d41f48ba590230240ada2

I did not use optimization.

I want to understand where I went wrong and how to correct it.

I have tried the tool in Remix to no success.

2 Likes

You say you did not use optimization but when you try to verify it you verify it as if optimization was enabled with 200 runs:

image

Try to adjust that setting, disable optimization. Then try again.

3 Likes

Hello
@Patupai
I can help you to verify your smart contract.
If possible, could we discuss via Telegram?
TG name: @DesarrollaorTalentosa
I will wait for your reply.
Thanks.

2 Likes

This:

And this:

Don't quite get along that well with each other.

In addition to that, you may need to reconsider this:

If you're using pragma solidity ^0.8.20 in your source code (which is what open-zeppelin are currently using in their source code), then at the time of writing this, you may have compiled your contract with any of the following versions:

  • v0.8.20+commit.a1b79de6
  • v0.8.21+commit.d9974bed
  • v0.8.22+commit.4fc1097e
  • v0.8.23+commit.f704f362
  • v0.8.24+commit.e11b9ed9

For your contract verification procedure to succeed, you need to find out exactly which compiler version you have used.

2 Likes

Hello,
Greetings!

I've reviewed your requirements and sent you a DM regarding that. Please check and reply at your earliest convenience.

Feel free to reach out:

jack@technogiq(dot)com
Skype: live:.cid.a0f06a69cf1c6478

Looking forward to hearing from you.

Regards,
Jack Smith

Thankyou @warrior_dragon and @jack04 for offering to help and reaching out. I respect the hustle.

The advice from @denyo1986 and @barakman pointed me in the right direction, along with some Patrick Collins tutorials to the point where I no longer need help on this.

Thank you for your support.

1 Like