Bläddra i källkod

fix: use memory instead of storage for priceUpdates struct (#2647)

Tejas Badadare 6 månader sedan
förälder
incheckning
85213c5814
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      target_chains/ethereum/contracts/contracts/pulse/Scheduler.sol

+ 2 - 2
target_chains/ethereum/contracts/contracts/pulse/Scheduler.sol

@@ -450,7 +450,7 @@ abstract contract Scheduler is IScheduler, SchedulerState {
                     params.priceIds.length
                 );
             for (uint8 i = 0; i < params.priceIds.length; i++) {
-                PythStructs.PriceFeed storage priceFeed = _state.priceUpdates[
+                PythStructs.PriceFeed memory priceFeed = _state.priceUpdates[
                     subscriptionId
                 ][params.priceIds[i]];
                 // Check if the price feed exists (price ID is valid and has been updated)
@@ -468,7 +468,7 @@ abstract contract Scheduler is IScheduler, SchedulerState {
                 priceIds.length
             );
         for (uint8 i = 0; i < priceIds.length; i++) {
-            PythStructs.PriceFeed storage priceFeed = _state.priceUpdates[
+            PythStructs.PriceFeed memory priceFeed = _state.priceUpdates[
                 subscriptionId
             ][priceIds[i]];