Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 129efb4

Browse files
committed
update chainId type
1 parent 3dd11e5 commit 129efb4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

IPyth.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ interface IPyth {
1717
/// @param publishTime Publish time of the given price update.
1818
/// @param price Current price of the given price update.
1919
/// @param conf Current confidence interval of the given price update.
20-
event PriceFeedUpdate(bytes32 indexed id, bool indexed fresh, int8 chainId, uint64 sequenceNumber, uint64 lastPublsihTime, uint64 publishTime, int64 price, uint64 conf);
20+
event PriceFeedUpdate(bytes32 indexed id, bool indexed fresh, uint16 chainId, uint64 sequenceNumber, uint64 lastPublsihTime, uint64 publishTime, int64 price, uint64 conf);
2121

2222
/// @dev Emitted when a batch price update is processed successfully.
2323
/// @param chainId ID of the source chain that the batch price update comes from.
2424
/// @param sequenceNumber Sequence number of the batch price update.
2525
/// @param batchSize Number of prices within the batch price update.
2626
/// @param freshPricesInBatch Number of prices that were more recent and were stored.
27-
event BatchPriceFeedUpdate(int8 chainId, uint64 sequenceNumber, uint batchSize, uint freshPricesInBatch);
27+
event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber, uint batchSize, uint freshPricesInBatch);
2828

2929
/// @dev Emitted when a call to `updatePriceFeeds` is processed successfully.
3030
/// @param sender Sender of the call (`msg.sender`).

IPythAbi.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"inputs": [
55
{
66
"indexed": false,
7-
"internalType": "int8",
7+
"internalType": "uint16",
88
"name": "chainId",
9-
"type": "int8"
9+
"type": "uint16"
1010
},
1111
{
1212
"indexed": false,
@@ -47,9 +47,9 @@
4747
},
4848
{
4949
"indexed": false,
50-
"internalType": "int8",
50+
"internalType": "uint16",
5151
"name": "chainId",
52-
"type": "int8"
52+
"type": "uint16"
5353
},
5454
{
5555
"indexed": false,

MockPyth.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ contract MockPyth is AbstractPyth {
3030

3131
// Chain ID is id of the source chain that the price update comes from. Since it is just a mock contract
3232
// We set it to 1.
33-
int8 chainId = 1;
33+
uint16 chainId = 1;
3434

3535
for(uint i = 0; i < updateData.length; i++) {
3636
PythStructs.PriceFeed memory priceFeed = abi.decode(updateData[i], (PythStructs.PriceFeed));

0 commit comments

Comments
 (0)