You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,19 @@ This section maps each business requirement to its implementation so the BA can
72
72
| Deposit with sub-type breakdown | Supported |`addTokensDetailed(programId, amount, rewardType, note, subTypeIds, subTypeQtys)` — validates sub-type IDs exist and quantities sum to the deposit amount. Emits `DepositSubTypes` event. |
73
73
| View sub-types | Supported |`getSubTypes(programId, rewardType)` returns all active sub-type IDs and names. |
74
74
75
+
### Transfer Control Limit
76
+
77
+
| Requirement | Status | Implementation |
78
+
|-------------|--------|----------------|
79
+
| Program owner specifies transfer control limit (0-100%) | Supported |`setTransferLimit(programId, limitPercent)` — admin sets a per-program percentage. Stored on-chain as `uint8`. |
80
+
| Limit restricts Client transfers to parent | Supported | Enforced in `_transferToParentCore`. If SRP limit is 50% and client has 1200 points, max transfer is 600. To transfer 500, client must have at least 1000. |
81
+
| Limit does NOT apply to TeamLeader or ProgramAdmin | Supported | Only `MemberRole.Client` is checked. Higher roles transfer freely. |
82
+
| 0 = no restriction (default) | Supported | Default value is `0` (Solidity zero-init). Existing programs are unaffected — fully backward compatible. |
83
+
| Different programs can have different limits | Supported | Per-program mapping: `mapping(uint32 => uint8) _transferLimits`. SRP at 50%, another at 25%, etc. |
84
+
| Admin can view current limit | Supported |`getTransferLimit(programId)` returns the current percentage. Displayed on Programs detail page. |
85
+
| UI shows transfer limit info | Supported | Programs page displays limit (e.g., "50%" or "None"). Tokens and Balance pages show info alert with max transferable amount when limit > 0. |
86
+
| Admin can change limit | Supported | "Set Transfer Limit" button on Programs detail page (admin only) opens dialog with 0-100 input. |
87
+
75
88
### QA10 — Data Intelligence Reports
76
89
77
90
| Requirement | Status | Implementation |
@@ -150,6 +163,15 @@ Members can transfer tokens back up the hierarchy to any parent in their chain.
Each program can have a **Transfer Control Limit** (0-100%) that restricts how much a **Client** can transfer to their parent. The limit is calculated as a percentage of the client's **total balance** (available + permanently locked + time-locked).
168
+
169
+
-**0% (default)**: No restriction — backward compatible with existing programs
170
+
-**50%**: Client must have at least 2x the transfer amount (e.g., 1200 balance → max 600 transfer)
171
+
-**100%**: Client can transfer their entire balance
172
+
- Only applies to **Client** role — TeamLeaders and ProgramAdmins are not restricted
173
+
- Set by Admin via `setTransferLimit(programId, limitPercent)`
174
+
153
175
### Withdraw
154
176
Members withdraw available (unlocked) tokens to their wallet. Expired time-locks are automatically resolved during withdrawal.
155
177
@@ -183,7 +205,8 @@ Overview showing total programs count and a summary table of all programs (ID, C
183
205
184
206
### Programs (`/programs`)
185
207
-**List view**: Table of all programs with ID, code, name, description, and status
186
-
-**Detail view** (`/programs?id=1`): Program details, your balance breakdown, and member table with columns: Member ID, Wallet, Role, **Type**, Parent, Balance, Status, QR
208
+
-**Detail view** (`/programs?id=1`): Program details (including **Transfer Limit**), your balance breakdown, and member table with columns: Member ID, Wallet, Role, **Type**, Parent, Balance, Status, QR
209
+
-**Set Transfer Limit** (Admin only): Dialog to set the per-program transfer control limit (0-100%)
187
210
-**Create Program** (Admin only): Dialog to create a new program with code, name, and description
188
211
-**Add Program Admin** (Admin only): Assign a ProgramAdmin with wallet, member ID, and **member type**
189
212
-**Add Member** (ProgramAdmin/TeamLeader): Add TeamLeaders or Clients with role and **member type** selection
@@ -199,7 +222,7 @@ Results show: Member ID, Wallet, Role, **Type**, Program, Parent, Balance, Statu
199
222
Four-tab interface for token operations:
200
223
1.**Deposit**: Approve and deposit FULA tokens with **reward type** selection and **note** field (128 chars)
201
224
2.**Transfer to Sub-Member**: Send tokens to a sub-member with optional lock
202
-
3.**Transfer to Parent**: Return tokens to a parent in the hierarchy
225
+
3.**Transfer to Parent**: Return tokens to a parent in the hierarchy. Shows transfer limit info alert when the program has a limit configured.
203
226
4.**Withdraw**: Withdraw available tokens to your wallet
204
227
205
228
### Balance Lookup (`/balance`)
@@ -209,7 +232,7 @@ Public page that does **not require wallet connection** for viewing. Enter a Mem
209
232
- Balance breakdown (withdrawable, locked, time-locked) per program
210
233
- Status in each program
211
234
212
-
If the connected wallet matches the member's wallet, action panels appear for deposit (with **reward type** and **note**), transfer to parent, and withdraw.
235
+
If the connected wallet matches the member's wallet, action panels appear for deposit (with **reward type** and **note**), transfer to parent (with **transfer limit** info), and withdraw.
213
236
214
237
Shareable link format: `/balance?member=MEMBER_ID`
0 commit comments