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

**URL:** <https://forum.pyth.network/t/passed-op-pip-39-upgrade-pyth-oracle-on-ton-testnet/1838>\
**Category:** Proposals\
**Tags:** operational-pip\
**Created:** [November 21, 2024, 1:36pm UTC](https://forum.pyth.network/t/passed-op-pip-39-upgrade-pyth-oracle-on-ton-testnet/1838 "2024-11-21T13:36:45Z")\
**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:** [November 21, 2024, 1:36pm UTC](https://forum.pyth.network/t/passed-op-pip-39-upgrade-pyth-oracle-on-ton-testnet/1838/1 "2024-11-21T13:36:45Z")

</div>

**Abstract**  
This proposal seeks to enhance the Pyth oracle program on TON testnet by introducing a target address and a custom payload parameter to the `parse_price_feed_updates` and `parse_unique_price_feed_updates` functions. These additions are necessary to accommodate TON’s asynchronous architecture, enabling the identification and tracking of specific requests.

**Rationale**  
The recommended flow for protocols is as follows: the user interacts with the Pyth contract, which then sends a message to the target address (in this case, the protocol). To enable the protocol to identify the original caller, the message includes both the sender\_address and a custom\_payload. This ensures the protocol has the necessary information to process the request accurately.

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

- add target address and custom payload support - [PR 2136](https://github.com/pyth-network/pyth-crosschain/pull/2136)

**Implementation Plan**  
Proposal id: [9dpqFGLkUm3dSZU2cDzKxPVVHQQusmrqva9d3Foo3qH](https://proposals.pyth.network/?tab=proposals&cluster=mainnet-beta&proposal=9dpqFGLkUm3dSZU2cDzKxPVVHQQusmrqva9d3Foo3qH)  
Verify the implementation by comparing the hash:

- checkout the [pyth-crosschain repo](https://github.com/pyth-network/pyth-crosschain)
- install the package dependencies by running `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:** ![Pyth-DAO](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@Pyth-DAO](https://forum.pyth.network/u/Pyth-DAO)\
**Post date:** [December 3, 2024, 11:23am UTC](https://forum.pyth.network/t/passed-op-pip-39-upgrade-pyth-oracle-on-ton-testnet/1838/2 "2024-12-03T11:23:05Z")

</div>


