Files
mev-beta/orig/scripts/refresh-mev-datasets.sh
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:53:05 +01:00

46 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
PYTHON="${PYTHON:-python3}"
PORTAL_RAW="${REPO_ROOT}/data/raw_arbitrum_portal_projects.json"
PORTAL_URL="https://portal-data.arbitrum.io/api/projects"
SKIP_PORTAL_FETCH="${SKIP_PORTAL_FETCH:-0}"
pull_portal_catalogue() {
local tmp_file
tmp_file="$(mktemp "${PORTAL_RAW}.XXXXXX")"
echo "Pulling Arbitrum Portal catalogue..."
if ! curl -fLs "${PORTAL_URL}" -o "${tmp_file}"; then
rm -f "${tmp_file}"
echo "Failed to download Portal data from ${PORTAL_URL}" >&2
exit 1
fi
mv "${tmp_file}" "${PORTAL_RAW}"
}
if [[ "${SKIP_PORTAL_FETCH}" != "1" ]]; then
mkdir -p "$(dirname "${PORTAL_RAW}")"
pull_portal_catalogue
elif [[ ! -f "${PORTAL_RAW}" ]]; then
echo "SKIP_PORTAL_FETCH=1 set but ${PORTAL_RAW} missing; cannot proceed." >&2
exit 1
else
echo "Skipping Portal catalogue download (SKIP_PORTAL_FETCH=1)."
fi
echo "Pulling DeFiLlama exchange snapshot..."
"${PYTHON}" "${REPO_ROOT}/docs/5_development/mev_research/datasets/pull_llama_exchange_snapshot.py"
echo "Refreshing exchange datasets..."
"${PYTHON}" "${REPO_ROOT}/docs/5_development/mev_research/datasets/update_exchange_datasets.py"
echo "Refreshing lending and bridge datasets..."
"${PYTHON}" "${REPO_ROOT}/docs/5_development/mev_research/datasets/update_market_datasets.py"
echo "MEV research datasets refreshed successfully."