-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
42 lines (32 loc) · 1.15 KB
/
Copy pathsetup.sh
File metadata and controls
42 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Self-Resolving Prediction Market - Setup Script
# This script initializes the project with all dependencies
set -e
echo "🔧 Setting up Self-Resolving Prediction Market..."
# Check if foundry is installed
if ! command -v forge &> /dev/null; then
echo "📦 Installing Foundry..."
curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
foundryup
fi
echo "📚 Installing dependencies..."
# Install OpenZeppelin
forge install OpenZeppelin/openzeppelin-contracts --no-commit
# Install forge-std (if not already present)
forge install foundry-rs/forge-std --no-commit
echo "🔨 Building contracts..."
forge build
echo "🧪 Running tests..."
forge test
echo "✅ Setup complete!"
echo ""
echo "Available commands:"
echo " forge build - Compile contracts"
echo " forge test - Run tests"
echo " forge test -vvv - Run tests with verbose output"
echo " forge test --gas-report - Run tests with gas reporting"
echo ""
echo "For deployment:"
echo " 1. Set environment variables (see .env.example)"
echo " 2. Run: forge script script/Deploy.s.sol --broadcast"