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 UI #6219

Open
wants to merge 53 commits into
base: feat/port-ignition-hardhat-3
Choose a base branch
from

Conversation

kanej
Copy link
Member

@kanej kanej commented Feb 3, 2025

Bring ignition-ui into v-next.

TODO

  • Move files into place
  • Update to typescript 5.5
  • Apply prettier formatting
  • Update eslint rules and apply them
  • Bring back tests
  • Rename package to v-next format

kanej added 30 commits February 3, 2025 13:40
The move here is to remove Ignition from the Hardhat 2 packages and
build, but to a temp folder. We then move the packages into `v-next`
incrementally.
This is a mechanical file move, no tweaks to support build.
This pattern allows us to provide custom inspection functions without
violating the isolated declarations typescript option.
Our typescript 5.5 config includes isoldated declarations. Several
mechanical type additions where added to meet this.

However there was one non-trivial change. The setting of custom
inspectors on Future objects was altered to meet the rules of have class
with statically defined properties. The inspection methods became
private and a small addition to the constructor swaps them to the
`util.inspect.custom` symbol on creation.
Work around isolated declarations explicity by disabling them in mocha
tests during transpilation.

This will go away when we convert over to Node Test.
This is to support modern tsconfig options.
Some eslint rules are disabled for the moment. They will be dealt with
in separate commits
This commit is made by apply `eslint --fix` and a few small manual
changes that are unlikely to be contentious.
Ignition currently depends on the old version of Hardhat. For the moment
lets build that as a project ref to keep the CI green.
This needs revisited.
We will bring these back when we have Hardhat 3 as a proper dependency.
Remove the dep on fs-extra to avoid trying to figure out how to ESM the
usage.
This is to avoid asyncing every function.
Add a format property to mimic the Hardhat version. This allows us to
not rely directly on the Hardhat artifact type from `core`.
We were pulling in Artifact for testing, and HRE for testing.

I have left a todo to rewire HRE setup to a proper type.
We work around asyncing up the chain by directly importing the specific
function.
We don't actually have access to HRE. We will bring it back later.
We are holding on pulling in the hardhat-utils version for the moment.
`cbor` is deprecated and commonjs.
The readFile changes to util changed the error returned. An assertion
(flow control throw exceptions booooo) guard had to be changed to match
the new error found.
This should be temporary. To run mocha with the latest tsconfig, we
override the tsconfig rules via an env variable. For this to work with
windows we are using `cross-env`.

This should be removed when we port to Node Test Runner.
Bring all `v-next` packages into line on the latest `ethers`.
Bring all v-next packages into line on ^4.1.7 for `@types/debug`.
kanej added 3 commits February 3, 2025 16:57
This is a mechanical move of the files.
Switch to the new name for the ignition-core package.

Update the refs to ignition-core in the code.
@kanej kanej added the v-next A Hardhat v3 development task label Feb 3, 2025
Copy link

changeset-bot bot commented Feb 3, 2025

⚠️ No Changeset found

Latest commit: 98666e0

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 3, 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 3, 2025 11:24pm

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 3, 2025
@kanej kanej added the no changeset needed This PR doesn't require a changeset label Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 3, 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
344K	@sentry/hub
324K	@ignored/hardhat-vnext-errors
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 13 commits February 3, 2025 23:23
Update the version to match the rest of `v-next`, and update the npm
scripts to match the standard linting approach.
This is a mechanical application of `pnpm prettier --write`.
Update the version of eslint and use the shared v-next rules.
Fix up issues with the code based on the latest eslint rules in v-next.
To support ESM we are pulling in the same versions we used in
ignition-core.
@kanej kanej force-pushed the feat/port-ignition-ui branch from b4418d7 to 98666e0 Compare February 3, 2025 23:23
@kanej kanej marked this pull request as ready for review February 3, 2025 23:31
@kanej kanej linked an issue Feb 4, 2025 that may be closed by this pull request
@kanej kanej force-pushed the feat/port-ignition-hardhat-3 branch from 5b743e2 to 0501043 Compare February 4, 2025 14:37
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 ignition-ui to Hardhat 3
1 participant