Make sure to check the Pyth Documentation to check for guides, common errors and reference materials.
I’m not exactly sure what I did; I was just trying to ‘vibecode’ an idea I had. However, Gemini and Claude can’t seem to solve this callback issue. I’ve been experimenting with different smart contracts, but I can’t find a fix for this specific problem. I even asked the AI to generate the code along with all the documentation, but the issue persists
function entropyCallback(
uint64 sequenceNumber,
address provider,
bytes32 randomNumber
) external {
// ПЕРЕВІРКА БЕЗПЕКИ: Тільки контракт Entropy може це викликати
require(msg.sender == ENTROPY_ADDRESS, "Scam attempt: Only Entropy allowed");
// ПЕРЕВІРКА ПРОВАЙДЕРА: Тільки наш провайдер
require(provider == PROVIDER_ADDRESS, "Wrong provider");
// ✅ УСПІХ: Віддаємо число вашому сайту
emit FlipResult(sequenceNumber, uint256(randomNumber));
}
// Функція, щоб прийняти ETH
receive() external payable {}
}
here is my last callback funtcion in contract
- Base Sepolia
