5

I'm writing a program where the program does CPI to metadata which requires two signers?

  • can I have two PDA signers in one anchor transaction?
  • if so, how?

thank you

1 Answer 1

5

Yes, you can have multiple PDA signers.

If you notice when passing in a single seed normally, it's wrapped in another array. This extra array allows you to pass in multiple seeds. It looks something like this

&[&['seed_1'.to_le_bytes()], &['seed_2'.to_le_bytes()]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.