# Have callback issue in Base Sepolia wih Entropy

**URL:** <https://dev-forum.pyth.network/t/have-callback-issue-in-base-sepolia-wih-entropy/515>\
**Category:** Entropy\
**Tags:** evm, entropy\
**Created:** [February 6, 2026, 10:40pm UTC](https://dev-forum.pyth.network/t/have-callback-issue-in-base-sepolia-wih-entropy/515 "2026-02-06T22:40:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mersault](https://yyz2.discourse-cdn.com/flex034/user_avatar/dev-forum.pyth.network/mersault/32/328_2.png) [@mersault](https://dev-forum.pyth.network/u/mersault)\
**Post date:** [February 6, 2026, 10:40pm UTC](https://dev-forum.pyth.network/t/have-callback-issue-in-base-sepolia-wih-entropy/515/1 "2026-02-06T22:40:24Z")

</div>

> Make sure to check the [Pyth Documentation](https://docs.pyth.network/home) 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

 ![image](https://canada1.discourse-cdn.com/flex034/uploads/dev_pyth/original/1X/5f3254b96995113feb1bc039b590342ae2f4d93b.png)

- Base Sepolia

---

<div class="post-metadata">

**Author:** ![tejas\_pyth](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@tejas\_pyth](https://dev-forum.pyth.network/u/tejas_pyth)\
**Post date:** [February 6, 2026, 11:01pm UTC](https://dev-forum.pyth.network/t/have-callback-issue-in-base-sepolia-wih-entropy/515/2 "2026-02-06T23:01:22Z")

</div>

Gm @mersault !

The issue could be that the callback function signature is wrong. It appears that you’re trying to manually handle the callback and verify details, but instead you should be using the `IEntropyConsumer` interface, which handles all of that. Your contract must:

1. Inherit from `IEntropyConsumer` (import from `@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol`)
2. Override `_entropyCallback` (with underscore prefix, `internal override`), not `entropyCallback`

Correct pattern:

```auto
solidity
import "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol";

contract MyContract is IEntropyConsumer {
    function _entropyCallback(
        uint64 sequenceNumber,
        address provider,
        bytes32 randomNumber
    ) internal override {
        emit FlipResult(sequenceNumber, uint256(randomNumber));
    }

    function getEntropy() internal view override returns (address) {
        return ENTROPY_ADDRESS;
    }
}

```

The Entropy contract calls `entropyCallback` on `IEntropyConsumer`, which internally verifies the caller and then routes to your `_entropyCallback`. Since your contract defines a bare `entropyCallback` (not inheriting the interface), the Entropy keeper can’t invoke it properly.

You can see an example here, specifically the Handle the Callback section: [Create your first Entropy app on EVM | Pyth Developer Hub](https://docs.pyth.network/entropy/create-your-first-entropy-app)

---

<div class="post-metadata">

**Author:** ![mersault](https://yyz2.discourse-cdn.com/flex034/user_avatar/dev-forum.pyth.network/mersault/32/328_2.png) [@mersault](https://dev-forum.pyth.network/u/mersault)\
**Post date:** [February 11, 2026, 2:19am UTC](https://dev-forum.pyth.network/t/have-callback-issue-in-base-sepolia-wih-entropy/515/3 "2026-02-11T02:19:42Z")

</div>

idk , my AI is broken maybe i cant fix it

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IEntropy {

```
function getFeeV2(address provider, uint32 gasLimit) external view returns (uint128);

function requestV2(address provider, bytes32 userRandomNumber, uint32 gasLimit) external payable returns (uint64);

```

}

// 🔥 НОВА НАЗВА КОНТРАКТУ

contract UnoRealVersion {

```
event FlipResult(uint64 indexed sequenceNumber, uint256 randomSeed);

event DebugLog(string message, address sender);

// Адреси Base Sepolia

address constant ENTROPY = 0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c;

address constant PROVIDER = 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344;

uint32 constant CALLBACK_GAS_LIMIT = 500000;

// Функція відкрита для всіх (для тесту)

function entropyCallback(

    uint64 sequenceNumber,

    address,

    bytes32 randomNumber

) external {

    // ❌ ЗАХИСТ ВИМКНЕНО

    // Ми просто логуємо, хто нас викликав

    emit DebugLog("Called by:", msg.sender);

    

    // Віддаємо результат

    emit FlipResult(sequenceNumber, uint256(randomNumber));

}

function request() external payable returns (uint64) {

    bytes32 userRandom = keccak256(abi.encodePacked(block.timestamp, msg.sender));

    return IEntropy(ENTROPY).requestV2{value: msg.value}(

        PROVIDER, 

        userRandom, 

        CALLBACK_GAS_LIMIT

    );

}

function getFee() external view returns (uint256) {

    return IEntropy(ENTROPY).getFeeV2(PROVIDER, CALLBACK_GAS_LIMIT);

}

```

}  
here last contract , i gave him all information from docs
