@@ -252,7 +252,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
252
252
bytes [] memory updateData = createMockUpdateData (initialPriceFeeds);
253
253
254
254
vm.prank (pusher);
255
- scheduler.updatePriceFeeds (subscriptionId, updateData, initialPriceIds );
255
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
256
256
257
257
// Verify initial state: All 3 feeds should be readable
258
258
assertTrue (
@@ -830,7 +830,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
830
830
emit PricesUpdated (subscriptionId, publishTime1);
831
831
vm.prank (pusher);
832
832
833
- scheduler.updatePriceFeeds (subscriptionId, updateData1, priceIds );
833
+ scheduler.updatePriceFeeds (subscriptionId, updateData1);
834
834
835
835
// Verify first update
836
836
(, SchedulerState.SubscriptionStatus memory status1 ) = scheduler
@@ -881,7 +881,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
881
881
emit PricesUpdated (subscriptionId, publishTime2);
882
882
vm.prank (pusher);
883
883
884
- scheduler.updatePriceFeeds (subscriptionId, updateData2, priceIds );
884
+ scheduler.updatePriceFeeds (subscriptionId, updateData2);
885
885
886
886
// Verify second update
887
887
(, SchedulerState.SubscriptionStatus memory status2 ) = scheduler
@@ -948,7 +948,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
948
948
949
949
// Perform update
950
950
vm.prank (pusher);
951
- scheduler.updatePriceFeeds (subscriptionId, updateData, params.priceIds );
951
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
952
952
953
953
// Get state after
954
954
(, SchedulerState.SubscriptionStatus memory statusAfter ) = scheduler
@@ -1050,7 +1050,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1050
1050
// Expect revert due to insufficient balance for total fee
1051
1051
vm.expectRevert (abi.encodeWithSelector (InsufficientBalance.selector ));
1052
1052
vm.prank (pusher);
1053
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1053
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1054
1054
}
1055
1055
1056
1056
function testUpdatePriceFeedsRevertsOnHeartbeatUpdateConditionNotMet ()
@@ -1073,15 +1073,14 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1073
1073
uint256 fundAmount = 1 ether ;
1074
1074
scheduler.addFunds {value: fundAmount}(subscriptionId);
1075
1075
// First update to set initial timestamp
1076
- bytes32 [] memory priceIds = createPriceIds ();
1077
1076
uint64 publishTime1 = SafeCast.toUint64 (block .timestamp );
1078
1077
PythStructs.PriceFeed[] memory priceFeeds1;
1079
1078
uint64 [] memory slots1;
1080
1079
(priceFeeds1, slots1) = createMockPriceFeedsWithSlots (publishTime1, 2 );
1081
1080
mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots1);
1082
1081
bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
1083
1082
vm.prank (pusher);
1084
- scheduler.updatePriceFeeds (subscriptionId, updateData1, priceIds );
1083
+ scheduler.updatePriceFeeds (subscriptionId, updateData1);
1085
1084
1086
1085
// Prepare second update within heartbeat interval
1087
1086
vm.warp (block .timestamp + 30 ); // Advance time by 30 seconds (less than 60)
@@ -1097,7 +1096,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1097
1096
abi.encodeWithSelector (UpdateConditionsNotMet.selector )
1098
1097
);
1099
1098
vm.prank (pusher);
1100
- scheduler.updatePriceFeeds (subscriptionId, updateData2, priceIds );
1099
+ scheduler.updatePriceFeeds (subscriptionId, updateData2);
1101
1100
}
1102
1101
1103
1102
function testUpdatePriceFeedsRevertsOnDeviationUpdateConditionNotMet ()
@@ -1121,15 +1120,14 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1121
1120
scheduler.addFunds {value: fundAmount}(subscriptionId);
1122
1121
1123
1122
// First update to set initial price
1124
- bytes32 [] memory priceIds = createPriceIds ();
1125
1123
uint64 publishTime1 = SafeCast.toUint64 (block .timestamp );
1126
1124
PythStructs.PriceFeed[] memory priceFeeds1;
1127
1125
uint64 [] memory slots;
1128
1126
(priceFeeds1, slots) = createMockPriceFeedsWithSlots (publishTime1, 2 );
1129
1127
mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds1, slots);
1130
1128
bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
1131
1129
vm.prank (pusher);
1132
- scheduler.updatePriceFeeds (subscriptionId, updateData1, priceIds );
1130
+ scheduler.updatePriceFeeds (subscriptionId, updateData1);
1133
1131
1134
1132
// Prepare second update with price deviation less than threshold (e.g., 50 bps)
1135
1133
vm.warp (block .timestamp + 1000 ); // Advance time significantly (doesn't matter for deviation)
@@ -1160,7 +1158,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1160
1158
abi.encodeWithSelector (UpdateConditionsNotMet.selector )
1161
1159
);
1162
1160
vm.prank (pusher);
1163
- scheduler.updatePriceFeeds (subscriptionId, updateData2, priceIds );
1161
+ scheduler.updatePriceFeeds (subscriptionId, updateData2);
1164
1162
}
1165
1163
1166
1164
function testUpdatePriceFeedsRevertsOnOlderTimestamp () public {
@@ -1173,7 +1171,6 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1173
1171
scheduler.addFunds {value: fundAmount}(subscriptionId);
1174
1172
1175
1173
// First update to establish last updated timestamp
1176
- bytes32 [] memory priceIds = createPriceIds ();
1177
1174
uint64 publishTime1 = SafeCast.toUint64 (block .timestamp );
1178
1175
PythStructs.PriceFeed[] memory priceFeeds1;
1179
1176
uint64 [] memory slots1;
@@ -1182,7 +1179,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1182
1179
bytes [] memory updateData1 = createMockUpdateData (priceFeeds1);
1183
1180
1184
1181
vm.prank (pusher);
1185
- scheduler.updatePriceFeeds (subscriptionId, updateData1, priceIds );
1182
+ scheduler.updatePriceFeeds (subscriptionId, updateData1);
1186
1183
1187
1184
// Prepare second update with an older timestamp
1188
1185
uint64 publishTime2 = publishTime1 - 10 ; // Timestamp older than the first update
@@ -1204,7 +1201,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1204
1201
1205
1202
// Attempt to update price feeds
1206
1203
vm.prank (pusher);
1207
- scheduler.updatePriceFeeds (subscriptionId, updateData2, priceIds );
1204
+ scheduler.updatePriceFeeds (subscriptionId, updateData2);
1208
1205
}
1209
1206
1210
1207
function testUpdatePriceFeedsRevertsOnMismatchedSlots () public {
@@ -1217,7 +1214,6 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1217
1214
scheduler.addFunds {value: fundAmount}(subscriptionId);
1218
1215
1219
1216
// Create two price feeds with same timestamp but different slots
1220
- bytes32 [] memory priceIds = createPriceIds (2 );
1221
1217
uint64 publishTime = SafeCast.toUint64 (block .timestamp );
1222
1218
PythStructs.PriceFeed[] memory priceFeeds = new PythStructs.PriceFeed [](
1223
1219
2
@@ -1239,7 +1235,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1239
1235
1240
1236
// Attempt to update price feeds
1241
1237
vm.prank (pusher);
1242
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1238
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1243
1239
}
1244
1240
1245
1241
function testUpdateSubscriptionEnforcesMinimumBalanceOnAddingFeeds ()
@@ -1350,7 +1346,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1350
1346
bytes [] memory updateData = createMockUpdateData (priceFeeds);
1351
1347
1352
1348
vm.prank (pusher);
1353
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1349
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1354
1350
1355
1351
// Get all latest prices (empty priceIds array)
1356
1352
bytes32 [] memory emptyPriceIds = new bytes32 [](0 );
@@ -1392,7 +1388,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1392
1388
bytes [] memory updateData = createMockUpdateData (priceFeeds);
1393
1389
1394
1390
vm.prank (pusher);
1395
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1391
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1396
1392
1397
1393
// Get only the first price feed
1398
1394
bytes32 [] memory selectedPriceIds = new bytes32 [](1 );
@@ -1445,10 +1441,9 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1445
1441
(priceFeeds, slots) = createMockPriceFeedsWithSlots (publishTime, 2 );
1446
1442
mockParsePriceFeedUpdatesWithSlots (pyth, priceFeeds, slots);
1447
1443
bytes [] memory updateData = createMockUpdateData (priceFeeds);
1448
- bytes32 [] memory priceIds = params.priceIds;
1449
1444
1450
1445
vm.prank (pusher);
1451
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1446
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1452
1447
1453
1448
// Try to access from a non-whitelisted address (should succeed)
1454
1449
address randomUser = address (0xdead );
@@ -1492,7 +1487,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1492
1487
bytes [] memory updateData = createMockUpdateData (priceFeeds);
1493
1488
1494
1489
vm.prank (pusher);
1495
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1490
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1496
1491
1497
1492
// Try to access from a non-whitelisted address (should fail)
1498
1493
vm.startPrank (address (0xdead ));
@@ -1559,7 +1554,7 @@ contract SchedulerTest is Test, SchedulerEvents, PulseSchedulerTestUtils {
1559
1554
bytes [] memory updateData = createMockUpdateData (priceFeeds);
1560
1555
1561
1556
vm.prank (pusher);
1562
- scheduler.updatePriceFeeds (subscriptionId, updateData, priceIds );
1557
+ scheduler.updatePriceFeeds (subscriptionId, updateData);
1563
1558
1564
1559
// Get EMA prices
1565
1560
bytes32 [] memory emptyPriceIds = new bytes32 [](0 );
0 commit comments