Skip to content

Commit 60a0b9f

Browse files
authored
Merge pull request #909 from dinahmaccodes/issuenew
feat: add env variables properly and proper documentations
2 parents 750d3e1 + e650264 commit 60a0b9f

5 files changed

Lines changed: 54 additions & 6 deletions

File tree

.github/CODEOWNERS

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Code Owners for FlowFi
2+
# This file controls who is automatically assigned for review
3+
# based on the files changed in a pull request.
4+
5+
# Default owners for the entire repository
6+
* @LabsCrypt
7+
8+
# Backend
9+
backend/ @LabsCrypt
10+
11+
# Frontend
12+
frontend/ @LabsCrypt
13+
14+
# Smart contracts
15+
contracts/ @LabsCrypt
16+
17+
# Documentation
18+
docs/ @LabsCrypt
19+
20+
# GitHub workflows and CI/CD
21+
.github/ @LabsCrypt
22+
23+
# Deployment scripts
24+
scripts/ @LabsCrypt

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,27 @@ jobs:
192192
done
193193
shell: bash
194194

195+
- name: Check WASM size budget
196+
run: |
197+
set -euo pipefail
198+
199+
RELEASE_DIR="contracts/target/wasm32-unknown-unknown/release"
200+
WASM_SIZE_LIMIT=200000 # 200KB budget for optimized WASM
201+
202+
for wasm in "$RELEASE_DIR"/*.optimized.wasm; do
203+
if [ -f "$wasm" ]; then
204+
size=$(stat -c%s "$wasm")
205+
filename=$(basename "$wasm")
206+
echo "Optimized WASM size: $filename = $size bytes"
207+
208+
if [ "$size" -gt "$WASM_SIZE_LIMIT" ]; then
209+
echo "Error: $filename exceeds size budget of $WASM_SIZE_LIMIT bytes"
210+
exit 1
211+
fi
212+
fi
213+
done
214+
shell: bash
215+
195216
- name: Upload optimized WASM artifacts
196217
uses: actions/upload-artifact@v4
197218
with:

contracts/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ panic = "abort"
1717
codegen-units = 1
1818
lto = true
1919

20+
# WASM size budget: 200KB (200000 bytes) for optimized contract
21+
# Enforced in .github/workflows/ci.yml
22+
2023
[profile.release-with-logs]
2124
inherits = "release"
2225
debug-assertions = true

docs/ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ To run the full stack end-to-end, set the following secrets. See [`backend/.env.
221221
|---|---|
222222
| `DATABASE_URL` | PostgreSQL connection string (Prisma) |
223223
| `SOROBAN_RPC_URL` | Soroban RPC endpoint (e.g. Testnet: `https://soroban-testnet.stellar.org`) |
224-
| `STREAMING_CONTRACT_ADDRESS` | Deployed FlowFi stream contract ID |
224+
| `STREAM_CONTRACT_ID` | Deployed FlowFi stream contract ID |
225225
| `KEEPER_SECRET_KEY` | Server wallet secret key used to sign custodial top-up transactions |
226226
| `JWT_SECRET` | Secret used to sign and verify auth JWTs |
227227
| `REDIS_URL` | Redis connection string (only needed for multi-instance SSE fanout) |
228-
| `STELLAR_NETWORK` | `TESTNET` or `MAINNET` |
228+
| `STELLAR_NETWORK` | `testnet` or `mainnet` |
229229

230230
### Frontend
231231

scripts/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ NC='\033[0m' # No Color
2626

2727
# Default values
2828
NETWORK=""
29-
DEPLOYER_SECRET=""
30-
ADMIN_ADDRESS=""
31-
TREASURY_ADDRESS=""
32-
FEE_RATE_BPS=""
29+
DEPLOYER_SECRET="${DEPLOYER_SECRET:-}"
30+
ADMIN_ADDRESS="${ADMIN_ADDRESS:-}"
31+
TREASURY_ADDRESS="${TREASURY_ADDRESS:-}"
32+
FEE_RATE_BPS="${FEE_RATE_BPS:-}"
3333

3434
# Parse command line arguments
3535
while [[ $# -gt 0 ]]; do

0 commit comments

Comments
 (0)