mirror of
https://github.com/zooai/bridge-shim.git
synced 2026-10-30 14:50:34 +00:00
White-label tenant shim for the canonical bridge — bridge.zoo.network. The shim composes the OSS upstream (ghcr.io/luxfi/bridge:v1.1.39) and ships: - tenant.yaml — Zoo Bridge declarative config (brand=Zoo Bridge, IAM=zoo.id, KMS=kms.zoo.network, network=Zoo Mainnet chainId 200200, pq=strict-pq, chains=eth/btc/sol/ton/xrp/dot/zoo). - Dockerfile — FROM upstream + COPY tenant.yaml + --tenant-config pin. - contracts/tenant.json + Deploy.sh — wraps @luxfi/standard v1.7.5's DeployTenant.s.sol with the Zoo manifest. - k8s/ — Deployment, Service, IngressRoute (bridge.zoo.network), ConfigMap, Namespace, Kustomization. - tenant_test.go — go test imports luxfi/bridge/pkg/tenant.Load and validates tenant.yaml. - .github/workflows/build.yml — semver-tag-gated GHCR push via the zooai org's zoo-build-linux-amd64 ARC pool. Tests: GOWORK=off go test ./... → PASS.
45 lines
1.1 KiB
Bash
Executable File
45 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Deploy.sh — Zoo Bridge contract deployment driver.
|
|
#
|
|
# Wraps @luxfi/standard's DeployTenant.s.sol with this tenant's
|
|
# manifest at contracts/tenant.json.
|
|
#
|
|
# Usage:
|
|
# ZOO_PRIVATE_KEY=0x... ./contracts/Deploy.sh <rpc-url>
|
|
set -euo pipefail
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
echo "usage: $0 <rpc-url>" >&2
|
|
exit 2
|
|
fi
|
|
|
|
RPC_URL="$1"
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
TENANT_FILE="${SCRIPT_DIR}/tenant.json"
|
|
STANDARD_DIR="${FOUNDRY_LIB_PATH:-${SCRIPT_DIR}/lib/luxfi-standard}"
|
|
|
|
if [[ ! -f "${TENANT_FILE}" ]]; then
|
|
echo "error: tenant manifest missing at ${TENANT_FILE}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -d "${STANDARD_DIR}" ]]; then
|
|
echo "error: @luxfi/standard not found at ${STANDARD_DIR}" >&2
|
|
echo " git clone --branch v1.7.5 https://github.com/luxfi/standard ${STANDARD_DIR}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z "${ZOO_PRIVATE_KEY:-}" ]]; then
|
|
echo "error: ZOO_PRIVATE_KEY env var required" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cd "${STANDARD_DIR}"
|
|
TENANT_FILE="${TENANT_FILE}" \
|
|
LUX_PRIVATE_KEY="${ZOO_PRIVATE_KEY}" \
|
|
forge script contracts/script/DeployTenant.s.sol \
|
|
--rpc-url "${RPC_URL}" \
|
|
--broadcast \
|
|
--legacy \
|
|
-vvv
|