This repository was archived by the owner on May 6, 2025. It is now read-only.
forked from brunoenten/pyth-sdk-solidity
-
Notifications
You must be signed in to change notification settings - Fork 1
Update the SDK for downstream optimizations #32
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b3f16d7
Move events to PythEvents
ali-behjati e424470
Remove unneccsary events and event fields
ali-behjati 488b229
Make all methods virtual
ali-behjati 583b770
Bump version from 2.0.0 to 2.1.0
ali-behjati 03de85d
Update ABIs
ali-behjati 7bc4add
rename PythEvents + IPythEvents
ali-behjati 64007c4
Add abi for IPythEvents
ali-behjati 20c0101
Add/update comments
ali-behjati File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.0; | ||
|
||
/// @title IPythEvents contains the events that Pyth contract emits. | ||
/// @dev This interface can be used for listening to the updates for off-chain and testing purposes. | ||
interface IPythEvents { | ||
/// @dev Emitted when the price feed with `id` has received a fresh update. | ||
/// @param id The Pyth Price Feed ID. | ||
/// @param publishTime Publish time of the given price update. | ||
/// @param price Price of the given price update. | ||
/// @param conf Confidence interval of the given price update. | ||
event PriceFeedUpdate(bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf); | ||
|
||
/// @dev Emitted when a batch price update is processed successfully. | ||
/// @param chainId ID of the source chain that the batch price update comes from. | ||
/// @param sequenceNumber Sequence number of the batch price update. | ||
event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint16", | ||
"name": "chainId", | ||
"type": "uint16" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "BatchPriceFeedUpdate", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "id", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint64", | ||
"name": "publishTime", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "int64", | ||
"name": "price", | ||
"type": "int64" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint64", | ||
"name": "conf", | ||
"type": "uint64" | ||
} | ||
], | ||
"name": "PriceFeedUpdate", | ||
"type": "event" | ||
} | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.