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 answers only not deleted user 325
2 votes
Accepted

Referencing an account from another within #[derive(Accounts)]

This is a known breaking change from Anchor 0.30.0. This means you have 3 options: Use Anchor 0.29.0 Use one of the two workarounds I suggested here where I answered someone who had a similar issue t …
McBain's user avatar
  • 5,384
1 vote
Accepted

Reallocing one account bigger and one smaller in one ix in anchor gives `sum of account bala...

When anchor processes reallocs, it turns each realloc constraint into code that looks like this: let __anchor_rent = anchor_lang::prelude::Rent::get()?; let __field_info = acc1.to_acco …
McBain's user avatar
  • 5,384
2 votes
Accepted

How do I build a transaction using `declare_program!` with anchor_client?

Turns out I was just using two different versions of anchor_client and anchor_lang. Made sure both are the same version, and it works perfectly now.
McBain's user avatar
  • 5,384
0 votes
Accepted

How to specify PDA owned by different program in anchor?

After checking the docs, we find this can easily be done with the seeds::program constraint: #[account( seeds = [THEIR_FST_SEED, THEIR_SND_SEED], seeds::program = other_program_pubkey, bum …
McBain's user avatar
  • 5,384