Skip to content

Commit c842b9d

Browse files
committed
chore: rename downSlotRatio to downSlotsRatio
1 parent 93195fa commit c842b9d

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

target_chains/ethereum/contracts/contracts/pyth/Pyth.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,14 +601,14 @@ abstract contract Pyth is
601601
twapPriceFeed.startTime = twapPriceInfoStart.publishTime;
602602
twapPriceFeed.endTime = twapPriceInfoEnd.publishTime;
603603

604-
// Calculate downSlotRatio as a value between 0 and 1,000,000
604+
// Calculate downSlotsRatio as a value between 0 and 1,000,000
605605
// 0 means no slots were missed, 1,000,000 means all slots were missed
606606
uint64 totalDownSlots = twapPriceInfoEnd.numDownSlots -
607607
twapPriceInfoStart.numDownSlots;
608608
uint64 downSlotsRatio = (totalDownSlots * 1_000_000) / slotDiff;
609609

610610
// Safely downcast to uint32 (sufficient for value range 0-1,000,000)
611-
twapPriceFeed.downSlotRatio = uint32(downSlotsRatio);
611+
twapPriceFeed.downSlotsRatio = uint32(downSlotsRatio);
612612

613613
return twapPriceFeed;
614614
}

target_chains/ethereum/sdk/solidity/IPythEvents.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ interface IPythEvents {
2222
/// @param endTime End time of the TWAP.
2323
/// @param twapPrice Price of the TWAP.
2424
/// @param twapConf Confidence interval of the TWAP.
25-
/// @param downSlotRatio Down slot ratio of the TWAP.
25+
/// @param downSlotsRatio Down slot ratio of the TWAP.
2626
event TwapPriceFeedUpdate(
2727
bytes32 indexed id,
2828
uint64 startTime,
2929
uint64 endTime,
3030
int64 twapPrice,
3131
uint64 twapConf,
32-
uint32 downSlotRatio
32+
uint32 downSlotsRatio
3333
);
3434
}

target_chains/ethereum/sdk/solidity/MockPyth.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ contract MockPyth is AbstractPyth {
284284
endTime,
285285
twapFeed.twap.price,
286286
twapFeed.twap.conf,
287-
twapFeed.downSlotRatio
287+
twapFeed.downSlotsRatio
288288
);
289289
}
290290

@@ -342,13 +342,13 @@ contract MockPyth is AbstractPyth {
342342
twapPriceFeed.twap.expo = twapPriceInfoStart.expo;
343343
twapPriceFeed.twap.publishTime = twapPriceInfoEnd.publishTime;
344344

345-
// Calculate downSlotRatio as a value between 0 and 1,000,000
345+
// Calculate downSlotsRatio as a value between 0 and 1,000,000
346346
uint64 totalDownSlots = twapPriceInfoEnd.numDownSlots -
347347
twapPriceInfoStart.numDownSlots;
348348
uint64 downSlotsRatio = (totalDownSlots * 1_000_000) / slotDiff;
349349

350350
// Safely downcast to uint32 (sufficient for value range 0-1,000,000)
351-
twapPriceFeed.downSlotRatio = uint32(downSlotsRatio);
351+
twapPriceFeed.downSlotsRatio = uint32(downSlotsRatio);
352352

353353
return twapPriceFeed;
354354
}

target_chains/ethereum/sdk/solidity/PythStructs.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ contract PythStructs {
4141
// TWAP price
4242
Price twap;
4343
// Down slot ratio
44-
uint32 downSlotRatio;
44+
uint32 downSlotsRatio;
4545
}
4646
}

target_chains/ethereum/sdk/solidity/abis/AbstractPyth.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
{
8282
"indexed": false,
8383
"internalType": "uint32",
84-
"name": "downSlotRatio",
84+
"name": "downSlotsRatio",
8585
"type": "uint32"
8686
}
8787
],
@@ -627,7 +627,7 @@
627627
},
628628
{
629629
"internalType": "uint32",
630-
"name": "downSlotRatio",
630+
"name": "downSlotsRatio",
631631
"type": "uint32"
632632
}
633633
],

target_chains/ethereum/sdk/solidity/abis/IPyth.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
{
6767
"indexed": false,
6868
"internalType": "uint32",
69-
"name": "downSlotRatio",
69+
"name": "downSlotsRatio",
7070
"type": "uint32"
7171
}
7272
],
@@ -517,7 +517,7 @@
517517
},
518518
{
519519
"internalType": "uint32",
520-
"name": "downSlotRatio",
520+
"name": "downSlotsRatio",
521521
"type": "uint32"
522522
}
523523
],

target_chains/ethereum/sdk/solidity/abis/IPythEvents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
{
6767
"indexed": false,
6868
"internalType": "uint32",
69-
"name": "downSlotRatio",
69+
"name": "downSlotsRatio",
7070
"type": "uint32"
7171
}
7272
],

target_chains/ethereum/sdk/solidity/abis/MockPyth.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
{
123123
"indexed": false,
124124
"internalType": "uint32",
125-
"name": "downSlotRatio",
125+
"name": "downSlotsRatio",
126126
"type": "uint32"
127127
}
128128
],
@@ -722,7 +722,7 @@
722722
},
723723
{
724724
"internalType": "uint32",
725-
"name": "downSlotRatio",
725+
"name": "downSlotsRatio",
726726
"type": "uint32"
727727
}
728728
],

0 commit comments

Comments
 (0)