Questions tagged [anchor-program]
The anchor-program tag has no usage guidance.
4 questions
5
votes
1
answer
233
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 ...
5
votes
1
answer
1k
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.
9
votes
2
answers
2k
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
84
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 ...