// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /// @notice Consumer base with the same entry point as Pyth's IEntropyConsumer: /// `_entropyCallback(uint64,address,bytes32)`, selector 0x52a5f1f8. The hub calls it /// with a bounded gas limit; a revert here never erases the stored result. abstract contract IEntropyConsumer { function _entropyCallback(uint64 sequence, address provider, bytes32 randomNumber) external { address entropy = getEntropy(); require(entropy != address(0), "Entropy address not set"); require(msg.sender == entropy, "Only Entropy can call this function"); entropyCallback(sequence, provider, randomNumber); } /// @dev The hub (proxy) address trusted to deliver callbacks. function getEntropy() internal view virtual returns (address); function entropyCallback(uint64 sequence, address provider, bytes32 randomNumber) internal virtual; }