Skip to content

price_oracle: Enforce admin-only controls, return errors, add tests, and cleanup#384

Open
Caritajoe18 wants to merge 2 commits intoCommitlabs-Org:masterfrom
Caritajoe18:feature/price-oracle-unit-tests-admin-only-updates-and-rotation-of-oracle-sources
Open

price_oracle: Enforce admin-only controls, return errors, add tests, and cleanup#384
Caritajoe18 wants to merge 2 commits intoCommitlabs-Org:masterfrom
Caritajoe18:feature/price-oracle-unit-tests-admin-only-updates-and-rotation-of-oracle-sources

Conversation

@Caritajoe18
Copy link
Copy Markdown

@Caritajoe18 Caritajoe18 commented Mar 25, 2026

closes #275

Refactored admin-only entrypoints (add_oracle, remove_oracle, set_max_staleness) to use require_admin_result.
Returns OracleError::Unauthorized instead of panicking for unauthorized access.
Ensures contract errors are returned as Result, improving safety and testability.
Added tests for admin-only access paths.
General cleanup for clarity and maintainability.
Screenshot 2026-03-25 at 5 11 04 PM

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@Caritajoe18 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit tests: admin-only updates and rotation of oracle sources

1 participant