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:
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:
Yes, this is because Solc Version 0.8.20 has switched the default target EVM version to Shanghai:
IMPORTANT NOTE: This compiler switches the default target EVM version to Shanghai, which means that the generated bytecode will include PUSH0 opcodes. Be sure to select the appropriate EVM version in case you intend to deploy on a chain other than mainnet like L2 chains that may not yet support PUSH0, otherwise deployment of your contracts will fail.
And the default target EVM version is set to …
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.
I will try to follow the steps <3
1 Like