Skip to content

docs: refresh stale docs.pyth.network URLs in on-chain contract comments#3719

Open
0xghost42 wants to merge 2 commits into
pyth-network:mainfrom
0xghost42:docs/3228-onchain-natspec-urls
Open

docs: refresh stale docs.pyth.network URLs in on-chain contract comments#3719
0xghost42 wants to merge 2 commits into
pyth-network:mainfrom
0xghost42:docs/3228-onchain-natspec-urls

Conversation

@0xghost42
Copy link
Copy Markdown

@0xghost42 0xghost42 commented May 19, 2026

Summary

Follow-up to #3718 (TS/JS SDK README refresh) covering the same stale docs.pyth.network/documentation/pythnet-price-feeds/* paths embedded in on-chain NatSpec / Move / Rust doc-comments. The legacy URL space has been retired in favour of price-feeds/core/* under the developer-hub content tree, so these doc-comments currently link to 404s for anyone reading the source on chain or via a block explorer.

Refs #3228.

URL mapping applied

Old path New path
documentation/pythnet-price-feeds/best-practices price-feeds/core/best-practices
documentation/pythnet-price-feeds/on-demand price-feeds/core/use-real-time-data/pull-integration/<chain>
documentation/pythnet-price-feeds/on-demand#fees price-feeds/core/use-real-time-data/pull-integration/<chain>#update-fee
documentation/pythnet-price-feeds/cosmwasm price-feeds/core/contract-addresses/cosmwasm
documentation/pythnet-price-feeds (bare root) price-feeds/core/use-real-time-data/pull-integration/aptos (only call-site was in aptos/pyth.move pointing at the integration walkthrough)

Notes:

  • For chain-specific on-demand mentions I picked the chain-specific pull-integration/<chain> page over the parent use-real-time-data index — each chain page surfaces the update flow + fee discussion the original link was trying to point at.
  • The cw-contract example specifically wanted the reader to find a contract address, so contract-addresses/cosmwasm is the right landing page rather than pull-integration/cosmwasm.

Files touched

Pure doc-comment / NatSpec change — no Move bytecode, no Solidity ABI, no Rust runtime behavior is affected:

  • target_chains/ethereum/sdk/solidity/IPyth.sol (NatSpec)
  • target_chains/ethereum/sdk/solidity/PythStructs.sol (NatSpec)
  • target_chains/sui/contracts/sources/price.move
  • target_chains/sui/contracts/sources/pyth.move
  • target_chains/aptos/contracts/sources/price.move
  • target_chains/aptos/contracts/sources/pyth.move
  • target_chains/cosmwasm/examples/cw-contract/src/contract.rs
  • target_chains/near/receiver/src/lib.rs
  • target_chains/near/receiver/src/state.rs

Splitting from #3718 to keep the on-chain churn reviewable against its own consumers (Solidity SDK publishers, Move package upgrade authorities, NEAR contract maintainers).

Test plan

  • grep -rn "documentation/pythnet-price-feeds" --include="*.move" --include="*.sol" --include="*.rs" returns no remaining matches
  • Every new URL verified to exist as an .mdx page under apps/developer-hub/content/docs/price-feeds/core/
  • No code changes — only /// doc-comments and // line comments
  • Maintainer confirmation that the chain-specific pull-integration/<chain> page is preferred over the parent use-real-time-data for on-demand references in on-chain doc-comments

Open in Devin Review

