Abstract
This proposal upgrades the Pyth Lazer contract on Sui to V2 API, adding support for the fixed_rate@1000ms channel and improving future upgradeability by replacing the Sui enum-based Channel type with a wrapped integer.
Rationale
The current Sui Lazer contract uses a Sui enum for the Channel type. Extending enums in Sui requires releasing a new API version to pass on-chain upgrade checks.
This upgrade:
1. Adds support for fixed_rate@1000ms channel ID
2. Replaces the enum-based Channel type with a wrapped integer (following the MarketSession convention)
3. Prevents the same upgrade friction in future channel additions
The existing V1 API will be deprecated but remains functional — integrators can upgrade at their own pace.
Description
This proposal emits a single Wormhole message targeted to Sui chain with:
- Update version: 2
- Digest: Build of the current contract version
Implementation
- Contract implementation: pyth-crosschain/lazer/contracts/sui
- Proposal ID:
J1mvxvWDg6C41ZSkbLtoZ4TwhPrWuJytH2esAFBGCsa2
Verification
1. Install pnpm, jq, and suiup
2. Install latest testnet Sui tools:
suiup install sui
3. Clone and build contract_manager:
git clone https://github.com/pyth-network/pyth-crosschain.git
cd pyth-crosschain/contract_manager
pnpm install && pnpm turbo build
4. Run the verification script (should succeed without errors):
pnpm tsx scripts/check_proposal.ts --cluster mainnet-beta --proposal J1mvxvWDg6C41ZSkbLtoZ4TwhPrWuJytH2esAFBGCsa2