Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 639
1 vote
1 answer
57 views

How can a program enforce that one of two authorities to sign a transaction?

struct ListOfAccounts<'info> { #[account(mut)] pub ONE: AccountInfo<'info>, pub TWO: AccountInfo<'info>, #[account(mut, seeds = [b"seed", ONE.key().as_ref()], bump = pda.bump)] pub PDA … ONE's pubkey is used as a seed for PDA. …
coco's user avatar
  • 83
5 votes
1 answer
497 views

How can I delete all PDA accounts for my program (anchor)?

I created several PDA accounts with custom data fields. …
coco's user avatar
  • 83
1 vote
1 answer
92 views

Can I read information stored by a PDA without having to deserialize its byte array?

here is my on-chain code to create the PDA account #[derive(Accounts)] pub struct Initialize<'info> { #[account(init, payer = user, space = 20 , seeds = [user.key().as_ref()], bump)] pub pda: … right now I'm doing let account = connection.get_account(*PDA ADDRESS*).unwrap(); let data = &account.data; let stored_key: String = Pubkey::new_from_array(data[10..42].try_into().unwrap()).to_string …
coco's user avatar
  • 83