I wondering 3 things.

  1. How can i know invoke_signed's second parameter needs 3 accounts??
  1. And, Is this order important? For example, can I change order like this
            ctx.accounts.metadata.to_account_info(),               // 2
            candy_machine_creator.to_account_info(),               // 3
            ctx.accounts.token_metadata_program.to_account_info(), // 1
  1. What is need for seed? invoke_signed is need for PDA, right?

I try like this,

seed = &[&["metadata".as_ref(), 

but fail with message

'Program failed to complete: Could not create program address with signer seeds: Provided seeds do not result in a valid address'

1 Answer 1

  1. The metaplex documentation specifies the arguments and accounts needed for its instructions here: https://docs.metaplex.com/programs/token-metadata/instructions

  2. No, order isn't important.

  3. invoke_signed() is only needed when the signer for a transaction is a PDA because PDAs can't sign transactions on the client side like a normal wallet can. In your particular case update_authority is the signer for the transaction. If update_authority is a normal account then invoke() is all you need.


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.