Feature/issues 515 514 512 513#572
Merged
Emeka000 merged 4 commits intoJun 30, 2026
Merged
Conversation
Healthy-Stellar#514) - Add NotAuthorized error to ContractError enum - Add Admin storage key to DataKey enum - Add assert_config_auth() helper to verify caller is hospital or admin - Add set_admin() method to configure contract admin - Update all config methods to use assert_config_auth() instead of wallet.require_auth() - Hospital representative can update their own config - Admin can update any hospital config - Third-party addresses are rejected with NotAuthorized
…nt DoS (Healthy-Stellar#512) - Add RateLimitExceeded error to Error enum - Add ProviderSessionWindow struct to track session counts per provider - Add RateLimitConfig struct for configurable rate limiting - Add ProviderSessionWindow and RateLimitConfig to DataKey enum - Add check_and_update_rate_limit() helper to enforce limits - Add get_rate_limit_config() to get config or return defaults - Add set_rate_limit_config() method for admin to configure limits - Default: 20 sessions per 24-hour window per provider - Window automatically resets after 24 hours - Rate limit check added to start_virtual_session() before processing
…calls (Healthy-Stellar#513) - Add StaleNonce error to all involved contracts - Add CallerNonce(Address) DataKey to track per-caller nonces - Add verify_and_increment_nonce() method to validate and update nonces - Add get_caller_nonce() method to query current caller nonce - Nonce must be strictly greater than last successful nonce to be accepted - Prevents replay attacks on cross-contract calls - Implemented in: - provider-registry - patient-registry - prescription-management - health-records
|
@Saboleee 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.
closes #512
closes #513
closes #514
closes #515