Pythscan
PROPOSALProposalsSeptember 19, 2024

[PASSED] OP-PIP28: Upgrade Pyth Staking Contract IDL

September 19, 2024

Abstract

This proposals aims to upgrade the on-chain IDL of the Pyth Staking Program.

Rationale

Having an up-to-date on-chain IDL is useful so block explorers can parse transactions that interact with the program properly, resulting in displaying transcations in a human-readable way. This helps users understand better what their transaction did, and can be useful to debug any transaction errors.
It also allows explorers to properly deserialize program owned accounts, allowing anyone to understand what’s in the accounts, which increases transparency.

Description

The Pyth Staking Contract pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ was upgraded earlier this week as part of CO-PIP5. The on-chain Anchor IDL is now out of date. The Pythian Councils holds the IDL authority for this IDL.

Implementation Plan

Proposal id: Pyth Network

  • Make sure you have anchor installed (cargo install --git https://github.com/coral-xyz/anchor avm --locked --force )
  • Clone the governance repo ( git clone https://github.com/pyth-network/governance.git )
  • Go to the staking directory (cd governance/staking)
  • Grab the IDL from the proposal (anchor idl fetch ${BUFFER} --provider.cluster m > idl.json) where ${BUFFER} is the buffer pubkey from the proposal page.
  • Check that the proposal’s IDL matches the repo’s IDL. diff idl.json target/idl/staking.json

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

Replies
1
Views
112
Likes
5
Last activity
Oct 2024

Source: https://forum.pyth.network/t/passed-op-pip28-upgrade-pyth-staking-contract-idl/1749 · external id 1749