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

**URL:** <https://forum.pyth.network/t/passed-op-pip-41-upgrade-pyth-oracle-on-ton-mainnet/1846>\
**Category:** Proposals\
**Tags:** operational-pip\
**Created:** [November 26, 2024, 6:00pm UTC](https://forum.pyth.network/t/passed-op-pip-41-upgrade-pyth-oracle-on-ton-mainnet/1846 "2024-11-26T18:00:49Z")\
**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 26, 2024, 6:00pm UTC](https://forum.pyth.network/t/passed-op-pip-41-upgrade-pyth-oracle-on-ton-mainnet/1846/1 "2024-11-26T18:00:49Z")

</div>

**Abstract**  
This proposal seeks to enhance the Pyth oracle program on TON mainnet 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: [5hFHqv8D1cPfJMr9ERYZ3EokoPyYvZydVYfmeo8zn9hM](https://proposals.pyth.network/?tab=proposals&cluster=mainnet-beta&proposal=5hFHqv8D1cPfJMr9ERYZ3EokoPyYvZydVYfmeo8zn9hM)

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

**Follow-Up Context** :

This proposal builds on a [prior successful upgrade of the Pyth oracle on the TON testnet](https://forum.pyth.network/tag/operational-pip). The earlier proposal was implemented, tested, and validated, confirming the functionality.

---

<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:22am UTC](https://forum.pyth.network/t/passed-op-pip-41-upgrade-pyth-oracle-on-ton-mainnet/1846/2 "2024-12-03T11:22:56Z")

</div>


