Files
sonr/contracts/wSNR/build.sh
Prad NukalaandGitHub 13e6c3e84d Master (#1262)
* clear

* feat: Add everything

* fix: Commenht
2025-10-03 14:45:52 -04:00

35 lines
879 B
Bash
Executable File

#!/bin/bash
set -e
echo "🔧 Setting up Foundry environment..."
# Source foundry if installed via foundryup
if [ -f "$HOME/.foundry/bin/forge" ]; then
export PATH="$HOME/.foundry/bin:$PATH"
fi
# Check if forge is available
if ! command -v forge &>/dev/null; then
echo "❌ Forge not found in PATH. Please ensure Foundry is installed:"
echo " curl -L https://foundry.paradigm.xyz | bash"
echo " foundryup"
echo ""
echo "Then run: source ~/.bashrc or source ~/.zshrc"
exit 1
fi
echo "✅ Forge found at: $(which forge)"
echo "📦 Installing OpenZeppelin contracts..."
# Install OpenZeppelin if not already installed
if [ ! -d "lib/openzeppelin-contracts" ]; then
forge install OpenZeppelin/openzeppelin-contracts@v5.0.0 --no-commit
else
echo "✅ OpenZeppelin already installed"
fi
echo "🏗️ Building contracts..."
forge build
echo "✅ Build complete!"