# Having trouble deploying my V2 on Base

**URL:** <https://dev-forum.pyth.network/t/having-trouble-deploying-my-v2-on-base/479>\
**Category:** Entropy\
**Tags:** entropy\
**Created:** [November 29, 2025, 1:32pm UTC](https://dev-forum.pyth.network/t/having-trouble-deploying-my-v2-on-base/479 "2025-11-29T13:32:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0xsorcerer](https://yyz2.discourse-cdn.com/flex034/user_avatar/dev-forum.pyth.network/0xsorcerer/32/17_2.png) [@0xsorcerer](https://dev-forum.pyth.network/u/0xsorcerer)\
**Post date:** [November 29, 2025, 1:32pm UTC](https://dev-forum.pyth.network/t/having-trouble-deploying-my-v2-on-base/479/1 "2025-11-29T13:32:26Z")

</div>

> Make sure to check the [Pyth Documentation](https://docs.pyth.network/home) to check for guides, common errors and reference materials.

Make sure to add the following items asking for support.

- Base mainnet
- 0x075A9C4D78894B9497aFa8836CD4A70D2819EcB2
- Steps to reproduce the error
- Any `code snippet` that you can share

import " [openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol at master · OpenZeppelin/openzeppelin-contracts · GitHub](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol) ";

import " [openzeppelin-contracts/contracts/token/ERC20/IERC20.sol at master · OpenZeppelin/openzeppelin-contracts · GitHub](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol) ";

import " [pyth-crosschain/target\_chains/ethereum/entropy\_sdk/solidity/IEntropyV2.sol at main · pyth-network/pyth-crosschain · GitHub](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/entropy_sdk/solidity/IEntropyV2.sol) ";

import “[pyth-crosschain/target\_chains/ethereum/entropy\_sdk/solidity/IEntropyConsumer.sol at main · pyth-network/pyth-crosschain · GitHub](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/entropy_sdk/solidity/IEntropyConsumer.sol)”;

contract MyContract is ReentrancyGuard, IEntropyConsumer {

```
constructor(

    address \_entropy

) {

    entropy = IEntropyV2(\_entropy);

}

```

…rest of code….

IEntropyV2 private entropy;

…rest of code…

// Get the fee for requesting a random number (V2 returns uint128 in the SDK)

```
function getRequestFee() public view returns (uint256 fee\_) {

    uint128 f = entropy.getFeeV2();

    fee\_ = uint256(f);

}

```

// Callback function called by entropy with the random number

```
function entropyCallback(

    uint64 sequenceNumber,

    address /\* providerAddress \*/,

    bytes32 randomNumber

) internal override {

    // Convert the random number to uint256

    uint256 randomValue = uint256(randomNumber);

```

…rest of code….

```
}

// Required by IEntropyConsumer interface

// Required by IEntropyConsumer interface

function getEntropy() internal view override returns (address) {

    return address(entropy);

}

receive() external payable {}

```

function fetchEntropyData () public payable nonReentrant {

```
    uint64 sequenceNumber = entropy.requestV2{value: \_fee}();

```

---

<div class="post-metadata">

**Author:** ![Aditya520](https://yyz2.discourse-cdn.com/flex034/user_avatar/dev-forum.pyth.network/aditya520/32/12_2.png) [@Aditya520](https://dev-forum.pyth.network/u/Aditya520)\
**Post date:** [November 30, 2025, 4:53pm UTC](https://dev-forum.pyth.network/t/having-trouble-deploying-my-v2-on-base/479/2 "2025-11-30T16:53:27Z")

</div>

Hey, thank you for posting.

Can you please share some logs or screenshot of the error that you received? This will help us to debug your issues fast.

---

<div class="post-metadata">

**Author:** ![0xsorcerer](https://yyz2.discourse-cdn.com/flex034/user_avatar/dev-forum.pyth.network/0xsorcerer/32/17_2.png) [@0xsorcerer](https://dev-forum.pyth.network/u/0xsorcerer)\
**Post date:** [November 30, 2025, 8:19pm UTC](https://dev-forum.pyth.network/t/having-trouble-deploying-my-v2-on-base/479/3 "2025-11-30T20:19:02Z")

</div>

The Pyth V2 contracts just fine. I upgraded it successfully.
