DEV Community

Crypt0Safety
Crypt0Safety

Posted on

Asking for help correcting a Smart Contract in order to verify it

Hello All,

I am in process of cloning an existing smart contract and make it my own.
I can deploy it successfully and write to the contract through remix.
However, I permanently fail to successfully verify my own adjusted contract on chain.

https://github.com/Crypt0Safety/BabySushi-Token/blob/main/BabySushi.sol

What I noticed after was that there was no “pragma solidity ^0.6.12;” before “contract BABYSUSHI is ERC20, Ownable {”, and the last “pragma solidity ^0.6.2;” was before “library IterableMapping {”.
And I see that the reason why it was detected as contract “IterableMapping”, and not as “BABYSUSHI”.
Since I changed/adjusted that I fail to verify the contract with:

Compiler debug log:
Error! Unable to generate Contract ByteCode and ABI (Expected library(ies) but one or more was not provided)
Found the following ContractName(s) in source code : BABYSUSHI, BABYSUSHIDividendTracker, Context, DividendPayingToken, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface, ERC20, IERC20, IERC20Metadata, IUniswapV2Factory, IUniswapV2Pair, IUniswapV2Router01, IUniswapV2Router02, IterableMapping, Ownable, SafeMath, SafeMathInt, SafeMathUint
But we were unable to locate a matching bytecode (err_code_2)

It either fails to verify on " Error! Unable to generate Contract ByteCode and ABI (Expected library(ies) but one or more was not provided)".
Or I can get it verified, but it is then verified as contract name “IterableMapping” and I cannot read nor write to the contract on chain.
Any help on finding and correcting my mistake would be highly appreciated indeed.

https://polygonscan.com/address/0x55797e8b9adf56dc41f6939a0b767ec2d7e6e449

Many thanks for any assist in advanced.

Top comments (0)