# \[PASSED\] OP-PIP-60: Upgrade Pyth Oracle on TON Testnet

**URL:** <https://forum.pyth.network/t/passed-op-pip-60-upgrade-pyth-oracle-on-ton-testnet/2093>\
**Category:** Proposals\
**Tags:** operational-pip\
**Created:** [April 11, 2025, 6:38am UTC](https://forum.pyth.network/t/passed-op-pip-60-upgrade-pyth-oracle-on-ton-testnet/2093 "2025-04-11T06:38:14Z")\
**Posts on this page:** 3\
**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 11, 2025, 6:38am UTC](https://forum.pyth.network/t/passed-op-pip-60-upgrade-pyth-oracle-on-ton-testnet/2093/1 "2025-04-11T06:38:14Z")

</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: [Pyth Network](https://proposals.pyth.network/?tab=proposals&cluster=mainnet-beta&proposal=G3e1i6e9NF6BN7CdGxxFY4ZmZZQTkf9dsJT6JjBvcLJF)

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

After this upgrade has been implemented and tested, a subsequent OP-PIP for the TON Mainnet will be introduced.

---

<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 14, 2025, 11:01am UTC](https://forum.pyth.network/t/passed-op-pip-60-upgrade-pyth-oracle-on-ton-testnet/2093/2 "2025-04-14T11:01:05Z")

</div>

With the 3rd Pythian Council approval passing during this proposal, the initially linked proposal to upgrade the Pyth Oracle on TON testnet has expired and therefore re-submitted

Old Proposal: [Pyth Network](https://proposals.pyth.network/?tab=proposals&proposal=6ShSoqytWvvs3Stn2LatdpgnbuGPVNNBPAUUMtDAkNFA)

New Proposal: [Pyth Network](https://proposals.pyth.network/?tab=proposals&cluster=mainnet-beta&proposal=G3e1i6e9NF6BN7CdGxxFY4ZmZZQTkf9dsJT6JjBvcLJF)

---

<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-60-upgrade-pyth-oracle-on-ton-testnet/2093/3 "2025-04-17T08:35:03Z")

</div>


