feat(registry): add missing require_auth validation in registry contr…#698
Merged
Ceejaytech25 merged 1 commit intoJun 28, 2026
Conversation
…act (closes ceejaylaboratory#525) feat(yield): write unit tests for yield contract deposit and withdraw invariants (closes ceejaylaboratory#528) fix(tests): compile errors in swap, xlm_wrapper, governance
|
@Ndanusa 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
Author
|
@Ceejaytech25 , pls review PR |
Contributor
|
@Ndanusa 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.
Description
This PR addresses two main issues related to contract security validations and invariant testing, while additionally stabilizing the test environments across the workspace.
Closes
Changes Implemented
1. Registry Contract Validations (#525)
admin.require_auth()enforcement across all state-modifying operations within theregistrycontract.use of moved valuecompiler error withinregister_contractthat was causing themainbranch build to fail by correctly cloningexisting_info.address.&StringvsString) passed down to the test suite client so that the test harness passes reliably.2. Yield Contract Invariants & Limits Tests (#528)
contracts/yield/src/lib.rscovering edge cases for boundary limits (test_deposit_limit,test_withdraw_limit_zero,test_withdraw_limit_insufficient).test_contract_invariants) to ensure the total cumulative stake securely matches the exact live supply reserves held by the contract.3. Test Suite Stabilization
Repaired failing test environments across multiple auxiliary contracts to ensure the entire workspace successfully passes
cargo test --manifest-path contracts/Cargo.toml:swapmodule: Resolvedborrow of moved valueerrors preventing tests from compiling by adding clones to addresses (aliceandbob).xlm_wrappermodule: FixedVeccompilation errors by updating strict typing to rely on standardstd::vec::Vecinstead ofsoroban_sdk::Vecfor slices.governancemodule: Fixed missing/renamed method invocation errors intests/mod.rs(client.get_admin()vsclient.admin()).Validation
cargo test --manifest-path contracts/Cargo.toml).require_auth()implementations.Closes #525
Closes #523
Closes #515
Closes #528