-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: change to list of rose feeds and average price #9
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
refactor: change to list of rose feeds and average price #9
Conversation
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 refactors the CrossChainPaymaster to support multiple ROSE/USD price feeds instead of a single feed, calculating an arithmetic mean of all valid feed prices for improved price reliability and resilience.
Key changes:
- Changed from single
roseUsdFeedto a set of feeds (_roseUsdFeeds) using OpenZeppelin'sEnumerableSet - Replaced
setRoseUsdFeedwithaddRoseUsdFeedandremoveRoseUsdFeedfunctions - Modified
_convertToRoseto aggregate prices from multiple feeds using arithmetic mean
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| contracts/contracts/sapphire/interfaces/ICrossChainPaymaster.sol | Updated interface to replace single feed events/functions with add/remove operations; added new error types and getter methods for the feed set |
| contracts/contracts/sapphire/CrossChainPaymaster.sol | Implemented EnumerableSet for storing multiple ROSE/USD feeds; refactored price conversion to calculate mean across all valid feeds with graceful error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8af077b to
d7308cc
Compare
contracts/tasks/paymaster/deploy/deploy-cross-chain-paymaster.ts
Outdated
Show resolved
Hide resolved
eb24507 to
a33b225
Compare
No description provided.