Files
proxmox/scripts/deployment/prepare-chain138-uniswap-v3-upstream-worktree.sh
defiQUG dbd517b279 Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
2026-04-12 06:12:20 -07:00

47 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Prepare the local upstream-native Uniswap v3 worktree used for the Chain 138
# replacement track. This keeps the live pilot venue layer untouched while
# giving operators a canonical place to build and audit upstream contracts.
CORE_REPO="${CHAIN138_UNISWAP_V3_NATIVE_CORE_REPO:-/home/intlc/projects/uniswap-v3-core}"
PERIPHERY_REPO="${CHAIN138_UNISWAP_V3_NATIVE_PERIPHERY_REPO:-/home/intlc/projects/uniswap-v3-periphery}"
CORE_URL="${CHAIN138_UNISWAP_V3_NATIVE_CORE_URL:-https://github.com/Uniswap/v3-core.git}"
PERIPHERY_URL="${CHAIN138_UNISWAP_V3_NATIVE_PERIPHERY_URL:-https://github.com/Uniswap/v3-periphery.git}"
require_cmd() {
command -v "$1" >/dev/null 2>&1 || {
echo "[fail] missing required command: $1" >&2
exit 1
}
}
require_cmd git
prepare_repo() {
local label="$1"
local path="$2"
local url="$3"
if [[ ! -d "${path}/.git" ]]; then
echo "[info] cloning ${label} into ${path}"
git clone "${url}" "${path}"
else
echo "[info] ${label} already present at ${path}"
fi
git -C "${path}" fetch --tags origin >/dev/null 2>&1 || true
printf '[ok] %s %s @ %s\n' \
"${label}" \
"$(git -C "${path}" remote get-url origin 2>/dev/null || echo unknown-remote)" \
"$(git -C "${path}" rev-parse --short HEAD)"
}
echo "== Chain 138 upstream-native Uniswap v3 worktree =="
prepare_repo "v3-core" "${CORE_REPO}" "${CORE_URL}"
prepare_repo "v3-periphery" "${PERIPHERY_REPO}" "${PERIPHERY_URL}"
echo
echo "[note] These repos support the upstream-native replacement track only."
echo "[note] The live Chain 138 planner still routes through the funded pilot-compatible venue layer until native deployment passes preflight."