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

Commit a8e3e6c

Browse files
authored
Abehjati/fix-events-problems (#20)
* Bump version from 0.3.0 to 0.4.0 * update chainId type * Release 0.4.0-beta.0 * Fix typos
1 parent 45cee89 commit a8e3e6c

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

IPyth.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,25 @@ interface IPyth {
1313
/// @param chainId ID of the source chain that the batch price update containing this price.
1414
/// This value comes from Wormhole, and you can find the corresponding chains at https://docs.wormholenetwork.com/wormhole/contracts.
1515
/// @param sequenceNumber Sequence number of the batch price update containing this price.
16-
/// @param lastPublsihTime Publish time of the previously stored price.
16+
/// @param lastPublishTime Publish time of the previously stored price.
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 lastPublishTime, 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`).
3131
/// @param batchCount Number of batches that this function processed.
3232
/// @param fee Amount of paid fee for updating the prices.
3333
event UpdatePriceFeeds(address indexed sender, uint batchCount, uint fee);
3434

35-
3635
/// @notice Returns the current price and confidence interval.
3736
/// @dev Reverts if the current price is not available.
3837
/// @param id The Pyth Price Feed ID of which to fetch the current price and confidence interval.

IPythAbi.json

Lines changed: 5 additions & 5 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,
@@ -60,7 +60,7 @@
6060
{
6161
"indexed": false,
6262
"internalType": "uint64",
63-
"name": "lastPublsihTime",
63+
"name": "lastPublishTime",
6464
"type": "uint64"
6565
},
6666
{

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));

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-sdk-solidity",
3-
"version": "0.3.0",
3+
"version": "0.4.0-beta.0",
44
"description": "Read prices from the Pyth oracle",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)