- 
                Notifications
    You must be signed in to change notification settings 
- Fork 161
Rewards Eligibility Oracle (REO) #1244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add NatSpec documentation (@title, @author, @notice, @param) - Add solhint-disable directives with TODO comments for future fixes - Minor code formatting changes to address lint rules All packages now pass pnpm lint with no reported issues. Verified with scripts/compare-repo-contract-bytecode-excluding-metadata.mjs: only mock contracts have functional bytecode changes.
- Move 36 duplicate interface files from contracts and token-distribution to interfaces package - Update all import statements across contracts, token-distribution, horizon, and subgraph-service to use @graphprotocol/interfaces - Delete duplicate interface files from source packages - Fix pragma versions for compatibility across compiler configurations - Add @graphprotocol/interfaces dependency to token-distribution All builds and tests passing.
- Dual-version interfaces: ^0.7.x || ^0.8.0 (max compatibility) - V0.8-only interfaces: ^0.8.22 (modern features support) Interfaces should allow wider compiler version ranges for external consumer compatibility, while implementations use exact versions for predictable compilation. Dual-version files use ^0.8.0 since they can't leverage v0.8 features anyway. V0.8-only files use ^0.8.22 for custom errors and named mappings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add explanation of open-ended pragma ranges for interface compatibility and document available TypeScript type generation formats.
- Rename interface parameters to avoid conflicts with getter functions - Add parameter references in mock contracts to silence unused warnings - Configure hardhat-ignore-warnings for contracts/test package
| Review the following changes in direct dependencies. Learn more about Socket for GitHub. 
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the Rewards Eligibility Oracle (REO) system, which manages indexer eligibility for receiving rewards through an oracle-based time-expiring eligibility mechanism.
Key changes:
- Added RewardsEligibilityOraclecontract with oracle-based eligibility management
- Introduced comprehensive test infrastructure including interface compliance, access control, and test patterns
- Updated interfaces package to use flexible pragma versions for broader compatibility
- Migrated import paths from direct contract references to the interfaces package
Reviewed Changes
Copilot reviewed 263 out of 311 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description | 
|---|---|
| packages/issuance/contracts/eligibility/RewardsEligibilityOracle.sol | Core oracle contract implementing time-based eligibility with role-based access control | 
| packages/issuance/test/tests/eligibility/InterfaceCompliance.test.ts | ERC-165 interface compliance tests for the eligibility oracle | 
| packages/issuance/test/tests/eligibility/AccessControl.test.ts | Access control pattern tests for oracle roles and permissions | 
| packages/issuance/test/tests/common/testPatterns.ts | Reusable test pattern for interface compliance verification | 
| packages/issuance/test/tests/common/fixtures.ts | Common test fixtures for deployments and account management | 
| packages/interfaces/contracts/**/*.sol | Updated pragma statements to use flexible version ranges (^0.7.6 || ^0.8.0) | 
| packages/contracts/contracts/**/*.sol | Migrated imports from direct paths to @graphprotocol/interfaces package | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Rewards Eligibility Oracle (REO)
 🚨 Report Summary
 For more details view the full report in OpenZeppelin Code Inspector | 
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main    #1244      +/-   ##
==========================================
+ Coverage   82.84%   85.07%   +2.23%     
==========================================
  Files          47       44       -3     
  Lines        2093     2178      +85     
  Branches      620      649      +29     
==========================================
+ Hits         1734     1853     +119     
+ Misses        359      325      -34     
 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
No description provided.