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

ignition: port ignition plugin #6227

Draft
wants to merge 42 commits into
base: v-next
Choose a base branch
from
Draft

Conversation

kanej
Copy link
Member

@kanej kanej commented Feb 5, 2025

Migrate @nomicfoundation/hardhat-ignition, the core CLI plugin.

TODO

  • Rework Ignition UI to be based off of the HH3 hook api

Review points

  • Adding a .replace("workspace:", "") for the npm version check

Follow-up tasks

  • Review config setup
  • Deal with task default values like deploymentId where currently we are using "" to represent no option given by user

Copy link

changeset-bot bot commented Feb 5, 2025

⚠️ No Changeset found

Latest commit: 90d7b95

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 Feb 5, 2025

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 Feb 6, 2025 10:37pm

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

hardhat

Total size of the bundle: 213M
Total number of dependencies (including transitive): 54

List of dependencies (sorted by size)
208M	total
29M	@ignored/edr-optimism-linux-x64-musl
29M	@ignored/edr-optimism-linux-x64-gnu
26M	@ignored/edr-optimism-linux-arm64-musl
26M	@ignored/edr-optimism-linux-arm64-gnu
22M	@ignored/edr-optimism-win32-x64-msvc
20M	esbuild
20M	@ignored/edr-optimism-darwin-x64
19M	@ignored/edr-optimism-darwin-arm64
2.8M	@sentry/tracing
2.5M	micro-eth-signer
1.9M	@noble/curves
1.7M	undici
1.2M	@sentry/types
1.2M	@noble/hashes
932K	@sentry/node
920K	@sentry/utils
856K	zod
832K	@ignored/hardhat-vnext-utils
624K	micro-packed
576K	tsx
548K	@sentry/core
544K	fast-equals
492K	@scure/bip39
460K	@ignored/edr
368K	ethereum-cryptography
348K	@ignored/hardhat-vnext-errors
344K	@sentry/hub
320K	enquirer
288K	semver
264K	@ignored/edr-optimism
192K	ws
168K	@scure/base
136K	get-tsconfig
136K	adm-zip
96K	@scure/bip32
92K	chalk
88K	tslib
88K	@sentry/minimal
76K	agent-base
72K	@nomicfoundation/solidity-analyzer
68K	debug
64K	lru_map
64K	https-proxy-agent
60K	@ignored/hardhat-vnext-zod-utils
56K	rfdc
48K	ansi-colors
44K	resolve.exports
40K	resolve-pkg-maps
36K	p-map
32K	cookie
24K	strip-ansi
24K	env-paths
24K	ansi-regex
20K	ms

kanej added 8 commits February 6, 2025 14:00
A mechanical move of the files to under `./v-next`.

This is the core plugin with the cli tasks.
Note we are removing the `hardhat-verify` dependency for the moment, it
has not been ported to `v-next`.
Bring back a working `pnpm clean` command by bringing rimraf in line
with v-next.
Pull in the new tsconfig.json settings.
Rename the ignition-core imports to use the new names.
This was a mechanical transform from applying
`(import\s+[^'"]+['"])(\..*?)(['"])` with `$1$2.js$3` as the
replacement.
This is a set of changes that are small and non-controversial.

The following commits will turn different parts of the codebase off.
kanej added 11 commits February 6, 2025 14:01
The core index code will change radically. It will be brought back a
task at a time once we have the new Hardhat 3 plugin boiler plate in
place.
One point for the future is isolated declrations does not work with
Ignition module files nicely.
There are some exclusions. We need to revisit those.
This is mainly eslint --fix. However there are a few other tweaks.
Move some further HardhatPluginError usages and stray assertion errors.
Bump the version of mocha and related packages to versions that support
ESM. Update the config and commands appropriately.

The pattern is modelled on the changes from `ignition-core`.
Remove the dep and replace with the v-next hardhat utils.

The usages have updated to match the equivalent function in utils.
kanej added 15 commits February 6, 2025 22:22
There is a new version of it coming that is ESM compatible. For the
moment we will dynamically import it.
Any tests use a project fixture has been set to skipped.

The usage of json5 was updated to reflect that it used a default export.
This commit pulls in the new version of Hardhat. It updates code and
tests but only to the level of building. Fixture tests remain turned
off.

The code changes where forced by the changes in the main types e.g. HRE.
A copy and paste error missed a few on dealing with a merge.
This is in prep for including it in the example project.
Add a plugin to index.ts with a single task of deploy. The task is a
placeholder.
This is to help with local testing.
We take the existing commented out deploy code and move it into a task
file. To do this we also:

* update `fs-extra` usages to `hardhat-utils`
* bring back the type extensions for config
* bring back the config tests
* add in a config hook to resolve ignitions config at both top and
  network level
This will get fixed up with post-alpha improvements in the plugin API.
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 v-next A Hardhat v3 development task
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Migrate hardhat-ignition to v-next
1 participant