-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·62 lines (53 loc) · 1.82 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·62 lines (53 loc) · 1.82 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
echo "🚀 Setting up Steer Vault Template..."
echo ""
# Check if forge is installed
if ! command -v forge &> /dev/null; then
echo "❌ Foundry not found. Please install: https://book.getfoundry.sh/getting-started/installation"
exit 1
fi
echo "✅ Foundry found"
echo ""
# Initialize git if not already done
if [ ! -d ".git" ]; then
echo "📦 Initializing git repository..."
git init
echo ""
fi
# Install OpenZeppelin contracts
echo "📦 Installing OpenZeppelin contracts..."
forge install OpenZeppelin/openzeppelin-contracts@v5.0.0 --no-commit 2>/dev/null || forge install OpenZeppelin/openzeppelin-contracts@v5.0.0
echo ""
echo "📦 Installing OpenZeppelin upgradeable contracts..."
forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v5.0.0 --no-commit 2>/dev/null || forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v5.0.0
echo ""
echo "🔨 Building contracts..."
forge build
if [ $? -eq 0 ]; then
echo ""
echo "✅ Build successful!"
echo ""
echo "🧪 Running tests..."
forge test
if [ $? -eq 0 ]; then
echo ""
echo "✅ All tests passed!"
echo ""
echo "🎉 Setup complete! You're ready to build your vault."
echo ""
echo "Next steps:"
echo " 1. Copy src/examples/MinimalVault.sol to src/YourVault.sol"
echo " 2. Implement your strategy in the _handleTend() function"
echo " 3. Update totalAssets() if deploying to external protocols"
echo " 4. Run 'forge test' to verify everything works"
echo ""
echo "📖 Read ../docs/STEER-VAULT-INTEGRATION-GUIDE.md for detailed guide"
else
echo ""
echo "❌ Tests failed. Please check the output above."
fi
else
echo ""
echo "❌ Build failed. Please check the output above."
exit 1
fi