Questions tagged [anchor-program]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
29 views

how to deploy a program using clients like @solana/web3.js, @project-serum/anchor

I dont want to deploy a program using cli or solana playground ide I want to deploy a program using clients packages of solana/web3.js, @project-serum/anchor, or any other packages can anyone please ...
1 vote
1 answer
28 views

Can I change the program to use different programID?

I need to deploy my current program with different programId. It's already deployed to the devnet. But I need to deploy it again to devnet using different programId. Is that possible?. Thanks.
7 votes
2 answers
632 views

how to convert pubkey to accountinfo?

I'm writing a program where I'm fetching the program_address (as below) and now I want to convert the publicKey to AccountInfo and use it to do token transfer CPI. let (asset, bump_seed) = Pubkey::...
1 vote
1 answer
50 views

Defining composite fields using Anchor Accounts structs from other crates

Consider an anchor workspace set up like so: programs/a/lib.rs programs/b/lib.rs programs/c/lib.rs common/lib.rs With accounts struct in the common crate: // common/lib.rs #[derive(Accounts)] pub ...
  • 1,497