From e86b364ec4f4ee775ff5c444117e6309b72b0616 Mon Sep 17 00:00:00 2001 From: dinahmaccodes Date: Mon, 29 Jun 2026 08:16:42 +0100 Subject: [PATCH 1/4] docs: correct environment variable names in ARCHITECTURE.md --- docs/ARCHITECTURE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 67de0594..621020ea 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -221,11 +221,11 @@ To run the full stack end-to-end, set the following secrets. See [`backend/.env. |---|---| | `DATABASE_URL` | PostgreSQL connection string (Prisma) | | `SOROBAN_RPC_URL` | Soroban RPC endpoint (e.g. Testnet: `https://soroban-testnet.stellar.org`) | -| `STREAMING_CONTRACT_ADDRESS` | Deployed FlowFi stream contract ID | +| `STREAM_CONTRACT_ID` | Deployed FlowFi stream contract ID | | `KEEPER_SECRET_KEY` | Server wallet secret key used to sign custodial top-up transactions | | `JWT_SECRET` | Secret used to sign and verify auth JWTs | | `REDIS_URL` | Redis connection string (only needed for multi-instance SSE fanout) | -| `STELLAR_NETWORK` | `TESTNET` or `MAINNET` | +| `STELLAR_NETWORK` | `testnet` or `mainnet` | ### Frontend From 5adaf0849a6ae5981e1c59f41e5c5667be4f76fb Mon Sep 17 00:00:00 2001 From: dinahmaccodes Date: Mon, 29 Jun 2026 08:33:38 +0100 Subject: [PATCH 2/4] fix: prevent environment variable clobbering in deploy script --- scripts/deploy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d449554d..9ccc006e 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -26,10 +26,10 @@ NC='\033[0m' # No Color # Default values NETWORK="" -DEPLOYER_SECRET="" -ADMIN_ADDRESS="" -TREASURY_ADDRESS="" -FEE_RATE_BPS="" +DEPLOYER_SECRET="${DEPLOYER_SECRET:-}" +ADMIN_ADDRESS="${ADMIN_ADDRESS:-}" +TREASURY_ADDRESS="${TREASURY_ADDRESS:-}" +FEE_RATE_BPS="${FEE_RATE_BPS:-}" # Parse command line arguments while [[ $# -gt 0 ]]; do From b10afd20eff2917f01423b6986989b06d26bcbe6 Mon Sep 17 00:00:00 2001 From: dinahmaccodes Date: Mon, 29 Jun 2026 08:33:41 +0100 Subject: [PATCH 3/4] ci: add WASM size budget check to prevent size regressions --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ contracts/Cargo.toml | 3 +++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31fef30e..6f7b052e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,6 +192,27 @@ jobs: done shell: bash + - name: Check WASM size budget + run: | + set -euo pipefail + + RELEASE_DIR="contracts/target/wasm32-unknown-unknown/release" + WASM_SIZE_LIMIT=200000 # 200KB budget for optimized WASM + + for wasm in "$RELEASE_DIR"/*.optimized.wasm; do + if [ -f "$wasm" ]; then + size=$(stat -c%s "$wasm") + filename=$(basename "$wasm") + echo "Optimized WASM size: $filename = $size bytes" + + if [ "$size" -gt "$WASM_SIZE_LIMIT" ]; then + echo "Error: $filename exceeds size budget of $WASM_SIZE_LIMIT bytes" + exit 1 + fi + fi + done + shell: bash + - name: Upload optimized WASM artifacts uses: actions/upload-artifact@v4 with: diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml index 286aff6d..154c0a72 100644 --- a/contracts/Cargo.toml +++ b/contracts/Cargo.toml @@ -17,6 +17,9 @@ panic = "abort" codegen-units = 1 lto = true +# WASM size budget: 200KB (200000 bytes) for optimized contract +# Enforced in .github/workflows/ci.yml + [profile.release-with-logs] inherits = "release" debug-assertions = true From e65026433c1276a23e8ae94dacc8a466c01a61de Mon Sep 17 00:00:00 2001 From: dinahmaccodes Date: Mon, 29 Jun 2026 08:35:39 +0100 Subject: [PATCH 4/4] chore: add CODEOWNERS for automatic PR review routing --- .github/CODEOWNERS | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..20ba2c8d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,24 @@ +# Code Owners for FlowFi +# This file controls who is automatically assigned for review +# based on the files changed in a pull request. + +# Default owners for the entire repository +* @LabsCrypt + +# Backend +backend/ @LabsCrypt + +# Frontend +frontend/ @LabsCrypt + +# Smart contracts +contracts/ @LabsCrypt + +# Documentation +docs/ @LabsCrypt + +# GitHub workflows and CI/CD +.github/ @LabsCrypt + +# Deployment scripts +scripts/ @LabsCrypt