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 4980
3 votes

Can we derive PDAs inside a solana program?

you can use this piece of code : let (address, bump) = Pubkey::find_program_address( &[ ... your seeds ... ], ctx.program_id, ); please note that in anchor you …
Effe2's user avatar
  • 1,607
0 votes

Can't get past this error with anchor/@coral/xyz

i don't know about this error, but you can still send the transaction manually if you're stucked. Instead of using .rpc(), just create a new Transaction(), add your instruction, blockhash and feepayer …
Effe2's user avatar
  • 1,607
0 votes

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

i'm not sure to have fully understand what you want to achieve, but why not creating a PDA with only yhe public key as seed, and then you can store whatever data you want in your pda ? (like your own …
Effe2's user avatar
  • 1,607
4 votes
Accepted

Is there a way to deploy same contract with new program id?

try to rename the JSON file in target/deploy. Then the deploy script should create a new keypair to deploy your program, and you should have a new program address
Effe2's user avatar
  • 1,607