Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 22, 2025

Summary

Updates the EVM troubleshooting documentation to replace references to the deprecated getPrice() method with the recommended getPriceNoOlderThan() method. Also updates method links to point to GitHub source code at a specific commit for stability.

Rationale

The getPrice() method is deprecated in the Pyth EVM SDK (as noted in AbstractPyth.sol). The recommended replacement is getPriceNoOlderThan(), which provides more flexibility by allowing users to specify the maximum age of the price via the age parameter.

Changes made:

  • Updated section headers from getPrice() to getPriceNoOlderThan()
  • Updated the StalePrice error explanation to reference the age parameter instead of validTimePeriod
  • Removed reference to the deprecated getValidTime() method
  • Updated method links to point to GitHub source code at commit 9825470036fc24de3d52b139087ea0cd4117624a (except one link kept as API reference per review feedback)

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Documentation-only change. Verified the deprecated status of getPrice() and getValidTime() by reviewing the SDK source code in target_chains/ethereum/sdk/solidity/AbstractPyth.sol.

Human Review Checklist

  • Verify the GitHub source links point to the correct line numbers for each method:
    • updatePriceFeeds() → AbstractPyth.sol#L90 (in StalePrice and InsufficientFee sections)
    • getPriceUnsafe() → AbstractPyth.sol#L43
    • getUpdateFee() → IPyth.sol#L93
  • Confirm the updatePriceFeeds() link in the PriceFeedNotFound section correctly uses the API reference URL (kept per review feedback)
  • Confirm no other documentation pages reference the deprecated getPrice() method

Link to Devin run: https://app.devin.ai/sessions/87cef1e82e034658ad12642f6cf66e09
Requested by: Nidhi Singh (@nidhi-singh02)

… troubleshooting guide

Co-Authored-By: Nidhi Singh <nidhi2894@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented Dec 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
component-library Ready Ready Preview, Comment Dec 22, 2025 2:32pm
developer-hub Ready Ready Preview, Comment Dec 22, 2025 2:32pm
5 Skipped Deployments
Project Deployment Review Updated (UTC)
api-reference Skipped Skipped Dec 22, 2025 2:32pm
entropy-explorer Skipped Skipped Dec 22, 2025 2:32pm
insights Skipped Skipped Dec 22, 2025 2:32pm
proposals Skipped Skipped Dec 22, 2025 2:32pm
staking Skipped Skipped Dec 22, 2025 2:32pm

- Update the prices by calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds)
by passing the latest updateData from [Hermes](https://hermes.pyth.network/docs/#/rest/latest_vaas).
- Another method to fetch the price is [`getPriceUnsafe()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L41)
- Another method to fetch the price is [`getPriceUnsafe()`](https://api-reference.pyth.network/price-feeds/evm/getPriceUnsafe)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should point to

To resolve this issue:

- Update the prices by calling [`updatePriceFeeds()`]("https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L88")
- Update the prices by calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should refer to the code

devin-ai-integration bot and others added 2 commits December 22, 2025 14:17
Co-Authored-By: Nidhi Singh <nidhi2894@gmail.com>
…back

Co-Authored-By: Nidhi Singh <nidhi2894@gmail.com>
@vercel vercel bot temporarily deployed to Preview – proposals December 22, 2025 14:18 Inactive
@vercel vercel bot temporarily deployed to Preview – insights December 22, 2025 14:18 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference December 22, 2025 14:18 Inactive
@vercel vercel bot temporarily deployed to Preview – staking December 22, 2025 14:18 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer December 22, 2025 14:18 Inactive

- Fetch the latest fee by calling [`getUpdateFee()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method and
provide the required fee to `msg.value` when calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method.
- Fetch the latest fee by calling [`getUpdateFee()`](https://api-reference.pyth.network/price-feeds/evm/getUpdateFee) method and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should point to

- Fetch the latest fee by calling [`getUpdateFee()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method and
provide the required fee to `msg.value` when calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method.
- Fetch the latest fee by calling [`getUpdateFee()`](https://api-reference.pyth.network/price-feeds/evm/getUpdateFee) method and
provide the required fee to `msg.value` when calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds) method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should point to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I've updated all method links to point to GitHub source code. The updatePriceFeeds() link now points to

Co-Authored-By: Nidhi Singh <nidhi2894@gmail.com>
To resolve this issue:

- Update the prices by calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds)
- Update the prices by calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/9825470036fc24de3d52b139087ea0cd4117624a/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L90)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Reverted the updatePriceFeeds() link in the PriceFeedNotFound section back to the API reference URL.

…API reference per review feedback

Co-Authored-By: Nidhi Singh <nidhi2894@gmail.com>
@vercel vercel bot temporarily deployed to Preview – staking December 22, 2025 14:29 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference December 22, 2025 14:29 Inactive
@vercel vercel bot temporarily deployed to Preview – insights December 22, 2025 14:29 Inactive
Comment on lines 16 to 38
- Update the prices by calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/9825470036fc24de3d52b139087ea0cd4117624a/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L90)
by passing the latest updateData from [Hermes](https://hermes.pyth.network/docs/#/rest/latest_vaas).
- Another method to fetch the price is [`getPriceUnsafe()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L41)
- Another method to fetch the price is [`getPriceUnsafe()`](https://github.com/pyth-network/pyth-crosschain/blob/9825470036fc24de3d52b139087ea0cd4117624a/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L43)
If the price feed is available, the method will return the latest prices with timestamp of last update.
NOTE: `getPriceUnsafe()` method does not check the freshness of the price.

#### getPrice() reverts with `PriceFeedNotFound()` or `0x14aebe68` error
#### getPriceNoOlderThan() reverts with `PriceFeedNotFound()` or `0x14aebe68` error

This error occurs when the requested price feed has not been updated on-chain, or the price feed id is incorrect.

To resolve this issue:

- Update the prices by calling [`updatePriceFeeds()`](https://api-reference.pyth.network/price-feeds/evm/updatePriceFeeds)
by passing the latest updateData from [Hermes](https://hermes.pyth.network/docs/#/rest/latest_vaas).
- Check the entered [price feed id](../price-feeds) and [pyth-contract address](https://docs.pyth.network/price-feeds/contract-addresses/evm) to make sure they are correct.

#### updatePriceFeeds() reverts with `InsufficientFee()` or `0x025dbdd4` error

This error occurs when the fee provided for updating the price feed is insufficient.
To resolve this issue:

- Fetch the latest fee by calling [`getUpdateFee()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method and
provide the required fee to `msg.value` when calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/solidity/IPyth.sol#L112) method.
- Fetch the latest fee by calling [`getUpdateFee()`](https://github.com/pyth-network/pyth-crosschain/blob/9825470036fc24de3d52b139087ea0cd4117624a/target_chains/ethereum/sdk/solidity/IPyth.sol#L93) method and
provide the required fee to `msg.value` when calling [`updatePriceFeeds()`](https://github.com/pyth-network/pyth-crosschain/blob/9825470036fc24de3d52b139087ea0cd4117624a/target_chains/ethereum/sdk/solidity/AbstractPyth.sol#L90) method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not from /main anymore, is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is intentional. @nidhi-singh02 requested that the method links point to a specific commit (9825470036fc24de3d52b139087ea0cd4117624a) rather than /main to ensure the line numbers remain stable and don't break if the source file is modified in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay sir I didn't know you also respond lol

Copy link
Contributor

@alexcambose alexcambose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, seems the links have changed to 9825470036fc24de3d52b139087ea0cd4117624a commit though, idk if that's intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants