Skip to content

Conversation

@rube-de
Copy link
Collaborator

@rube-de rube-de commented Nov 11, 2025

No description provided.

Copy link

Copilot AI left a 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 roseUsdFeed to a set of feeds (_roseUsdFeeds) using OpenZeppelin's EnumerableSet
  • Replaced setRoseUsdFeed with addRoseUsdFeed and removeRoseUsdFeed functions
  • Modified _convertToRose to 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.

Copy link

Copilot AI left a 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.

@rube-de rube-de force-pushed the rube/7-add-function-to-get-mean-average-rose-price-form-price-feeds branch from 8af077b to d7308cc Compare November 11, 2025 18:54
@rube-de rube-de requested a review from matevz November 11, 2025 18:56
@rube-de rube-de force-pushed the rube/7-add-function-to-get-mean-average-rose-price-form-price-feeds branch from eb24507 to a33b225 Compare November 26, 2025 15:42
@rube-de rube-de requested a review from matevz December 10, 2025 20:23
@rube-de rube-de merged commit b74141f into master Dec 11, 2025
5 checks passed
@rube-de rube-de deleted the rube/7-add-function-to-get-mean-average-rose-price-form-price-feeds branch December 11, 2025 18:32
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.

Add function to get mean average ROSE price form Price Feeds

3 participants