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

**URL:** <https://forum.pyth.network/t/passed-op-pip-62-upgrade-pyth-oracle-on-ton-mainnet/2101>\
**Category:** Proposals\
**Tags:** operational-pip\
**Created:** [April 15, 2025, 8:21am UTC](https://forum.pyth.network/t/passed-op-pip-62-upgrade-pyth-oracle-on-ton-mainnet/2101 "2025-04-15T08:21:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KemarTiti](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.pyth.network/kemartiti/32/5_2.png) [@KemarTiti](https://forum.pyth.network/u/KemarTiti)\
**Post date:** [April 15, 2025, 8:21am UTC](https://forum.pyth.network/t/passed-op-pip-62-upgrade-pyth-oracle-on-ton-mainnet/2101/1 "2025-04-15T08:21:55Z")

</div>

**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](https://github.com/pyth-network/pyth-crosschain/pull/2558)

**Implementation Plan**  
Proposal id: [GvHbjZ5wn4BRDXFd3bpz1x5pc6ndqfcCtvQWRVSCX3xt](https://proposals.pyth.network/?tab=proposals&cluster=mainnet-beta&proposal=GvHbjZ5wn4BRDXFd3bpz1x5pc6ndqfcCtvQWRVSCX3xt)

Verify the implementation by comparing the hash:

- checkout the [pyth-crosschain repo](https://github.com/pyth-network/pyth-crosschain)
- `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

---

<div class="post-metadata">

**Author:** ![Pyth-DAO](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@Pyth-DAO](https://forum.pyth.network/u/Pyth-DAO)\
**Post date:** [April 17, 2025, 8:35am UTC](https://forum.pyth.network/t/passed-op-pip-62-upgrade-pyth-oracle-on-ton-mainnet/2101/2 "2025-04-17T08:35:15Z")

</div>


