Просмотр исходного кода

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

Tejas Badadare 6 месяцев назад
Родитель
Сommit
85213c5814
1 измененных файлов с 2 добавлено и 2 удалено
  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]];