[PASSED] OP-PIP-62: Upgrade Pyth Oracle on TON Mainnet

Abstract
This PR enhances the Pyth oracle contract on TON by implementing cell chain traversal for price feed ID parsing. The change allows handling more than 3 price feed IDs in a single update by properly managing TON’s cell bit limitations.

Rationale
TON cells have a fundamental limitation of 1023 bits per cell. Given that each price feed ID is 256 bits:

  • A single cell can only store 3 complete price feed IDs (768 bits)
  • Previous implementation would fail when attempting to parse more than 3 IDs
  • Applications need to handle more than 3 price feeds in a single update

Description
This proposal upgrades the Pyth oracle program on TON with the following major change:

  • feat(target_chains/ton): add helper function to parse price IDs beyond a single cell and enhance update handling - PR 2558

Implementation Plan
Proposal id: GvHbjZ5wn4BRDXFd3bpz1x5pc6ndqfcCtvQWRVSCX3xt

Verify the implementation by comparing the hash:

  • checkout the pyth-crosschain repo
  • pnpm install --frozen-lockfile
  • pnpm turbo build --filter "@pythnetwork/pyth-ton"
  • check that the hash in the output matches with the package hash in the proposal
2 Likes