Etherscan unable to verify Uniswap V2 clone contract #2894
-
I tried running this script in foundry to deploy my contract to Sepolia but when it got to the verification part it gave me an error saying the compiled byte-code does not match the existing byte-code. I made sure my Etherscan-API key was working so I'm really not sure what the issue could be. If someone could help me figure out this error I would appreciate it. Command:
Error:
DeployCrypticFlowRouter contract:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
This part used to be a tough one for me, too. |
Beta Was this translation helpful? Give feedback.
-
I'm glad it worked but I have no idea why. |
Beta Was this translation helpful? Give feedback.
Ok nevermind. I figured it out. 😅
I just added --via-ir to the end of the forge script command and it worked. I'm glad it worked but I have no idea why.
I've only completed up to foundry advanced so I'm not sure if this is covered in later courses but it would be nice if there was a course all about this nuanced stuff like etherscan, foundry cast, slither, invariant tests(they're hard). Just somthing that covers most of the other stuff that isn't contract dev specifically. I'm sure I missed even more that could be covered but I constantly feel like I am being hindered by other steps that are part of the process like verifying on etherscan. I have had some sort of problem with contract ver…