Commit 55c2537
committed
docs: clarify view function behaviour for address(0) default allocation
Response to TRST-L-3 "Inaccurate view functions for the zero-address target"
The current behaviour of getTargetAllocation() and getTargetIssuancePerBlock()
is deliberate and regarded as correct. These functions return assigned
allocations rather than effective minting amounts. This design choice is
supported by the following reasoning:
1. **Semantically correct**: The functions answer "what allocation is assigned
to this target?" rather than "what does this target receive?".
2. **Consistent interface**: Callers can query the default target allocation
uniformly, regardless of whether it's address(0) or not.
3. **Accounting utility**: When address(0) is used, the returned values
represent the unallocated/unminted portion of issuance.
4. **Separation of concerns**: getTotalAllocation() provides the effective
system-wide allocation that excludes unmintable portions.
The documentation has been enhanced to make this behaviour explicit for the
address(0) edge case, to avoid potential confusion.1 parent 48be37a commit 55c2537
1 file changed
Lines changed: 5 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
| |||
839 | 842 | | |
840 | 843 | | |
841 | 844 | | |
| 845 | + | |
| 846 | + | |
842 | 847 | | |
843 | 848 | | |
844 | 849 | | |
| |||
0 commit comments