Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/hardhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.16.0
node-version: 22.18.0
Comment on lines 12 to +15
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Hardhat v3 Node.js version support requirements

💡 Result:

Hardhat v3’s Node.js requirements are:

  • Minimum Node.js version: v22.10.0 or newer. (hardhat.org)
  • Support policy: Hardhat 3 supports even-numbered major Node.js releases (e.g., 22, 24, 26, …) while they’re maintained by the Node.js team (release status: Current / Active LTS / Maintenance). (hardhat.org)
  • When support is dropped: Hardhat stops supporting a Node version after it’s no longer maintained (Hardhat notes it will stop testing against it and may start using newer Node features). (hardhat.org)
  • Docs’ practical prerequisite wording:Node.js v22 or later.” (hardhat.org)

Citations:


🌐 Web query:

@nomicfoundation hardhat-verify Node.js version compatibility

💡 Result:

@nomicfoundation/hardhat-verify doesn’t define its own Node.js support window in isolation—its Node compatibility follows the Hardhat version it’s meant to be used with.

  • If you’re using Hardhat 3 / hardhat-verify v3.x: Hardhat 3 requires Node.js ≥ 22.10.0 and supports subsequent even-numbered Node majors while they’re maintained (so Node 23.x is not supported, but 22.x and 24.x are). [1][2]
  • If you’re using Hardhat 2 / older hardhat-verify: Hardhat supports released and supported even Node.js versions (Current/Active LTS/Maintenance) and drops support shortly after a Node version reaches EOL. [3]

Practical rule: pick your Hardhat major version first, then use a maintained even Node version that Hardhat supports (today that typically means an LTS even version). [3]

Sources
[1] https://hardhat.org/docs/reference/nodejs-support
[2] https://hardhat.org/docs/reference/nodejs-support.md
[3] https://v2.hardhat.org/hardhat-runner/docs/reference/stability-guarantees


🌐 Web query:

Node.js 22 compatibility issues Hardhat

💡 Result:

Common Node.js 22 + Hardhat compatibility issues (and fixes):

  1. Hardhat v2 prints “Node.js v22 is not supported”
  • Cause: you’re on an older Hardhat v2 that didn’t yet whitelist Node 22.
  • Fix: upgrade Hardhat v2 (the warning goes away once you’re on a newer v2 release). (ethereum.stackexchange.com)
  1. Hardhat 3 requires a minimum Node 22 patch level
  • Hardhat 3 supports Node.js ≥ v22.10.0 (and also supports newer even majors while maintained). If you’re on early Node 22 (e.g., 22.0.0), you can hit warnings/errors—upgrade Node within v22. (hardhat.org)
  1. Hardhat’s Node support policy can make “odd” versions warn
  • Hardhat targets supported even-numbered Node releases (Current / Active LTS / Maintenance), and warns once a Node line is out of its support window. (hardhat.org)

Quick checklist to resolve most reports:

  • Ensure you’re using a local Hardhat install (not global). (hardhat.org)
  • If staying on Hardhat v2: update hardhat to a recent v2.
  • If moving to Hardhat v3: use Node ≥ 22.10.0 (e.g., via nvm install 22.11.0 and nvm use 22.11.0). (hardhat.org)

If you paste your hardhat version, Node version (node -v), and the exact warning/error text, I can tell you which bucket you’re in and the minimal upgrade path.

Citations:


Update step name to match Node.js version.

The step name "Use Node.js 18" should be updated to "Use Node.js 22" for clarity, since the configured version is 22.18.0.

Note: Node.js 22.18.0 is fully supported by Hardhat v3 (which requires ≥ 22.10.0) and @nomicfoundation/hardhat-verify, so no compatibility concerns exist.

🧰 Tools
🪛 actionlint (1.7.10)

13-13: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In @.github/workflows/hardhat.yml around lines 12 - 15, Update the GitHub
Actions step name to match the configured Node.js version: change the step title
"Use Node.js 18" to "Use Node.js 22" in the workflow step that uses
actions/setup-node@v3 with node-version: 22.18.0 so the label accurately
reflects the Node runtime being installed.

- name: Install node modules
run: yarn install
- name: Unit test hardhat
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ publicKey.txt
# Hardhat files
cache
# artifacts
# types

# Hardhat Ignition deployments (contains deployment records)
# ignition/deployments/
ignition/network-chain-ids.json

# Tron Package
src/js/metacoin-config.js
Expand Down
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,39 @@ Deployment is done using Hardhat scripts
#### Deploy and verify upgradeable proxy contract

```bash
npx hardhat run scripts/deploy.ts --network <network>

npx hardhat verify --network <network> <contract_address>

# for Tron network,
tronbox migrate -f 1 --to 1 --network <network>
```

#### Upgrade proxy contract

Using Hardhat Ignition:

```bash
# upgrade using a parameter file for specific network
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network <network> --parameters ignition/parameters/<network>.json

# upgrade using inline parameters
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network <network> --parameters '{"GatewayUpgradeModule":{"chainId":<chainId>}}'

# upgrade across all EVM chains
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network arbitrumOne --parameters ignition/parameters/arbitrumOne.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network base --parameters ignition/parameters/base.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network bsc --parameters ignition/parameters/bsc.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network polygon --parameters ignition/parameters/polygon.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network optimisticEthereum --parameters ignition/parameters/optimisticEthereum.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network scroll --parameters ignition/parameters/scroll.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network celo --parameters ignition/parameters/celo.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network assetChain --parameters ignition/parameters/assetChain.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network lisk --parameters ignition/parameters/lisk.json && \
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network mainnet --parameters ignition/parameters/mainnet.json

# upgrade on testnet
npx hardhat ignition deploy ignition/modules/GatewayUpgrade.ts --network baseSepolia --parameters ignition/parameters/baseSepolia.json
```

Using legacy upgrade script:

```bash
npx hardhat run scripts/upgrade.ts --network <network>

Expand All @@ -33,8 +56,11 @@ npx hardhat run scripts/upgrade.ts --network arbitrumOne && npx hardhat run scri

# upgrade across all EVM testnet chains
npx hardhat run scripts/upgrade.ts --network arbitrumSepolia && npx hardhat run scripts/upgrade.ts --network amoy && npx hardhat run scripts/upgrade.ts --network baseSepolia && npx hardhat run scripts/upgrade.ts --network sepolia
```

# for Tron network,
For Tron network:

```bash
tronbox migrate -f 2 --to 2 --network <network>
```

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading