24 lines
1006 B
Solidity
24 lines
1006 B
Solidity
|
// 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);
|
||
|
}
|