-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimulate.sh
More file actions
executable file
·45 lines (36 loc) · 1.14 KB
/
simulate.sh
File metadata and controls
executable file
·45 lines (36 loc) · 1.14 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
#!/bin/bash
# CrestAI Simulation Script
# This script simulates the entire CRE workflow locally
echo "🚀 CrestAI - Chainlink Runtime Environment Simulation"
echo "=================================================="
echo ""
# Check if CRE CLI is installed
if ! command -v cre &> /dev/null; then
echo "❌ CRE CLI not found. Installing..."
npm install -g @chainlink/cre-cli
fi
# Navigate to workflow directory
cd cre-workflow
# Check if secrets file exists
if [ ! -f "secrets.json" ]; then
echo "⚠️ secrets.json not found. Creating from example..."
cp secrets.example.json secrets.json
echo "📝 Please update secrets.json with your actual API keys"
exit 1
fi
echo "📦 Installing dependencies..."
npm install
echo ""
echo "🔧 Building workflow..."
npm run build
echo ""
#🎯 Run the JS simulation script to generate simulation-results.json
node ../scripts/simulate-workflow.js
echo ""
echo "✅ Simulation complete!"
echo ""
echo "Next steps:"
echo "1. Review the simulation results"
echo "2. Deploy contracts: npm run deploy:testnet"
echo "3. Configure Tenderly Virtual Testnet"
echo "4. Test the full flow on the frontend"