Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract verified on rinkeby but failed on ETH mainnet #194

Closed
lbastian10 opened this issue Mar 31, 2022 · 5 comments
Closed

contract verified on rinkeby but failed on ETH mainnet #194

lbastian10 opened this issue Mar 31, 2022 · 5 comments

Comments

@lbastian10
Copy link

Hi im been trying to verify my contract on ETH mainnet for always failed but the same contract worked fine and was verified on rinkeby

Error in plugin @nomiclabs/hardhat-etherscan: The contract verification failed.
Reason: Fail - Unable to verify

For more info run Hardhat with --show-stack-traces
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

thanks

@Salro1g
Copy link

Salro1g commented Apr 1, 2022

Do you have enough eth to pay the gas and the contract for your collection?¿

@lbastian10
Copy link
Author

i already paid ETH for deploying the contract. but could be that i dont have enough to cover the whole collection.
is it anyway to check what could be the price for the whole collection

Screen Shot 2022-03-31 at 1 10 16 PM

mainnet appears on red but when i change to other network appears on black

thank you for your response

@liarco
Copy link
Member

liarco commented Apr 2, 2022

Hi @lbastian10, please avoid posting the same question multiple times. I already answered here.

About the mainnet appearing "red" that's correct. The main network is shown as red as a warning so the user knows that he must pay attention to what he is doing.

Also verifying the collection doesn't cost anything, so you don't need any ETH for this.

Please reply here if you need any further help with this.

@lbastian10
Copy link
Author

lbastian10 commented Apr 2, 2022

thank you for your response, @liarco

probably thats what happening that i update some dependency or something but it was cause the couple of times that i tried verifying failed so i was trying to fixit.

i've been trying so many thing but always failed, even manually verification.
Screen Shot 2022-04-02 at 1 24 41 PM

what would you recommend ? to make a new fresh contract

thank you so much

@liarco
Copy link
Member

liarco commented Apr 2, 2022

@lbastian10, I'm sorry but trying to get back to the original code you had when you deployed the contract might cost you more than deploying again.

If your only option is to deploy again, then here is what I suggest:

  1. start from a brand new project folder
  2. install all dependencies and make sure everything is working correctly
  3. make all the changes to the configuration as explained in my videos
  4. deploy and verify on the testnet without touching any file in your project
  5. make sure everything works fine on the testnet
  6. reset the contractAddress value in your configuration
  7. deploy to the mainnet
  8. update the contract address
  9. verify immediately without changing any file

I hope this helps.

@liarco liarco closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants