From ad4406b17ea9bd14aed6064079d74b5028b4adeb Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 23:09:35 +0100 Subject: [PATCH] fix: install missing Hardhat toolbox dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HARDHAT DEPENDENCIES FIX: Resolve HH801 plugin dependency errors Issue Fixed: ❌ Error HH801: Plugin @nomicfoundation/hardhat-toolbox requires dependencies ❌ Missing: @nomicfoundation/hardhat-chai-matchers, hardhat-ethers, ethers, etc. ❌ Hardhat compilation failing due to missing dependencies Root Cause: - Hardhat toolbox plugin requires additional dependencies - package.json only includes base dependencies - npm install --legacy-peer-deps doesn't install toolbox dependencies - HH801 error prevents contract compilation Solution Applied: ✅ Install all required Hardhat toolbox dependencies ✅ Use exact versions specified by Hardhat error message ✅ Install with --legacy-peer-deps flag ✅ Complete dependency resolution Dependencies Added: - @nomicfoundation/hardhat-chai-matchers@^2.0.0 - @nomicfoundation/hardhat-ethers@^3.0.0 - @nomicfoundation/hardhat-ignition-ethers@^0.15.0 - @nomicfoundation/hardhat-network-helpers@^1.0.0 - @nomicfoundation/hardhat-verify@^2.0.0 - @typechain/ethers-v6@^0.5.0 - @typechain/hardhat@^9.0.0 - ethers@^6.4.0 - hardhat-gas-reporter@^1.0.8 - solidity-coverage@^0.8.1 - typechain@^8.3.0 Impact: - Hardhat compilation now works - No more HH801 dependency errors - Complete Hardhat toolbox functionality - Smart contract tests can run - Gas reporting and coverage available This resolves the critical dependency issue that was preventing Hardhat from compiling and testing smart contracts in the CI/CD environment. --- .gitea/workflows/smart-contract-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/smart-contract-tests.yml b/.gitea/workflows/smart-contract-tests.yml index 48225c64..c37c570b 100644 --- a/.gitea/workflows/smart-contract-tests.yml +++ b/.gitea/workflows/smart-contract-tests.yml @@ -95,6 +95,10 @@ jobs: echo "Installing npm dependencies..." npm install --legacy-peer-deps + # Install missing Hardhat toolbox dependencies + echo "Installing Hardhat toolbox dependencies..." + npm install --save-dev "@nomicfoundation/hardhat-chai-matchers@^2.0.0" "@nomicfoundation/hardhat-ethers@^3.0.0" "@nomicfoundation/hardhat-ignition-ethers@^0.15.0" "@nomicfoundation/hardhat-network-helpers@^1.0.0" "@nomicfoundation/hardhat-verify@^2.0.0" "@typechain/ethers-v6@^0.5.0" "@typechain/hardhat@^9.0.0" "ethers@^6.4.0" "hardhat-gas-reporter@^1.0.8" "solidity-coverage@^0.8.1" "typechain@^8.3.0" --legacy-peer-deps + # Verify installation npx hardhat --version echo "✅ Hardhat dependencies installed successfully"