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

Errors encountered according to the tutorial instructions #2822

Open
ytqaljn opened this issue May 29, 2024 · 4 comments
Open

Errors encountered according to the tutorial instructions #2822

ytqaljn opened this issue May 29, 2024 · 4 comments

Comments

@ytqaljn
Copy link

ytqaljn commented May 29, 2024

Hi, I am following your tutorial to write a Cross Chain DAO.

However, an error occurred when deploying the contract, resulting in deployment failure.

Here is the tutorial document I referred to:

https://docs.moonbeam.network/tutorials/interoperability/cross-chain-dao/

This is the code for the contract CrossChainDAOToken that I want to deploy:

image

Exactly the same as in the tutorial.

I deploy using the following command:

npx hardhat ignition deploy ignition/modules/Box.js --network localhost

Then this is the error I encountered:

Hardhat Ignition 🚀

Deploying [ Box ]

Batch #1
Failed Box#CrossChainDAOToken

[ Box ] failed ⛔

Futures failed during execution:

  • Box#CrossChainDAOToken: Simulating the transaction failed with error: Reverted without reason

To learn how to handle these errors: https://hardhat.org/ignition-errors

Finally, this is the code of my ignition module:
image

Can someone help me solve this problem?

@albertov19
Copy link
Contributor

Hey @ytqaljn thanks for bringing this up.

Have you tried forcing compiler version to 0.8.24?

Also I think your deployment script is not really correct. Check this one here -> https://github.com/jboetticher/cross-chain-dao/blob/main/scripts/deploy-dao.js

@ytqaljn
Copy link
Author

ytqaljn commented Jun 3, 2024

OK, thank you. Let me try and see if it works.

The last one uses Factory. Is there any example of ignition?

@albertov19
Copy link
Contributor

Unfortunately not, but you should be able to migrate the code to Ignition by following some online guides. For example: https://blog.nomic.foundation/migrating-to-hardhat-ignition-from-hardhat-deploy-c17311bb658f

@ytqaljn
Copy link
Author

ytqaljn commented Jun 3, 2024

OK, thank you. Although the deployment is still not successful, thank you for your help. Maybe it is because the contract is too old. I am going to rewrite some contracts to try and deploy them through the examples you provided.

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

2 participants