Repository navigation
feat: add RentalYield contract with shared primitives, integration and invariant tests - #1402
Merged
nanaf6203-bit merged 2 commits intoOct 21, 2026
Conversation
- 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
|
@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! 🚀 |
nanaf6203-bit
approved these changes
Oct 21, 2026
nanaf6203-bit
left a comment
Contributor
There was a problem hiding this comment.
Solid work — shared primitives keep things DRY and the integration + invariant tests give good confidence. LGTM 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Closes #1368
Closes #1369
Closes #1370
Closes #1371