Getting price feeds on hedera yeilds 0x2acbe915

:link: Chain : hedera-testnet

:stopwatch: Timestamp of the issue (block time or UTC) : 5:46:40.1696 PMSep 27, 2025, GMT+5:30

• 🧪 Steps to reproduce the issue : // Withdraw unlocked funds, with fresh Pyth price update
    function updateAndWithdraw(
        bytes[] calldata priceUpdateData
    ) external payable {
        emit DebugString("Entered updateAndWithdraw");

        uint256 fee = pyth.getUpdateFee(priceUpdateData);
        emit DebugUint("Pyth update fee", fee);

        pyth.updatePriceFeeds{value: fee}(priceUpdateData);
        emit DebugUint("Price update data count", priceUpdateData.length);

        Deposit storage dep = deposits[msg.sender];
        require(dep.amount > 0, "No deposit");
        emit DebugUint("Deposit amount", dep.amount);

        require(dep.goals.length > 0, "No goals configured");
        uint256 achievedCount = 0;
        for (uint i = 0; i < dep.goals.length; i++) {
            if (dep.goals[i].achieved) achievedCount++;
        }
        emit DebugUint("Achieved goals", achievedCount);

        uint256 unlocked = (dep.amount * achievedCount) / dep.goals.length;
        uint256 available = unlocked - dep.withdrawn;
        emit DebugUint("Available for withdrawal", available);
        require(available > 0, "Nothing to withdraw");

        // Get fresh price from Pyth
        PythStructs.Price memory price = pyth.getPriceUnsafe(hbarUsdPriceId);
        emit DebugUint("Raw price", uint256(int256(price.price)));
        emit DebugUint("Expo", uint256(int256(price.expo)));

        uint256 priceValue = uint256(int256(price.price));
        uint256 decimals = price.expo < 0
            ? uint32(-price.expo)
            : uint32(price.expo);
        uint256 usdValue = (available * priceValue) / (10 ** decimals);
        emit DebugUint("USD value", usdValue);

        dep.withdrawn += available;

        (bool sent, ) = msg.sender.call{value: available}("");
        require(sent, "Withdrawal transfer failed");

        emit Withdrawn(msg.sender, available, usdValue);

        uint256 refund = msg.value - fee;
        if (refund > 0) {
            (bool r, ) = msg.sender.call{value: refund}("");
            if (!r) {
                emit DebugString("Refund failed");
                emit DebugUint("Refund amount", refund);
            } else {
                if (dep.withdrawn == dep.amount) {
                    delete deposits[msg.sender];
                }
                emit DebugUint("Refunded excess fee", refund);
            }
        }
    }

• Project SRC (sol can be found here): GitHub - idRit/de-ring: FitChain Escrow is a Hedera-based fitness accountability dApp that lets users lock funds into escrow and gradually unlock them as they achieve step goals verified by their wearable device.

• Contact (Telegram/Email/Discord) : mritwik369@gmail.com

Hashscan reference: https://hashscan.io/testnet/transaction/1758975400.169619000

The contract address is 0x8a01ce8A5A8A47ED9f27265C979fe682247B116D

For further context, tried running GitHub - nidhi-singh02/pyth-pricefeed-demo: This is the repository for getting price feed data using pyth. If you wanna follow along check out my playlist on foundry, working good.

The Error provided is:

0x2acbe915 InvalidWormholeVaa() Given message is not a valid Wormhole VAA.

Hi,

How are you fetching the hermes data? Are you fetching using this guide?
What’s your hermes endpoint?

We are using the REST API provided in the link

curl --location ‘https://hermes-beta.pyth.network/v2/updates/price/latest?ids[]=0xf2ef5dc6156e6cdccda6c315f3fc6de2bf37e9aecbc9b5efc51de98096c3e7c6’

Please use https://hermes.pyth.network/ not hermes-beta. Even for testnets.

Beta hermes are for only aptos, sui and near testnets as mentioned here.

https://docs.pyth.network/price-feeds/price-feeds#feed-ids

1 Like

Thanks! This solved the issue