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

Add Hardhat Ignition to hardhat-toolbox #4655

Merged
merged 41 commits into from
Mar 14, 2024
Merged

Add Hardhat Ignition to hardhat-toolbox #4655

merged 41 commits into from
Mar 14, 2024

Conversation

zoeyTM
Copy link
Contributor

@zoeyTM zoeyTM commented Dec 7, 2023

Updates the @nomicfoundation/hardhat-toolbox and @nomicfoundation/hardhat-toolbox-viem packages to include Hardhat Ignition.

This includes

  • Updated sample projects with Hardhat Ignition files
  • Added Hardhat Ignition to hardhat-toolbox and hardhat-toolbox-viem
  • Updated relevant docs to use Hardhat Ignition where relevant

A sibling PR to update hardhat-boilerplate has also been opened.

resolves NomicFoundation/hardhat-ignition#614
resolves NomicFoundation/hardhat-ignition#613

Manual Testing Instructions

To manually create HH projects with the new toolbox:

  1. Pull the branch locally
  2. Install the new deps: pnpm install
  3. Apply the changeset versioning locally: npx changeset version
  4. Run the build pnpm build
  5. Start a new verdaccio instance and login (see https://www.notion.so/nomicfoundation/Using-verdaccio-e15e379b59a64ef8a82fe0c1a6b93dd8?pvs=4)
  6. publish hardhat to verdaccio:
cd packages/hardhat-core
pnpm publish --registry=http://localhost:4873/ --no-git-check
  1. publish @nomicfoundation/hardhat-toolbox to verdaccio:
cd packages/hardhat-toolbox
pnpm publish --registry=http://localhost:4873/ --no-git-check
  1. publish @nomicfoundation/hardhat-toolbox-viem to verdaccio:
cd packages/hardhat-toolbox-viem
pnpm publish --registry=http://localhost:4873/ --no-git-check
  1. Install the new hardhat globally from verdaccio (is there a better approach? Also you might want to do this outside a volta controller directory):
npm install -g [email protected] --registry=http://localhost:4873/
  1. Create your new sample project with the globally installed hardhat:
hardhat --version
# 2.20.2
echo "registry=http://localhost:4873" > .npmrc
hardhat init
  1. Run the docs locally:
cd docs
pnpm install
pnpm dev

Questions and decisions

  • Are we happy with the failing CI Test - yes a local manual run with updated versions counts as a pass
  • How do we approach scripting in the docs given that it is currently about deploymeent
    • Remove the scripts from the sample projects
    • Remove the scripting guide from basic, move it to advanced and show a replacement script story (e.g. "how long left in timelock")
  • Confirm whether we are updating the verification guide - yes
    • short intro going through ignition verification
    • follow on section for manual verification based on existing guide
  • Are we updating the deployment contracts to reflect the danger of msg.sender in a create2 context?
    • no - lets see if anyone raises it as an issue and reconsider

TODO

  • Confirm whether we are updating the hackathon guide
  • Manually test the new sample projects
  • Investigate assert.isDefined issue - see comment in PR
  • Investigate no ignition in tasks issue - see comment in PR
  • Update verification guide in HH
  • Update docs to move scripts from basic to advanced
  • Remove scripts from sample project + update their readmes
  • Update sample projects with a parameters json file
  • Review example to work better with Ignition, specifically it is a complicated example that needs lots of Ignition Module features explained.
  • Run through the Tutorial section of the docs manually @ChristopherDedominici
  • Run through the Guides section of the docs manually, key areas of focus: @schaable
    • Setting up a project
    • Testing contracts
    • Deploying your contracts
    • Verifying your contracts
    • Writing tasks
  • Run through hardhat-boilerplate @kanej
  • Run through the Scripts section of Advanced in the docs manually @kanej
  • Local manual run of end to end tests with bumped versions
  • Double check typescript peer dependency constraint as raised here: chore(hardhat-viem,hardhat-toolbox-viem): updated package.json with loosen version constraints for typescript #4955 @kanej

Copy link

changeset-bot bot commented Dec 7, 2023

🦋 Changeset detected

Latest commit: 26720f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
hardhat Patch
@nomicfoundation/hardhat-toolbox Major
@nomicfoundation/hardhat-toolbox-viem Major
benchmark Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Dec 7, 2023

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 Mar 14, 2024 1:30pm

@kanej kanej added status:ready This issue is ready to be worked on and removed status:triaging labels Dec 15, 2023
kanej and others added 24 commits March 14, 2024 13:20
The rest of the version changes will happen with changeset application.

Also update some of the test fixture projects that don't seem to update
when the changeset is applied.
We don't show Ignition in tests in the sample.
It will be installed because both `hardhat-ignition-ethers and
`hardhat-ignition-viem` have it as a dep.
Move to `v0.15.0` to get create2 support.
Viem requires `5.0.4` or greater, but we should allow higher minor
versions in the peer deps for projects pulling in the viem toolbox.
Chai's proxy behaviour is causing an issue. A version bump fixed this
previously but it has come back. I am switching to a simpler revert for
now.
This will bring in bug fixes from EDR.
@kanej
Copy link
Member

kanej commented Mar 14, 2024

I have run the e2e tests locally. They are failing due to the new toolboxes not being in npm.

@kanej kanej merged commit 3ee20fc into main Mar 14, 2024
96 of 99 checks passed
@kanej kanej deleted the ignition-init branch March 14, 2024 13:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update HH init and sample projects Update HH docs to reflect move to toolbox
5 participants