Questions tagged [initialize]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

Specific events from Token Program via Web Socket

I'm attempting to use the programSubscribe method to listen for specific types of Token Program events, namely "initializeMint". Essentially, I want to know about the creation of token ...
MolonLabe's user avatar
2 votes
2 answers
112 views

createInitializeMintInstruction() ----> error: invalid account data for instruction using

I am trying to use the "createInitializeMintInstruction()" using JS to create a token. The problem is when executing, it throws an error. Concretely this one: Transaction simulation failed: ...
lauteriust3's user avatar
0 votes
1 answer
44 views

Why does initializing program throw this error ? ('Non-base' + BASE + ' character')

Im trying to initialize a deployed program and have been running into this error. Here is the command that the cli is executing..
bubu59's user avatar
  • 21
4 votes
1 answer
62 views

I'm trying to initialize my accounts and the tx goes through but it says the account doesn't exist when i retrieve info from it

Essentially all the lists are the same, but when I call the bluelist account I get "Error: Account does not exist HkBnFqgNQfWisvKkDwSbUzE2EJ3jriQHY64H4t3EjjeM" this error happens on every ...
heheman's user avatar
  • 53
2 votes
2 answers
301 views

TryingToInitPayerAsProgramAccount. Error Number: 4101. You cannot/should not initialize the payer account as a program account

I have a simple program: #[program] pub mod my_cool_project { use super::*; pub fn initialize(ctx: Context<Initialize>) -> Result<()> { let counter = &mut ctx....
Daniel Cukier's user avatar
4 votes
2 answers
152 views

How to pass an uninitialized PDA account to a CPI to initialize it without getting AccountNotInitialized error

I have ProgramA and ProgramB. ProgramA initializes an account using InstructionA. When ProgramB uses a CPI to call instructionA I'm getting AccountNotInitialized error. I'm using the following code: ...
cris.sol's user avatar
  • 272
2 votes
1 answer
56 views

Can I initialize a PDA within a CPI call?

I have a ProgramA and a ProgramB. ProgramB has an instruction "InstructionB" that initializes a PDA. If I try to call InstructionB from ProgramA with CPI, I get a "signer privilege ...
0xGhohun's user avatar
2 votes
2 answers
815 views

Cross-program invocation with unauthorized signer or writable account when using PDA with seeds

I've been able to write a simple program to create some accounts using a generated keypair. But, when I've tried to modify things in an attempt to make the user the authority of the account and use a ...
Qhapaq Qowi's user avatar
1 vote
1 answer
368 views

what does #[account(mut)] do in solana?

I know what procedural macros are. They are like decorators, they add new functionality or properties into the decorated code. #[account(init,payer=user,space=9000)] pub base_account:Account<'info,...
Yilmaz's user avatar
  • 1,124
2 votes
1 answer
212 views

I want to create multiple PDA accounts made with different seeds belonging to a single user/wallet. to be exact I want to initialize multiple PDA Aco [closed]

I want to create multiple PDA accounts made with different seeds belonging to a single user/wallet. to be exact I want to initialize multiple PDA Accounts with different seeds or bumps belonging to a ...
Syed Murtaza Ali Shah's user avatar
4 votes
1 answer
634 views

Anchor: How to set a PDA with seeds using variables from another account that is also being initialized?

What is the correct way to initialize a PDA using data from another account in the seeds that is simultaneously being initialized? In the [#derive(Accounts)] section below, I am trying to use the ...
Omega's user avatar
  • 55
4 votes
5 answers
278 views

Anchor - Manually setting program account discriminator

Is it possible to set the 8-byte discriminator on an Anchor account manually? I'm trying to initialize a new pda account in an instruction, but not all of the seeds are available in the context (can't ...
nibbus's user avatar
  • 175
5 votes
1 answer
362 views

Why is it possible to initialise a program account to my wallet address, stopping me from signing anything in future?

This was an accidental discovery when playing with the Solana Playground, but it surprised me and feels like a bug. I'm wondering why it works this way. Example: https://beta.solpg.io/...
Callum M's user avatar
  • 2,920