Skip to content

feat: add RentalYield contract with shared primitives, integration and invariant tests - #1402

Merged
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
solomon35-stack:feat/rental-yield-1368-1371
Oct 21, 2026
Merged

nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
solomon35-stack:feat/rental-yield-1368-1371

Conversation

@solomon35-stack

Copy link
Copy Markdown
Contributor

Summary

was referenced by the assigned issues but did not exist in the repository. This PR adds the contract and resolves all four assigned issues:

The new crate lives in and is added to the workspace. Yield is distributed with a per-share accumulator, so deposit cost is independent of the number of owners; rounding dust is tracked in a bucket.

Supporting fix

did not compile on : the shared lost its field, three error variants, , four events, three permission methods and the duplicate test module was left behind by a merge. Those pieces are restored here because depends on the shared primitive. Tests were updated for the existing API.

Verification

  • — 14 tests pass
  • — all tests pass
  • — clean

Closes #1368
Closes #1369
Closes #1370
Closes #1371

- add contracts/rental-yield ink! contract for proportional rental yield
  using the shared AccessControl and ReentrancyGuard primitives
- add integration tests for deposits, share changes, claims, roles and pause
- add invariant tests for share supply, deposit backing and monotonic accrual
- document the access-control audit and test coverage
- repair the merge-damaged shared AccessControl primitives needed to build

Closes MettaChain#1368
Closes MettaChain#1369
Closes MettaChain#1370
Closes MettaChain#1371
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@solomon35-stack 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

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work — shared primitives keep things DRY and the integration + invariant tests give good confidence. LGTM 👍

@nanaf6203-bit
nanaf6203-bit merged commit 0f52dd4 into MettaChain:main Oct 21, 2026
2 of 3 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

2 participants