- Add naming-conventions/ with UTRNF reference and DBIS namespace mapping - Index from 04-configuration README and MASTER_INDEX - check-cstar-v2-transport-stack: CompliantWrappedToken + JurisdictionalGovernance suites - gitignore: config/production/dbis-identity-public-did-secrets.env Made-with: Cursor
62 lines
1.9 KiB
Bash
62 lines
1.9 KiB
Bash
#!/usr/bin/env bash
|
|
# Verify that the c* V2 token, reserve, and c* <-> cW* transport stack are green before deploy.
|
|
# Usage: bash scripts/verify/check-cstar-v2-transport-stack.sh
|
|
#
|
|
# Env:
|
|
# DRY_RUN=1 Print the commands without executing them
|
|
|
|
set -euo pipefail
|
|
|
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
SMOM_ROOT="${PROJECT_ROOT}/smom-dbis-138"
|
|
DRY_RUN="${DRY_RUN:-0}"
|
|
|
|
log() { printf '%s\n' "$*"; }
|
|
ok() { printf '[OK] %s\n' "$*"; }
|
|
|
|
run() {
|
|
if [[ "$DRY_RUN" == "1" ]]; then
|
|
printf '[DRY_RUN] %s\n' "$*"
|
|
return 0
|
|
fi
|
|
"$@"
|
|
}
|
|
|
|
if ! command -v forge >/dev/null 2>&1; then
|
|
printf '[FAIL] forge is required but not installed or not on PATH.\n' >&2
|
|
exit 1
|
|
fi
|
|
|
|
log "=== c* V2 transport stack verifier ==="
|
|
log "Repo: ${SMOM_ROOT}"
|
|
log ""
|
|
|
|
pushd "$SMOM_ROOT" >/dev/null
|
|
|
|
# Foundry's JSON cache occasionally drifts when toolchain output shapes change.
|
|
# Removing the generated cache keeps these focused suites reliable in CI and local runs.
|
|
rm -f cache/solidity-files-cache.json
|
|
|
|
run forge test --match-path "test/compliance/CompliantFiatTokenV2.t.sol"
|
|
ok "CompliantFiatTokenV2 base token suite passed."
|
|
|
|
run forge test --match-path "test/compliance/CompliantWrappedTokenTest.t.sol"
|
|
ok "CompliantWrappedToken governance and transport metadata suite passed."
|
|
|
|
run forge test --match-path "test/bridge/CWReserveVerifierVaultIntegration.t.sol"
|
|
ok "Legacy reserve-verifier bridge compatibility suite passed."
|
|
|
|
run forge test --match-path "test/bridge/CWReserveVerifierVaultV2Integration.t.sol"
|
|
ok "V2 reserve-verifier + full L1/L2 transport suite passed."
|
|
|
|
run forge test --match-path "test/bridge/CWMultiTokenBridge.t.sol"
|
|
ok "Core CWMultiTokenBridge round-trip suite passed."
|
|
|
|
run forge test --match-path "test/integration/JurisdictionalGovernance.t.sol"
|
|
ok "Jurisdictional governance and approval gating suite passed."
|
|
|
|
popd >/dev/null
|
|
|
|
log ""
|
|
ok "c* V2 bridge and transport stack is green."
|