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

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

Implementation Plan
Proposal id: 9dpqFGLkUm3dSZU2cDzKxPVVHQQusmrqva9d3Foo3qH
Verify the implementation by comparing the hash:

  • checkout the pyth-crosschain repo
  • 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.

3 Likes