fix: validate withdraw_to recipient and document pause policy#382
Open
ayomidearegbeshola29-dev wants to merge 1 commit into
Open
Conversation
- Add recipient validation to reject vault and token addresses - Document pause-allowed behavior at function level for withdraw/withdraw_to - Confirm CEI ordering with state updates before external calls - Add comprehensive tests for recipient validation and paused withdrawals - Update VAULT_WITHDRAW_COMPLIANCE.md with implementation details Fixes CalloraOrg#359
|
@ayomidearegbeshola29-dev 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! 🚀 |
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.
Issue #359 Implementation Complete
Summary
Successfully implemented recipient validation for
withdraw_toand documented the pause-allowed behavior for emergency withdrawals.Branch Information
bug/vault-withdraw-to-validationChanges Made
1. Code Changes (
contracts/vault/src/lib.rs)withdrawandwithdraw_to2. Test Changes (
contracts/vault/src/test.rs)Added 4 new comprehensive tests:
withdraw_to_vault_address_fails()- Validates self-address rejectionwithdraw_to_token_address_fails()- Validates token-address rejectionwithdraw_to_while_paused_succeeds()- Confirms emergency withdrawal workswithdraw_while_paused_succeeds()- Confirms emergency withdrawal works3. Documentation (
VAULT_WITHDRAW_COMPLIANCE.md)Files Modified
contracts/vault/src/lib.rs- 150 lines changedcontracts/vault/src/test.rs- 75 lines addedVAULT_WITHDRAW_COMPLIANCE.md- 75 lines changedNext Steps
Create Pull Request
Visit the following URL to create the pull request:
PR Details
PR_DESCRIPTION.mdin the repository rootAcceptance Criteria Status
Testing
All new functionality is covered by tests. To run tests:
cargo test --package callora-vaultSecurity Considerations
Implementation completed successfully. Ready for review.
closes #359