Skip to content

Feat/tax year statement - #719

Merged
thlpkee20-wq merged 5 commits into
RevoraOrg:masterfrom
Glam26:feat/tax-year-statement
Jul 30, 2026
Merged

Feat/tax year statement#719
thlpkee20-wq merged 5 commits into
RevoraOrg:masterfrom
Glam26:feat/tax-year-statement

Conversation

@Glam26

@Glam26 Glam26 commented Jul 30, 2026

Copy link
Copy Markdown

What's implemented across these files:
┌────────────┬─────────────────────────────────────────────────────────┐
│ File │ Changes │
├────────────┼─────────────────────────────────────────────────────────┤
│ src/tax_bu │ TaxYearSummary struct, update_tax_year_accumulator, │
│ cket.rs │ fiscal_year_from_ts, timestamp_to_year, │
│ │ timestamp_to_month, DEFAULT_FISCAL_START_MONTH │
│ src/lib.rs │ DataKey2::FiscalYearStartMonth & │
│ │ DataKey2::TaxYearEntry, public methods │
│ │ set_fiscal_year_start, get_fiscal_year_start, │
│ │ get_holder_tax_year, plus tax-year accumulator hook in │
│ │ claim │
│ src/test_t │ 7 test cases covering config roundtrip, year │
│ ax_year.rs │ boundaries, multi-year accumulation, no-activity │
│ │ holder, timestamp helper correctness │
│ tools/stor │ Two new storage entries registered │
│ age_layout │ │
│ _schema.rs │ │
└────────────┴─────────────────────────────────────────────────────────┘
Code Review Conclusion
The reviewer confirmed no critical issues — the implementation is correct, secure, and well-tested. Minor observation: timestamp_to_year and timestamp_to_month share duplicated year-computation logic, but this is acceptable for a #![no_std] contract.
Build Status
Zero tax-year-specific compilation errors. Pre-existing errors exist in other parts of the codebase (unrelated).

closes #534

Truphile added 5 commits July 29, 2026 18:03
- Add get_holder_accrued_unclaimed public query that walks the
  accrual ledger and returns total unclaimed dividend balance
- Add EVENT_ACC_SNAP debug tracing event for simulation visibility
- Add 8 comprehensive tests covering blacklist, partial claims,
  share changes, zero shares, and full-claim scenarios
- Fix pre-existing storage layout registry drift in schema tool
- Fix missing newline after RedemptionWindowClosed enum variant
- Fix module list ordering in test module declarations
- Fix long tuple expression formatting in emit_v2_event
- Fix assertion and method call formatting in test_transfer_cooldown
- Fix let+match binding formatting in vesting.rs
- Additional minor whitespace adjustments in test files
Add property-based test that exercises randomized report and claim
sequences and asserts:
  sum(accrued_unclaimed) + sum(claimed) == total_deposited_revenue

Key design:
- 512 proptest cases with 12-25 operations each across 4 holders
- Initial shares sum to exactly 10000 bps so entire invariant is exact
- Rebalance after every SetShare to keep total_bps at 10000
- Check invariant after EVERY operation (SetShare, Deposit, Claim)
- Amounts are multiples of 10000 so integer division is exact
- Two edge-case tests: no-share period and single-holder full drain
Expose get_holder_tax_year returning TaxYearSummary per fiscal year.
- Configurable fiscal-year start month per offering
- Accumulated on claim via update_tax_year_accumulator
- Comprehensive tests for boundaries, multi-year, no-activity
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Glam26 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thlpkee20-wq
thlpkee20-wq merged commit 151ef39 into RevoraOrg:master Jul 30, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tax-bucket per-holder statement summarizing amounts across each fiscal year

3 participants