You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: target_chains/ethereum/contracts/contracts/pulse/IPulse.sol
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,30 @@ interface IPulseConsumer {
16
16
17
17
interfaceIPulseisPulseEvents {
18
18
// Core functions
19
+
/**
20
+
* @notice Requests price updates with a callback
21
+
* @dev The msg.value must cover both the Pyth fee and gas costs
22
+
* Note: The actual gas required for execution will be 1.5x the callbackGasLimit
23
+
* to account for cross-contract call overhead + some gas for some other operations in the function before the callback
24
+
* @param publishTime The minimum publish time for price updates
25
+
* @param priceIds The price feed IDs to update
26
+
* @param callbackGasLimit Gas limit for the callback execution
27
+
* @return sequenceNumber The sequence number assigned to this request
28
+
*/
19
29
function requestPriceUpdatesWithCallback(
20
30
uint256publishTime,
21
31
bytes32[] calldatapriceIds,
22
32
uint256callbackGasLimit
23
33
) externalpayablereturns (uint64sequenceNumber);
24
34
35
+
/**
36
+
* @notice Executes the callback for a price update request
37
+
* @dev Requires 1.5x the callback gas limit to account for cross-contract call overhead
38
+
* For example, if callbackGasLimit is 1M, the transaction needs at least 1.5M gas + some gas for some other operations in the function before the callback
39
+
* @param sequenceNumber The sequence number of the request
40
+
* @param updateData The raw price update data from Pyth
41
+
* @param priceIds The price feed IDs to update, must match the request
0 commit comments