src/cre/IReceiver.sol18 lines · 1026 bytes
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.28; |
| 3 | |
| 4 | import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; |
| 5 | |
| 6 | /// @title IReceiver - receives Chainlink CRE (Keystone) reports |
| 7 | /// @notice Verbatim interface from Chainlink CRE docs ("Building Consumer Contracts", IReceiver standard). |
| 8 | /// The KeystoneForwarder / MockKeystoneForwarder checks ERC-165 support for this interface id |
| 9 | /// before calling `onReport`. |
| 10 | interface IReceiver is IERC165 { |
| 11 | /// @notice Handles incoming keystone reports. |
| 12 | /// @dev If this function call reverts, it can be retried with a higher gas limit. |
| 13 | /// The receiver is responsible for discarding stale reports. |
| 14 | /// @param metadata Report's metadata (64 bytes from KeystoneForwarder: |
| 15 | /// workflowId(32) | workflowName(10) | workflowOwner(20) | reportId(2)). |
| 16 | /// @param report Workflow report (ABI-encoded payload produced by the workflow). |
| 17 | function onReport(bytes calldata metadata, bytes calldata report) external; |
| 18 | } |