Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no scripts folder in hardhat framework instead there's ignition folder with a subfolder named modules

I have noticed that in my VS Code environment for the Hardhat framework, there is an "ignition" folder instead of a "scripts" folder. Could someone explain why this discrepancy exists and whether these folders serve the same purpose?

I attempted to find information on the difference between them through Google and the official documentation but was unable to find any relevant details.

Thank you for any insights you can provide regarding this matter.

like image 229
Gothams_Bat Avatar asked Jan 19 '26 12:01

Gothams_Bat


1 Answers

Yes, hardhat is moving away from hardhat-deploy and moving towards Ignition. Nomic Foundation posted a blog here. It's not a discrepancy, just a very recent change introduced in v2.22.1.

As Erin said, everything that you would've done under scripts/ via hardhat-deploy is now under Ignition (who operates using the ignition/ folder).

You don't really see comparisons between hardhat-deploy and Ignition because Ignition does everything hardhat-deploy did. The main difference is that Ignition combines contract deployment and contract execution. In practice, this means you can run one file to do both. In hardhat-deploy, you'd have to run a file to (1) deploy smart contract, and a file to (2) execute methods on the contract.

Other notable distinction:

With 'typical' hardhat-deploy, you'd have to rely on ethers.js, etc., to deploy your smart contract. With Ignition, you just use hardhat. In other words, deployment was made much simpler. You can write less code to do the same thing (or more!).

Extra details on their differences can be found in this article.

like image 94
Grace Nguyen Avatar answered Jan 22 '26 02:01

Grace Nguyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!