[Feat]:: Implemented Oracle Contract Validation and Approved Oracle W…#186
Merged
greatest0fallt1me merged 1 commit intoOct 5, 2025
Merged
[Feat]:: Implemented Oracle Contract Validation and Approved Oracle W…#186greatest0fallt1me merged 1 commit into
greatest0fallt1me merged 1 commit into
Conversation
Contributor
Author
Contributor
|
LGTM! @ryzen-xp |
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.

Pull Request Description
Close #53
📋 Basic Information
Type of Change
Related Issues
Closes #53
Priority Level
📝 Detailed Description
What does this PR do?
This PR implements the Oracle Whitelist and Validation system for the Predictify Hybrid contracts.
Key additions include:
OracleWhiteliststruct for centralized oracle management.get_approved_oracles()for fetching the active whitelist.Why is this change needed?
Previously, any address could be passed as an oracle, creating security risks (malicious or invalid oracle contracts).
This PR ensures that:
How was this tested?
Added unit tests for:
Manual testing on local testnet.
Verified events (
oracle_whitelisted,oracle_removed) are emitted correctly.Alternative Solutions Considered
Vec<Address>stored underOracleListfor efficient lookup and retrieval.🏗️ Smart Contract Specific
Contract Changes
Oracle Integration
Market Resolution Logic
Security Considerations
🧪 Testing
Test Coverage
Test Results
Manual Testing Steps
add_oracle_to_whitelistwith admin → succeeds.get_approved_oracles→ returns correct list.📚 Documentation
Documentation Updates
Breaking Changes
Breaking Changes:
Migration Guide:
🔍 Code Quality
Performance Impact:
🚀 Deployment & Integration
Deployment Notes
Integration Points
get_approved_oracles.📊 Impact Assessment
User Impact
Business Impact
✅ Final Checklist
💬 Notes for Reviewers
Please focus on:
get_approved_oracleslogic.⚡ This PR secures the oracle pipeline by introducing a robust validation and whitelist system, closing #53.