Pythscan
PROPOSALProposalsNovember 26, 2024

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

November 26, 2024

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

Implementation Plan
Proposal id: 5hFHqv8D1cPfJMr9ERYZ3EokoPyYvZydVYfmeo8zn9hM

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

Follow-Up Context:

This proposal builds on a prior successful upgrade of the Pyth oracle on the TON testnet. The earlier proposal was implemented, tested, and validated, confirming the functionality.

Showing the original post. Read the full thread on forum.pyth.network

Replies
1
Views
79
Likes
1
Last activity
Dec 2024

Source: https://forum.pyth.network/t/passed-op-pip-41-upgrade-pyth-oracle-on-ton-mainnet/1846 · external id 1846