forked from NSPG13/agent-bounties
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreal-funding-rehearsal.sh
More file actions
47 lines (41 loc) · 1.55 KB
/
Copy pathreal-funding-rehearsal.sh
File metadata and controls
47 lines (41 loc) · 1.55 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
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
out_dir="${1:-target/real-funding-rehearsal}"
if command -v cygpath >/dev/null 2>&1 && [[ -n "${USERPROFILE:-}" ]]; then
export PATH="$(cygpath -u "$USERPROFILE")/.cargo/bin:$PATH"
fi
if [[ -d "${HOME:-}/.cargo/bin" ]]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [[ -d "/mnt/c/Users/${USER:-}/.cargo/bin" ]]; then
export PATH="/mnt/c/Users/${USER}/.cargo/bin:$PATH"
fi
if ! command -v cargo >/dev/null 2>&1 && command -v cargo.exe >/dev/null 2>&1; then
cargo() { cargo.exe "$@"; }
fi
if command -v python3 >/dev/null 2>&1; then
python_cmd=(python3)
elif command -v python >/dev/null 2>&1; then
python_cmd=(python)
elif command -v py >/dev/null 2>&1; then
python_cmd=(py -3)
elif command -v py.exe >/dev/null 2>&1; then
python_cmd=(py.exe -3)
else
echo "python3, python, or py is required to validate real funding rehearsal artifacts" >&2
exit 127
fi
cd "$repo_root"
mkdir -p "$out_dir"
cargo run -q -p cli -- discovery \
--public-base-url https://agentbounties.example \
--mcp-base-url https://agentbounties.example/mcp \
> "$out_dir/autonomous-discovery.json"
cargo run -q -p cli -- real-funding-readiness \
--network base-sepolia \
--escrow-contract 0x1111111111111111111111111111111111111111 \
--usdc-token 0x036CbD53842c5426634e7929541eC2318f3dCF7e \
> "$out_dir/autonomous-readiness.json"
cp deployments/base-mainnet.json "$out_dir/base-mainnet-deployment.json"
"${python_cmd[@]}" scripts/validate_real_funding_rehearsal.py "$out_dir"