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.
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.
Hmm, I donât think so.
Remix clearly stated âcontracts/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)