wormhole-foundation / wormhole-scaffolding

Starter apps with Wormhole integration
Other
47 stars 30 forks source link

Compile Error #93

Closed magj2006 closed 3 months ago

magj2006 commented 3 months ago

there are some errors when compile using wormhole-anchor-sdk = { version = "0.29.0-alpha.1", default-features = false, features = [ "token-bridge", ] },

the details of Cargo.toml is below:

[dependencies] anchor-lang = "=0.29.0" anchor-spl = "=0.29.0" wormhole-anchor-sdk = { version = "0.29.0-alpha.1", default-features = false, features = [ "token-bridge", ] } solana-program = "=1.17.34"

[dev-dependencies] num_enum = "=0.7.0"

Not yet write any import wormhole into rust files, only add wormhole-anchor-sdk into current crate dependencies. If you run anchor build, you'll get error: Compiling wormhole-anchor-sdk v0.29.0-alpha.1 error[E0432]: unresolved import crate::wormhole::program::ID --> src/wormhole/accounts.rs:3:47 3 use crate::wormhole::{message::PostedVaaMeta, program::ID}; ^^^^^^^^^--
help: a similar name exists in the module: Id
no ID in wormhole::program
error[E0432]: unresolved import crate::token_bridge::program::ID --> src/token_bridge/accounts.rs:4:54 4 use crate::token_bridge::{message::TransferWithMeta, program::ID}; ^^^^^^^^^--
help: a similar name exists in the module: Id
no ID in token_bridge::program
error[E0425]: cannot find value ID in this scope --> src/wormhole/program.rs:18:9 18 ID ^^ not found in this scope
help: consider importing one of these items 1 use anchor_lang::system_program::ID;
1 use anchor_spl::associated_token::ID;
1 use anchor_spl::token::ID;
1 use anchor_spl::token_interface::ID;
error[E0425]: cannot find value ID in this scope --> src/token_bridge/program.rs:18:9 18 ID ^^ not found in this scope
help: consider importing one of these items 1 use anchor_lang::system_program::ID;
1 use anchor_spl::associated_token::ID;
1 use anchor_spl::token::ID;
1 use anchor_spl::token_interface::ID;

Some errors have detailed explanations: E0425, E0432. For more information about an error, try rustc --explain E0425. error: could not compile wormhole-anchor-sdk due to 4 previous errors warning: build failed, waiting for other jobs to finish...