Skip to content

feat(registry): add missing require_auth validation in registry contr…#698

Merged
Ceejaytech25 merged 1 commit into
ceejaylaboratory:mainfrom
Ndanusa:feature/issue-525-528-registry-yield-fixes
Jun 28, 2026
Merged

feat(registry): add missing require_auth validation in registry contr…#698
Ceejaytech25 merged 1 commit into
ceejaylaboratory:mainfrom
Ndanusa:feature/issue-525-528-registry-yield-fixes

Conversation

@Ndanusa

@Ndanusa Ndanusa commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

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)

  • Verified admin.require_auth() enforcement across all state-modifying operations within the registry contract.
  • Fix: Resolved a use of moved value compiler error within register_contract that was causing the main branch build to fail by correctly cloning existing_info.address.
  • Fix: Corrected strict type mismatches (&String vs String) passed down to the test suite client so that the test harness passes reliably.

2. Yield Contract Invariants & Limits Tests (#528)

  • Added new test cases in contracts/yield/src/lib.rs covering edge cases for boundary limits (test_deposit_limit, test_withdraw_limit_zero, test_withdraw_limit_insufficient).
  • Implemented robust invariant testing (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:

  • swap module: Resolved borrow of moved value errors preventing tests from compiling by adding clones to addresses (alice and bob).
  • xlm_wrapper module: Fixed Vec compilation errors by updating strict typing to rely on standard std::vec::Vec instead of soroban_sdk::Vec for slices.
  • governance module: Fixed missing/renamed method invocation errors in tests/mod.rs (client.get_admin() vs client.admin()).

Validation

  • All local tests pass (cargo test --manifest-path contracts/Cargo.toml).
  • Tested against boundary conditions (0-amount deposits, negative withdrawals).
  • Verified require_auth() implementations.

Closes #525
Closes #523
Closes #515
Closes #528

…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
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Ndanusa

Ndanusa commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

@Ceejaytech25 , pls review PR

@Ceejaytech25

Copy link
Copy Markdown
Contributor

@Ndanusa lgtm!

@Ceejaytech25 Ceejaytech25 merged commit 0b5e850 into ceejaylaboratory:main Jun 28, 2026
1 check 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

3 participants