Skip to main content

All Questions

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

Why my Option account is required when invoke from js client?

all. I am trying to use Option account in a demo, where, token related accounts are optional, when not provided, it will transfer SOL from my contract to user, other wise transfer SPL token to user. #...
breeze wang's user avatar
0 votes
0 answers
41 views

Can I use anchor address constraint with dynamic value from state

Here is the example of how address constraint is implemented, but the address is CONSTANT https://beta.solpg.io/66b37272cffcf4b13384d2aa I want to be able to change the authority who signs the ...
Nazar Havryliuk's user avatar
2 votes
1 answer
106 views

What exactly are `Interface<'info, T>` and `InterfaceAccount<'info, T>`

InterfaceAccount<'info, T> and Interface<'info, T> and Anchor accounts types Would love to know more about them, where I should use them and what differentiates the two.
Jimii's user avatar
  • 7,712
2 votes
2 answers
279 views

Zero_copy not working , Getting `Zeroable` is not implemented for `[Event; 25000]`, while trying example

I'm trying This example by anchor to initialize large accounts and using zero_copy on them. https://github.com/coral-xyz/anchor/blob/master/tests/zero-copy/programs/zero-copy/src/lib.rs#L156-L165 I'm ...
Abhishek Faliya's user avatar
0 votes
1 answer
45 views

Is it possible to set up an account to point to another account?

I'm making an anchor program where I would like to make a user ID easily retrievable with their Pk, sequential ID or username. one way I thought is to make a PK link account (in case the seed for the ...
alex's user avatar
  • 1
0 votes
2 answers
1k views

Can we use pda as signer and payer to create an account in any solana program

I have asked same kind of question earlier but not got proper answer. As I got an answer in my previous question in which I have to use system owned pda account, I have also tried this but getting ...
Panchal Vedant's user avatar
1 vote
0 answers
45 views

How to call another instruction from the same Anchor program (No CPI) [duplicate]

Is there a way to invoke an instruction within the same program? just for the sake of code reusability, I know we can achieve this easily with CPI when invoking different programs instructions, but I ...
Ander's user avatar
  • 1,005
1 vote
3 answers
146 views

How much of a PDA can a program control

How much of a PDA is under the control of its owner program? For example, could the program block the account from signing certain instructions on transactions? Or could the program add a fee to every ...
Pixeled's user avatar
  • 486
8 votes
1 answer
2k views

What is Anchor (8 bytes) discriminator

The question should be straightforward.
vicyyn's user avatar
  • 4,295