Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading