-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.txt
More file actions
51 lines (42 loc) · 2.62 KB
/
progress.txt
File metadata and controls
51 lines (42 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Streamless Implementation Summary
Date: 2025-11-25
deployed contract address----AS1oG3252vqgAq9BnB15ra6bERQqbHUa2V1LxvHFFrGjmxU6CGX
deployed address for deweb--- AS12W3PahDNtckGXDRa4zsh1kXg9DPLVzLVe3g8FZQwqYz3DfCLW8
- MetaMask-only wallet connect; removed Bearby, Massa Station, and Snap options
- Demo plan creation with local fallback when on-chain fails
- Demo subscribe creates a local transaction and updates stats/chart
- Cancel subscription is robust with local update fallback
- Store tracks transactions and derives revenue, active subscribers, active plans, churn
- Revenue Overview chart shows monthly and cumulative revenue for the last 12 months and updates live
- Dashboard uses store-driven data; recent subscribers list reflects actual subscriptions
- TypeScript type-check passes with zero errors
Key files
- components/Layout.tsx
- pages/Create.tsx
- pages/Browse.tsx
- pages/Test.tsx
- pages/Subscriptions.tsx
- pages/Dashboard.tsx
- store.ts
Deployed Contract (Massa)
- Contract address is read from `VITE_MASSA_CONTRACT_ADDRESS` (services/massa.ts:3)
- Deploy script: `contracts/streamless/deploy.mjs` writes `deploy-address.txt` after success
- Required env for deploy: set `PRIVATE_KEY`, `NETWORK`, `JSON_RPC_URL_PUBLIC`, `JSON_RPC_URL_PRIVATE` in `contracts/streamless/.env`
- After deployment, i copy the address to `.env.local`: `VITE_MASSA_CONTRACT_ADDRESS=AS...`
Frontend Deployment (DeWeb)
- Build the app: `npm run build` (outputs `dist/`)
- Upload to DeWeb: `npx @massalabs/deweb-cli upload dist --node_url https://mainnet.massa.net/api/v2 --wallet <path_to_wallet.yaml> --password <wallet_password>`
- Website smart contract address: paste here → `AS...` (returned by the CLI after upload)
- Optional: register an MNS `.massa` domain for friendly access via providers
Frontend Summary
- Stack: React + Vite + Zustand + Recharts + Tailwind-like styles
- Pages: Create, Browse, Subscriptions, Dashboard, Test; global `Layout`
- Wallet: MetaMask-only connect in UI; on-chain calls attempt Massa providers and fallback locally
- Data: Store derives revenue, active subscribers/plans, churn; chart shows monthly/cumulative
Local Testing Steps
- Prerequisites: Bearby or Massa Station installed and unlocked; funded account on chosen network
- Set `.env.local` in project root: `VITE_MASSA_CONTRACT_ADDRESS=<your_contract_address>`
- Adjust events RPC if needed: update `RPC_URL` in `services/massaEvents.ts` to your network
- Start dev server: `npm run dev` and open `http://localhost:5173/#/test`
- Click `Create Plan`, then `Subscribe`, then `Cancel` to exercise on-chain flows
- Use `Fetch Events` to verify contract logs for your address