pyth-network / pyth-network/pyth-crosschain

Sui Move: dependency mismatch error when publishing

Open
#2,828 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
247
Forks
348
Avg merge
2d 1h
Merged PRs (30d)
27

Description

I'm trying to integrate Pyth in my Move contract on Sui, but I'm hitting a dependency mismatch error when publishing. Here's my Move.toml:

[package]
name = "test"
edition = "2024.beta"
version = "0.0.1"

[dependencies.Pyth]
git = "https://github.com/pyth-network/pyth-crosschain.git"
subdir = "target_chains/sui/contracts"
rev = "sui-contract-mainnet"

[dependencies.Wormhole]
git = "https://github.com/wormhole-foundation/wormhole.git"
subdir = "sui/wormhole"
rev = "sui/mainnet"

[dependencies.usdc]
local = "../usdc"

[addresses]
test = "0x0"

When I try to publish (even with --skip-dependency-verification), I get the following error:

Total number of linter warnings suppressed: 1 (unique lints: 1)
Failed to publish the Move module(s), reason: [warning] Multiple source verification errors found:

- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::setup
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::governance
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::set_update_fee
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::pyth
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::hot_potato_vector
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::contract_upgrade
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::accumulator
- Local dependency did not match its on-chain version at 8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::Pyth::state
- Local dependency did not match its on-chain version at 5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a::Wormhole::package_utils

This may indicate that the on-chain version(s) of your package's dependencies may behave differently than the source version(s) your package was built against.

Fix this by rebuilding your packages with source versions matching on-chain versions of dependencies, or ignore this warning by re-running with the --skip-dependency-verification flag.
...

It seems like the local Git dependencies don’t match the deployed versions on Sui mainnet.

How can I correctly use Pyth and Wormhole as dependencies without this conflict?
Should I remove the git sources and just declare the on-chain addresses?
Any official guidance for using Pyth on Sui mainnet?

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Move.toml dependency declarations and reproduce the publish command using the Pyth and Wormhole revisions shown in the report. Compare the resolved local package sources with the on-chain versions named in the verification errors. Done means the supported mainnet dependency configuration or required guidance is identified and the package can be published without the reported mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.