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 hardhat ignition to hardhat monorepo #6066

Closed
wants to merge 1,390 commits into from
Closed

Conversation

zoeyTM
Copy link
Contributor

@zoeyTM zoeyTM commented Dec 19, 2024

This is the initial migration of the https://github.com/NomicFoundation/hardhat-ignition repo into the hardhat monorepo. The commit history should be preserved from the original ignition repo, and the entire project should now live in this repo within packages/hardhat-ignition.

The ignition project is not yet functional within this repo, that will come in a follow-up PR. This PR is simply the merge of the commit histories.

kanej and others added 30 commits October 16, 2023 19:51
Display a warning message in the `deploy` task. It indicates that
deployment is against an ephemeral network.

The implementation is to add extra information to the start run event,
specifically the `deploymentDir`, which then allows the UI event handler
to determine if the deployment is ephemeral.

This means injecting that information down throught the
`deploy`/`deployer` barrier. This is not ideal, but I think it is
legitimate to assume the UI should have access to all the passed in
config.

Resolves #553.
Switch the `artifact` version of `contractAt` to:

```js
m.contractAt(name, artifact, address)
```

This brings it into line with other artifact based signatures.

Resolves #557.
* update the status text for success
* update text of timed out futures
* update the failed text
* update status text for started futures
* don't expose strategy level information

This also updates the identifiers in the tests.
Define call ids based on the entire id of the contract being called, not just its name (PR 2)
…messages

Better validation error messages
Support fully qualified contract names (PR 3)
It splits the errors into two cases, with different messages:

- An autogenerated id is duplicated.
- An id provided by the user is duplicated.

It also changes the wording, so that we use the full id ("Module#autoId") only
 in the autogenerated case, and just the id ("userProvidedId") when the user 
provides it. This change is because the user may not recognize that 
"Module#userProvidedId" refers to the string they provided, as it has 
been changed.

Moves the `add future id to the builder` (used for checking duplicates across
modules and submodules) out from the assertion method and into each api
action. When a future is added to the module, we consider it safe to add
the future id to the list of previously seen future ids.

---------

Co-authored-by: John Kane <[email protected]>
Our display of the deployment starting panel is dependent on the
`RUN_START` event. This event was being triggered only once for a
deployment, on initialization of the deployment state, on the very first
run of the deployment. The panel was not being displayed on subsequent
runs.

Several moves have been made to fix this:

1. The original run start has been renamed to `DEPLOYMENT_INITIALIZE` and
   only has responsibility for setting the `chainId`. It is only ever run
   as the first message in a new deployment.
2. The execution engine is no longer invoked if there are no batches to
   run (i.e. no uncompleted futures).
3. A new `RUN_START` that is UI only has been added to the deployer.
   If there is a batch to execute, and the execution engine is being
   invoked, we trigger the new `RUN_START`.
4. The deployment initialize event in the state reducer only sets the
   `chainId` (rather than clearing executionStates as well).

The UI for displaying the execution panel has been shifted to the new
run start event.

These changes gives us the correct UI combinations:

- Show Deploying panel on fresh deploy
- Only show complete on rerun with no new futures
- Show Deploying panel on rerun with new futures

Fixes #566.
Add the reconciliation warnings to the deploying panel.

Refactor the test format utility used in display tests as well.

Fixes #567
Move the deployment start event to after the state initialization where
the chainId check is. This works, but I suspect we should consider
dealing with unknown exceptions occuring during UI processing.

The chainId check now throws an Ignition error from a new `DEPLOY` range
of errors. This error has been added to the whitelist (we don't need to
see the stack trace).

Fixes #571.
The future senders update the account to nonce+transactions list in such
away that existing pending transactions for the account are untouched.

No test has been added, but the case has been covered by enhancing the
example module to include an unexecuted future in the module.

Fixes #574.
Update the nonce storage to record based on sender.

Fixes #576
Copy link

changeset-bot bot commented Dec 19, 2024

⚠️ No Changeset found

Latest commit: a37b251

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 8:59am

@zoeyTM zoeyTM requested a review from kanej December 19, 2024 11:44
@zoeyTM zoeyTM requested a review from alcuadrado December 19, 2024 11:44
@zoeyTM zoeyTM added the no changeset needed This PR doesn't require a changeset label Dec 19, 2024
@schaable schaable added status:ready This issue is ready to be worked on v-next A Hardhat v3 development task and removed status:triaging labels Dec 30, 2024
@zoeyTM
Copy link
Contributor Author

zoeyTM commented Jan 17, 2025

Closing in favor of #6151

@zoeyTM zoeyTM closed this Jan 17, 2025
@zoeyTM zoeyTM deleted the hardhat-ignition-merge branch January 17, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changeset needed This PR doesn't require a changeset status:ready This issue is ready to be worked on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.