Skip to content

backmerge 22-05-26 (next 16, alchemy key, hardhat v3)#427

Open
technophile-04 wants to merge 8 commits into
mainfrom
backmerge-20-05-26
Open

backmerge 22-05-26 (next 16, alchemy key, hardhat v3)#427
technophile-04 wants to merge 8 commits into
mainfrom
backmerge-20-05-26

Conversation

@technophile-04
Copy link
Copy Markdown
Collaborator

@technophile-04 technophile-04 commented May 20, 2026

Bundled backmerge of three upstream scaffold-eth-2 PRs:

Notes on the hardhat v3 migration (scaffold-eth#1272)

  • Introduces rocketh (replacing hardhat-deploy's runtime) — new packages/hardhat/rocketh/{config,deploy,environment}.ts relocated into the hardhat template.
  • hardhat.config.ts template rewritten to v3 defineConfig form: plugins, per-network type (http/edr-simulated), solidity.profiles, generateTypedArtifacts, and tasks: [overrideTask("deploy")...]. Exports etherscanApiKey (consumed by the new scripts/runVerify.ts).
  • Hardhat package is now ESM ("type": "module"), uses @nomicfoundation/hardhat-toolbox-mocha-ethers, tsx, hardhat-deploy@^2, mocha, etc.
  • tsconfig moves to node16 module/moduleResolution, es2022 target.
  • Blockexplorer page (hardhat branch): build-info now filtered to .output.json and contract path prefixed project/contracts/. Foundry branch unchanged.
  • Node ≥ 22.13 required by hardhat v3. Generated project engines set to >=22.10.0 (matching upstream) via the hardhat override; CI lint-instances.yml node bumped 20.x → lts/*. The templated project workflow already uses lts/*.

Local validation (node 22.20.0)

Generated a hardhat project and ran the full flow — all green:

  • yarn compile
  • yarn test ✓ (2 passing)
  • yarn deploy ✓ (contract deployed, deployedContracts.ts generated)
  • yarn verify --help ✓ (etherscanApiKey import resolves)
  • yarn hardhat:check-types / yarn hardhat:lint
  • yarn next:check-types / yarn next:lint

Foundry project generation verified (shared blockexplorer template unaffected).

Test plan

  • CI: hardhat / hardhat_with_extension jobs compile, deploy, lint, type-check on node lts/*
  • CI: foundry / no_solidity_framework jobs still pass

rin-st and others added 5 commits May 15, 2026 17:25
# Conflicts:
#	packages/hardhat/hardhat.config.ts
#	packages/nextjs/next.config.ts
#	packages/nextjs/scaffold.config.ts
#	packages/nextjs/tsconfig.json
#	templates/base/packages/nextjs/app/blockexplorer/address/[address]/page.tsx.template.mjs
#	templates/base/packages/nextjs/package.json
#	yarn.lock
Users paste ABIs into externalContracts.ts and expect prettier to
format on save / yarn format. The contracts/ exclusion was meant for
generated deployedContracts.ts but caught externalContracts.ts too.
Copy link
Copy Markdown
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great for me!

# Conflicts:
#	package.json
#	packages/hardhat/hardhat.config.ts
#	packages/hardhat/package.json
#	packages/hardhat/tsconfig.json
#	templates/base/packages/nextjs/app/blockexplorer/address/[address]/page.tsx.template.mjs
#	templates/solidity-frameworks/hardhat/packages/hardhat/scripts/runVerify.ts
#	yarn.lock
@technophile-04 technophile-04 changed the title backmerge 20-05-26 backmerge 22-05-26 (next 16, alchemy key, hardhat v3) May 22, 2026
@rin-st
Copy link
Copy Markdown
Member

rin-st commented May 22, 2026

one suggestion - let's move this line to /rocketh/deploy.ts so we don't need to import it in every deployment file, as it is in the docs

export * as artifacts from "../generated/artifacts/index.js";

Screenshot 2026-05-22 at 18 10 43

and then in deployment files just

import { artifacts, deployScript } from "../rocketh/deploy.js";

instead of

import { deployScript } from "../rocketh/deploy.js";
import * as artifacts from "../generated/artifacts/index.js";

and one more thing, hh checks still stuck
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants