Skip to content

Feature/issues 515 514 512 513#572

Merged
Emeka000 merged 4 commits into
Healthy-Stellar:mainfrom
Saboleee:feature/issues-515-514-512-513
Jun 30, 2026
Merged

Feature/issues 515 514 512 513#572
Emeka000 merged 4 commits into
Healthy-Stellar:mainfrom
Saboleee:feature/issues-515-514-512-513

Conversation

@Saboleee

Copy link
Copy Markdown
Contributor

closes #512
closes #513
closes #514
closes #515

Saboleee added 3 commits June 29, 2026 17:42
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
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Learn more about application limits

@Emeka000 Emeka000 merged commit 08c9a62 into Healthy-Stellar:main Jun 30, 2026
0 of 5 checks 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

2 participants