An issue with compiling an old code

Hello guys!

3 months ago I used Remix Ethereum to create my very own token on the Polygon blockchain.

Today I wanted to Verify the ownership of this token on Polygonscan, but I stumbled upon an issue. I need submit some information about the token which I no longer have. However, for some reason I screenshotted the code that I compiled for my token (thank god) and I tried to use the same code to compile it again and get the necessary files out of it.

Here is the screenshot of the original code:

Here is what happens when I try to compile the exact same code today and I get an error:

I am kindly asking, how can I make this work?

The ERC20 contract which you import, uses named parameters in the _balances mapping.

The feature of named parameters in mapping types is supported starting from solc v0.8.18:


Changelog

Language Features:

  • Allow named parameters in mapping types.

However, you are trying to compile your contract with an older version, namely - solc v0.8.0:

image

1 Like

You are right <3, I tried to incrementally update the version, and first version which compiled the code was: 0.8.20+commit.a1b79de6

Let me try to get the verification going now, I will report back here.

Sure thing; If you're moving to v0.8.20 or higher, then you probably want to keep this in mind:

1 Like

Okay, I got it to compile, here is the Remix Ethereum picture:

When I try to verify it on Polygonscan, I get this error.

1 Like

I will try to follow the steps <3

1 Like