Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion target_chains/aptos/contracts/sources/price.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module pyth::price {
/// Both the price and confidence are stored in a fixed-point numeric representation,
/// `x * (10^expo)`, where `expo` is the exponent.
//
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for how
/// to how this price safely.
struct Price has copy, drop, store {
price: I64,
Expand Down
16 changes: 8 additions & 8 deletions target_chains/aptos/contracts/sources/pyth.move
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚩 Incomplete URL migration — 18 files still contain old documentation URLs

This PR updates old Pyth documentation URLs in 9 source files, but a repo-wide search reveals 18 additional files still containing the old docs.pyth.network/documentation/pythnet-price-feeds URL pattern. Notable examples include:

  • target_chains/aptos/contracts/Move.toml:21 (same package as modified files)
  • target_chains/ethereum/sdk/solidity/README.md:6,79 (same directory as modified IPyth.sol and PythStructs.sol)
  • target_chains/fuel/contracts/pyth-interface/src/data_structures/price.sw:18 (source code, not just docs)
  • apps/price_pusher/src/sui/command.ts:42,49 (runtime string literals)
  • Various README.md files across near/, sui/, aptos/, fuel/, starknet/, hermes/, price_service/

The apps/price_pusher/src/sui/command.ts case is particularly notable since the old URLs appear in runtime string literals (user-facing CLI output), not just comments. The author may want a follow-up PR to complete the migration across all remaining files.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module pyth::pyth {
// Update the cached prices
//
// Pyth uses an uses an on-demand update model, where consumers need to update the
/// cached prices before using them. Please read more about this at https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand.
/// cached prices before using them. Please read more about this at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos.

/// Update the cached price feeds with the data in the given VAAs. This is a
/// convenience wrapper around update_price_feeds(), which allows you to update the price feeds
Expand All @@ -143,7 +143,7 @@ module pyth::pyth {
/// to perform this update can be queried with get_update_fee(&vaas). The signer must have sufficient
/// account balance to pay this fee, otherwise the transaction will abort.
///
/// Please read more information about the update fee here: https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand#fees
/// Please read more information about the update fee here: https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos#update-fee
public entry fun update_price_feeds_with_funder(account: &signer, vaas: vector<vector<u8>>) {
let total_updates = 0;
// Update the price feed from each VAA
Expand All @@ -161,12 +161,12 @@ module pyth::pyth {
///
/// The javascript https://github.com/pyth-network/pyth-js/tree/main/pyth-aptos-js package
/// should be used to fetch these VAAs from the Price Service. More information about this
/// process can be found at https://docs.pyth.network/documentation/pythnet-price-feeds.
/// process can be found at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos.
///
/// The given fee must contain a sufficient number of coins to pay the update fee for the given vaas.
/// The update fee amount can be queried by calling get_update_fee(&vaas).
///
/// Please read more information about the update fee here: https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand#fees
/// Please read more information about the update fee here: https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos#update-fee
public fun update_price_feeds(vaas: vector<vector<u8>>, fee: Coin<AptosCoin>) {
let total_updates = 0;
// Update the price feed from each VAA
Expand Down Expand Up @@ -409,11 +409,11 @@ module pyth::pyth {
/// Get the latest available price cached for the given price identifier, if that price is
/// no older than the stale price threshold.
///
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for
/// how to how this price safely.
///
/// Important: Pyth uses an on-demand update model, where consumers need to update the
/// cached prices before using them. Please read more about this at https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand.
/// cached prices before using them. Please read more about this at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos.
/// get_price() is likely to abort unless you call update_price_feeds() to update the cached price
/// beforehand, as the cached prices may be older than the stale price threshold.
///
Expand Down Expand Up @@ -489,7 +489,7 @@ module pyth::pyth {
/// price identifier, if that price is no older than the stale price threshold.
///
/// Important: Pyth uses an on-demand update model, where consumers need to update the
/// cached prices before using them. Please read more about this at https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand.
/// cached prices before using them. Please read more about this at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos.
/// get_ema_price() is likely to abort unless you call update_price_feeds() to update the cached price
/// beforehand, as the cached prices may be older than the stale price threshold.
public fun get_ema_price(price_identifier: PriceIdentifier): Price {
Expand Down Expand Up @@ -520,7 +520,7 @@ module pyth::pyth {

/// Get the number of AptosCoin's required to perform the given price updates.
///
/// Please read more information about the update fee here: https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand#fees
/// Please read more information about the update fee here: https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/aptos#update-fee
public fun get_update_fee(update_data: &vector<vector<u8>>): u64 {
let i = 0;
let total_updates = 0;
Expand Down
4 changes: 2 additions & 2 deletions target_chains/cosmwasm/examples/cw-contract/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn query_fetch_price(deps: Deps, env: Env) -> StdResult<FetchPriceResponse> {
// specific times, or network outages may prevent the price feed from updating.
//
// The example code below throws an error if the price is not available. It is recommended that
// you handle this scenario more carefully. Consult the [consumer best practices](https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices)
// you handle this scenario more carefully. Consult the [consumer best practices](https://docs.pyth.network/price-feeds/core/best-practices)
// for recommendations.
let current_price = price_feed
.get_price_no_older_than(env.block.time.seconds() as i64, 60)
Expand Down Expand Up @@ -122,7 +122,7 @@ mod test {
};

// Dummy contract address for testing.
// For real deployments, see list of contract addresses here https://docs.pyth.network/documentation/pythnet-price-feeds/cosmwasm
// For real deployments, see list of contract addresses here https://docs.pyth.network/price-feeds/core/contract-addresses/cosmwasm
const PYTH_CONTRACT_ADDR: &str = "pyth_contract_addr";
// For real deployments, see list of price feed ids here https://pyth.network/developers/price-feed-ids
const PRICE_ID: &str = "63f341689d98a12ef60a5cff1d7f85c70a9e17bf1575f0e7c0b2512d48b1c8b3";
Expand Down
2 changes: 1 addition & 1 deletion target_chains/ethereum/sdk/solidity/IPyth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./PythStructs.sol";
import "./IPythEvents.sol";

/// @title Consume prices from the Pyth Network (https://pyth.network/).
/// @dev Please refer to the guidance at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how to consume prices safely.
/// @dev Please refer to the guidance at https://docs.pyth.network/price-feeds/core/best-practices for how to consume prices safely.
/// @author Pyth Data Association
interface IPyth is IPythEvents {
/// @notice Returns the price of a price feed without any sanity checks.
Expand Down
2 changes: 1 addition & 1 deletion target_chains/ethereum/sdk/solidity/PythStructs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ contract PythStructs {
// Both the price and confidence are stored in a fixed-point numeric representation,
// `x * (10^expo)`, where `expo` is the exponent.
//
// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how
// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for how
// to how this price safely.
struct Price {
// Price
Expand Down
4 changes: 2 additions & 2 deletions target_chains/near/receiver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,12 @@ impl Pyth {
/// Get the latest available price cached for the given price identifier, if that price is
/// no older than the stale price threshold.
///
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for
/// how to how this price safely.
///
/// IMPORTANT:
/// Pyth uses an on-demand update model, where consumers need to update the cached prices
/// before using them. Please read more about this at https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand.
/// before using them. Please read more about this at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/near.
pub fn get_price(&self, price_identifier: PriceIdentifier) -> Option<Price> {
self.get_price_no_older_than(price_identifier, self.stale_threshold)
}
Expand Down
2 changes: 1 addition & 1 deletion target_chains/near/receiver/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl JsonSchema for PriceIdentifier {
/// Both the price and confidence are stored in a fixed-point numeric representation,
/// `x * (10^expo)`, where `expo` is the exponent.
//
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for how
/// to how this price safely.
#[derive(BorshDeserialize, BorshSerialize, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[borsh(crate = "near_sdk::borsh")]
Expand Down
2 changes: 1 addition & 1 deletion target_chains/sui/contracts/sources/price.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module pyth::price {
/// Both the price and confidence are stored in a fixed-point numeric representation,
/// `x * (10^expo)`, where `expo` is the exponent.
///
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for how
/// to use this price safely.
struct Price has copy, drop, store {
price: I64,
Expand Down
8 changes: 4 additions & 4 deletions target_chains/sui/contracts/sources/pyth.move
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ module pyth::pyth {
/// The given fee must contain a sufficient number of coins to pay the update fee for the given vaas.
/// The update fee amount can be queried by calling get_update_fee(&vaas).
///
/// Please read more information about the update fee here: https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand#fees
/// Please read more information about the update fee here: https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/sui#update-fee
public fun update_single_price_feed(
pyth_state: &PythState,
price_updates: HotPotatoVector<PriceInfo>,
Expand Down Expand Up @@ -351,11 +351,11 @@ module pyth::pyth {
/// Get the latest available price cached for the given price identifier, if that price is
/// no older than the stale price threshold.
///
/// Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for
/// Please refer to the documentation at https://docs.pyth.network/price-feeds/core/best-practices for
/// how to how this price safely.
///
/// Important: Pyth uses an on-demand update model, where consumers need to update the
/// cached prices before using them. Please read more about this at https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand.
/// cached prices before using them. Please read more about this at https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/sui.
/// get_price() is likely to abort unless you call update_price_feeds() to update the cached price
/// beforehand, as the cached prices may be older than the stale price threshold.
///
Expand Down Expand Up @@ -409,7 +409,7 @@ module pyth::pyth {
assert!(age < max_age_secs, E_STALE_PRICE_UPDATE);
}

/// Please read more information about the update fee here: https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand#fees
/// Please read more information about the update fee here: https://docs.pyth.network/price-feeds/core/use-real-time-data/pull-integration/sui#update-fee
public fun get_total_update_fee(pyth_state: &PythState, n: u64): u64 {
state::get_base_update_fee(pyth_state) * n
}
Expand Down