wormhole-foundation / wormhole-scaffolding

Starter apps with Wormhole integration
Other
49 stars 33 forks source link

[BUG] wormhole-anchor-sdk can't compile #49

Closed futuretech6 closed 1 year ago

futuretech6 commented 1 year ago

during compiling wormhole-anchor-sdk, symbol ID can't be found

error[E0432]: unresolved import `crate::wormhole::program::ID`
 --> modules/wormhole-anchor-sdk/src/wormhole/accounts.rs:4:47
  |
4 | 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`
 --> modules/wormhole-anchor-sdk/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
  --> modules/wormhole-anchor-sdk/src/wormhole/program.rs:17:9
   |
17 |         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
  --> modules/wormhole-anchor-sdk/src/token_bridge/program.rs:17:9
   |
17 |         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
jdubpark commented 1 year ago

For anyone wondering, you need to run cargo test with one of these supported features: mainnet, solana-devnet, tilt-devnet. For example, for devnet:

cargo clippy --features devnet -- --allow clippy::result_large_err
cargo test --features solana-devnet