Follow-up to the JS/TS README refresh (pyth-network#3718) covering the same stale
`docs.pyth.network/documentation/pythnet-price-feeds/*` paths embedded in
on-chain NatSpec / Move / Rust doc-comments. The legacy URL space has
been retired in favour of `price-feeds/core/*` under the developer-hub
content tree.

URL mapping applied:

  - documentation/pythnet-price-feeds/best-practices ->
    price-feeds/core/best-practices

  - documentation/pythnet-price-feeds/on-demand ->
    price-feeds/core/use-real-time-data/pull-integration/<chain>
    (chain-specific page where the integration flow + fee guidance lives
    — i.e. /aptos, /sui, /near; the parent `use-real-time-data` index
    is more of a method-selection landing page)

  - documentation/pythnet-price-feeds/on-demand#fees ->
    price-feeds/core/use-real-time-data/pull-integration/<chain>#update-fee
    (the chain-specific pages each surface the update-fee section)

  - documentation/pythnet-price-feeds/cosmwasm ->
    price-feeds/core/contract-addresses/cosmwasm
    (the cw-contract example was specifically pointing readers at the
    contract address list, so contract-addresses/<chain> is the right
    landing page rather than pull-integration/<chain>)

  - documentation/pythnet-price-feeds (root) ->
    price-feeds/core/use-real-time-data/pull-integration/aptos
    (the one bare reference was in aptos pyth.move pointing at the
    integration walkthrough)

This is a pure doc-comment / NatSpec change — no Move bytecode, no
Solidity ABI, no Rust runtime behavior is touched. Splitting from pyth-network#3718
to keep the on-chain churn reviewable against its own consumers.

Refs pyth-network#3228.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@0xghost42 is attempting to deploy a commit to the Pyth Network Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

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.

Devin re-review on pyth-network#3719 flagged two more files I missed in the
initial pass:

  - target_chains/aptos/contracts/Move.toml:21 — package manifest
    comment pointed at the old aptos addresses page; retarget to
    `price-feeds/core/contract-addresses/aptos`
  - target_chains/fuel/contracts/pyth-interface/src/data_structures/price.sw:18
    — Sway doc-comment on PriceStruct (Fuel contract); retarget the
    best-practices reference to `price-feeds/core/best-practices`

Devin's other flagged paths are either already covered by an open
sibling PR (pyth-network#3677 for the price_pusher CLI help strings, pyth-network#3718 for the
remaining JS/TS READMEs) or are intentional (apps/developer-hub/
next.config.js holds the redirect rules that map the legacy URLs to
the new layout — those MUST keep the old shape on the LHS).

No code/behaviour change; pure comment retarget. Refs pyth-network#3228.
@0xghost42
Copy link
Copy Markdown
Author

Thanks for the wider scan — pushed 8740593 extending this PR with the two genuinely-missed files:

  • target_chains/aptos/contracts/Move.toml:21 — package manifest comment, retargeted to price-feeds/core/contract-addresses/aptos
  • target_chains/fuel/contracts/pyth-interface/src/data_structures/price.sw:18 — Sway doc-comment on Price, retargeted to price-feeds/core/best-practices

The other paths Devin flagged are either covered elsewhere or intentional:

  • target_chains/ethereum/sdk/solidity/README.md:6,79 and the other JS/TS README files (fuel/sdk/js, sui/sdk/js, sui/sdk/js-iota, aptos/sdk/js, starknet/sdk/js, hermes/{client,server}, price_service/client/js, apps/price_pusher, top-level sui/near) — all retargeted in sibling PR docs: refresh stale docs.pyth.network URLs across TS/JS SDK READMEs #3718 (JS/TS-only diff).
  • apps/price_pusher/src/sui/command.ts:42,49 (now lines 61/68 on main) — runtime CLI help strings, retargeted in docs(sui): point Sui integration links at the new docs URL #3677 (commit 890dd8c).
  • apps/developer-hub/next.config.js — those are the LHS of the Next.js redirect rules mapping the legacy URL space to the new layout. They must keep the old shape to keep the redirects working.
  • target_chains/cosmwasm/{contracts/pyth/schema/pyth-cosmwasm.json,examples/cw-contract/schema/example-cw-contract.json} — generated schema files; they refresh from source on the next schema build rather than being hand-edited.

After #3677 + #3718 + #3719 all land, the only remaining documentation/pythnet-price-feeds hits are the redirect-table entries in next.config.js and the generated CosmWasm JSON schemas — both intentional / regenerated.

0xghost42 added a commit to 0xghost42/pyth-crosschain that referenced this pull request May 26, 2026
… CLI strings

Round-2 follow-up on Devin's pyth-network#3718 review noting 18 files still carried
the stale docs.pyth.network/documentation/pythnet-price-feeds/* paths
after the first JS/TS SDK README sweep.

This PR adds:

- target_chains/solana/sdk/js/pyth_solana_receiver/README.md — the two
  Hermes links and the api-instances-and-providers link were still in
  the legacy /price-feeds/pythnet-price-feeds/ space. Moved to
  /price-feeds/core/api-instances-and-providers/hermes (+ #public-endpoints
  anchor for the public-endpoint link) to match the rest of pyth-network#3718.

- price_service/sdk/js/README.md — single bare /documentation/ root link
  retargeted at /price-feeds (the legacy /documentation tree has been
  retired in favour of the product-scoped /price-feeds + /entropy roots).

- target_chains/ethereum/entropy_sdk/solidity/README.md — entropy
  contract-deployments link moved off /documentation/entropy/evm and onto
  /entropy/contract-addresses, matching the URL shape used by
  apps/entropy-explorer/src/errors.ts and the live entropy doc tree.

- apps/price_pusher/src/sui/command.ts — the two CLI --pyth-state-id /
  --wormhole-state-id help strings hardcoded /documentation/pythnet-price-feeds/sui
  as runtime user-facing output. Retargeted at
  /price-feeds/core/contract-addresses/sui (the page that actually lists
  the Sui state IDs the operator needs). This is the only non-doc surface
  Devin flagged as runtime-impacting and is in scope for the JS/TS sweep.

The remaining items Devin enumerated (aptos Move.toml, fuel
pyth-interface .sw, on-chain Move/Solidity/Rust NatSpec comments) are
covered by the parallel pyth-network#3719 on-chain branch and intentionally not
duplicated here.

Refs pyth-network#3228.
@0xghost42
Copy link
Copy Markdown
Author

Re: Devin's "18 additional files still containing the old URL pattern" finding — most of those files are covered by the parallel #3718 (TS/JS SDK READMEs); the on-chain / non-README items Devin specifically called out are addressed in this PR by 8740593b8 docs: extend on-chain URL refresh to Move.toml + Sway interface:

  • target_chains/aptos/contracts/Move.toml:21 — refreshed
  • target_chains/fuel/contracts/pyth-interface/src/data_structures/price.sw:18 — refreshed

The Sui-side runtime strings Devin flagged at apps/price_pusher/src/sui/command.ts:42,49 plus three READMEs that were missed by the original #3718 sweep (pyth_solana_receiver, entropy_sdk/solidity, price_service/sdk/js) landed in #3718 as 707739d1a so the JS/TS sweep covers all of them. Splitting the JS/TS surface from the on-chain / Move / Rust surface across #3718 vs #3719 keeps each diff reviewable against its own consumers.

After both #3718 and #3719 merge, a repo-wide docs.pyth.network/documentation/pythnet-price-feeds grep should be empty.

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.

1 participant