SUI move.toml build failed testnet / mainnet get sui price feed

I got error when build move file. I guess it error by version of Wormhole

I had same error, try to use local dependencies

2 Likes

I am facing the same issue, did u find any solution for this ?

Hi, can u guide me on how to resolve this? and what do u mean by local dependencies?

Hey. What is the exact process you are doing that results in this error? I can go into the target_chains/sui/contracts folder and run Sui move build and things build just fine, for example. And as sabrebar mentioned, if you either pull the wormhole and pyth crosschain or add them as submodules, it also seems to work fine. We need to figure out what step in the process is leading to the issue.

1 Like

I just copied the move.toml file from the docs and tried building but it gave me err

Gotcha, thanks for letting me know! The issue generally seems to be that the branches for the wormhole dependency are no longer present. I’m not sure when this happened. I’ll reach out to them to see what’s wrong. In the mean time, I will update the Pyth branches and docs. I’ll let you know ASAP when the changes are in. And you can try again with those. Sorry for the delay as we investigated this issue! If the changes don’t fix the issue, we can proceed from there.

Funny enough, changing the docs might take some time. In the meantime, can you try this TOML?

[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"
 
# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version.
 
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
 

Change mainnet to testnet if appropriate.

I tried using the testnet and still faced the same err

move.toml file -

[package]
name = “prediction_market”
version = “0.0.1”
edition = “2024.beta”

[dependencies.Pyth]
git = “GitHub - pyth-network/pyth-crosschain: Crosschain Pyth programs and utilities”
subdir = “target_chains/sui/contracts”
rev = “sui-contract-testnet”

[dependencies.Wormhole]
git = “GitHub - wormhole-foundation/wormhole: A reference implementation for the Wormhole blockchain interoperability protocol.”
subdir = “sui/wormhole”
rev = “sui/testnet”

[dependencies.Sui]
git = “GitHub - MystenLabs/sui: Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language”
subdir = “crates/sui-framework/packages/sui-framework”
rev = “041c5f2bae2fe52079e44b70514333532d69f4e6”

[addresses]
prediction_market = “0x0” # Replace with actual package address after publish
pyth = “0x04e20ddf36af412a4096f9014f4a565af9e812db9a05cc40254846cf6ed0ad91”
wormhole = “0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a”
sui = “0x2”

[dev-addresses]
pyth = “0x100”
wormhole = “0x200”

Your addresses are the mainnet addresses. Remove the pyth and wormhole addresses. The dependency branch should correctly set them based on mainnet/testnet. Try that and let me know if it works.

still does not work

[package]
name = “prediction_market”
version = “0.0.1”
edition = “2024.beta”

[dependencies.Pyth]
git = “GitHub - pyth-network/pyth-crosschain: Crosschain Pyth programs and utilities”
subdir = “target_chains/sui/contracts”
rev = “sui-contract-testnet”

[dependencies.Wormhole]
git = “GitHub - wormhole-foundation/wormhole: A reference implementation for the Wormhole blockchain interoperability protocol.”
subdir = “sui/wormhole”
rev = “sui/testnet”

[dependencies.Sui]
git = “GitHub - MystenLabs/sui: Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language”
subdir = “crates/sui-framework/packages/sui-framework”
rev = “041c5f2bae2fe52079e44b70514333532d69f4e6”

[addresses]
prediction_market = “0x0”
sui = “0x2”

[dev-addresses]
pyth = “0x100”
wormhole = “0x200”

I created a new sui project called my_first_package and put the following as my Move.toml, ran sui move build, and it did build. Can you try the same? If it doesn’t work, I wonder if perhaps the Sui version you have installed is different. Or if cached build artifacts are causing issues. Can you delete the ~/.move folder? It contains cached build artifacts.

[package]
name = "my_first_package"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = ""					 # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."]			# e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"]

[dependencies.Pyth]
git = "https://github.com/pyth-network/pyth-crosschain.git"
subdir = "target_chains/sui/contracts"
rev = "sui-contract-testnet"
 
[dependencies.Wormhole]
git = "https://github.com/wormhole-foundation/wormhole.git"
subdir = "sui/wormhole"
rev = "sui/testnet"
 
# Pyth is locked into this specific `rev` because the package depends on Wormhole and is pinned to this version.
 
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"

[addresses]
my_first_package = "0x0"
sui = "0x2"

[dev-addresses]
pyth = "0x100"
wormhole = "0x200"

Nothing seems to work


How to resolve your Pyth integration problem step-by-step


Step 1: Clone necessary repos locally

git clone https://github.com/pyth-network/pyth-crosschain
git clone https://github.com/wormhole-foundation/wormhole

Clone the repositories into folders relative to your project, so you can refer to them locally.


Step 2: Use local dependencies in your project’s Move.toml

Edit your project’s Move.toml and add local paths for these dependencies, adjusting paths according to where you cloned:

[dependencies.Pyth]
local = "../../../pyth-crosschain/target_chains/sui/contracts"

[dependencies.Wormhole]
local = "../../../wormhole/sui/wormhole"

[dependencies.usdc]
local = "../../../stablecoin-sui/packages/usdc"

[addresses]
wormhole = "0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94"
pyth = "0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837"

Step 3: Update pyth-crosschain Move package config

In pyth-crosschain/target_chains/sui/contracts/Move.toml, ensure dependencies and addresses are correctly set:

[package]
name = "Pyth"
version = "0.0.2"
published-at = "0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837"

[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"

[dependencies.Wormhole]
# Use local for development:
local = "../../../../wormhole/sui/wormhole"

[addresses]
pyth = "0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837"
wormhole = "0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94"

Step 4: Publish the contracts

Use the Sui CLI to publish your contracts with dependency verification skipped (helpful for local development):

sui client publish --skip-dependency-verification --silence-warnings

Additional tips:

  • Adjust all relative paths carefully based on your actual folder structure.
  • Ensure named addresses in your project and dependencies align exactly.
  • If you update addresses or paths, always rebuild and republish.

1 Like