feat: resolve issues #542, #554, #563, #569 - reentrancy guard, clean script, SEP-12 auth, revenue tests#687
Merged
Ceejaytech25 merged 2 commits intoJun 29, 2026
Conversation
…laboratory#563 ceejaylaboratory#569 - feat(yield-contract): audit reentrancy guard usage in contracts/yield (closes ceejaylaboratory#563) Move state updates before external token transfers in stake() and deposit_rewards() to follow checks-effects-interactions pattern. - feat(devops): clean up old logs and database lock files in backend workspace (closes ceejaylaboratory#542) Add clean script to backend/package.json that removes SQLite journal files, logs directory, and coverage reports. - feat(backend-sep12): [sep-12] handle account authorization checks in upload confirm (closes ceejaylaboratory#554) Verify active session token matches account field before processing upload confirmation; reject mismatches with 403 Forbidden. - feat(revenue-distributor): add unit tests for revenue_distributor payouts (closes ceejaylaboratory#569) Add tests for zero balance, full gov share (100%), zero gov share (0%), and weight precision with odd amounts to verify distribution weights.
|
@Chidimj 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! 🚀 |
Contributor
|
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
stake()anddeposit_rewards()— follows checks-effects-interactions pattern to guard against reentrancy.cleanscript tobackend/package.jsonthat deletes SQLite journal files,logs/, andcoverage/directories.confirmUpload, verify active session token (req.user.publicKey) matches theaccountfield before processing — reject mismatches with403 Forbidden.revenue_distributorcovering zero balance, 100% gov share, 0% gov share, and weight precision with odd amounts.Closes
Closes #542, closes #554, closes #563, closes #569
Test plan
cargo check --manifest-path contracts/Cargo.tomlpassescargo test --manifest-path contracts/Cargo.toml— all yield and revenue_distributor tests passnpm run cleanruns without error and reduces workspace file countnpm run test:backend— SEP-12 upload-confirm 403 path covered