Files
smom-dbis-138/scripts/automation/fix-hardhat-deps.sh
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

49 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# Fix Hardhat dependency resolution
set -e
cd "$(dirname "$0")/../.."
echo "=== Fixing Hardhat Dependencies ==="
# Check if package.json exists
if [ ! -f "package.json" ]; then
echo "❌ package.json not found"
exit 1
fi
# Install OpenZeppelin v5.0.2
echo "Installing @openzeppelin/contracts@5.0.2..."
npm install @openzeppelin/contracts@5.0.2 --save-dev
# Install Chainlink CCIP contracts
echo "Installing @chainlink/contracts-ccip..."
npm install @chainlink/contracts-ccip --save-dev
# Clean Hardhat cache
echo "Cleaning Hardhat cache..."
npx hardhat clean || true
# Try to compile
echo "Attempting to compile..."
if npx hardhat compile 2>&1 | grep -q "Error"; then
echo "⚠️ Compilation errors detected, trying alternative approach..."
# Try with --force
npm install --legacy-peer-deps --force
# Try compiling again
npx hardhat clean
npx hardhat compile || {
echo "❌ Compilation still failing"
echo "Trying yarn as alternative..."
if command -v yarn &> /dev/null; then
yarn install
yarn hardhat compile || echo "❌ Yarn compilation also failed"
fi
}
fi
echo "✅ Dependency fix complete"