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

Migrate to Hardhat ignition #644

Closed
wants to merge 20 commits into from
Closed

Migrate to Hardhat ignition #644

wants to merge 20 commits into from

Conversation

technophile-04
Copy link
Collaborator

@technophile-04 technophile-04 commented Dec 5, 2023

Description

Done:

  • Update the required dependencies for Hardhat Ignitions
  • Setup basic YourContract deployment inline with Hardhat Ignitons
  • Generate TS Abi script and also grab inheritedFunctions inline with ignition
  • Verify Contract

TODO :

  • Update generateTsAbis logic to generate from a singular file generated from Hardhat Ignition
    • Hardhat ignition support for generating singular file containing all deployments (we talked about this on TG)
  • Figure out package.json scripts to make it generic because currently, you have to mention the path with ignition

@technophile-04
Copy link
Collaborator Author

technophile-04 commented Dec 6, 2023

Descriptions :

Some quick resources to get nice idea about Hardhat igniton :

  1. Overview
  2. Module defination API
  3. Deploying a Contract / Futures

Flow :

Make sure chain is running :

yarn chain 

Deploying contracts:

In order the deploy the YourContract.sol :

yarn deploy ignition/modules/DeployYourContract.ts

Check out more description about hardhat ignition deployment here.

PS: If we want proper path autocompletion in the terminal we need to tell people to first cd packages/hardhat and then run this command

NOTE: If you are getting contract already deployed and want to re-deploy it you need to run :

 cd packages/hardhat && yarn hardhat ignition wipe chain-31337 DeployYourContract#YourContract 

More details about wipe command here ,In hardhat-deploy we used to just do yarn deploy --reset

To generate frontend deployedContracts.ts :

yarn generate-ts-abi

Verification :

To deploy contract on sepolia (make sure you have genreated accoutn yarn generate / have PK in .env)

yarn deploy ignition/modules/DeployYourContract.ts --network sepolia

To verify deployed contracts yarn verify ${deploymentId} => yarn verfiy chain-${chainId}(since we are uing default deploymentID). Therefore to verify all the deployments of sepolia :

yarn verify chain-11155111

@technophile-04 technophile-04 linked an issue Dec 8, 2023 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Migrate to Hardhat Ignition
1 participant