I wondering 3 things.
- How can i know invoke_signed's second parameter needs 3 accounts??
&[
ctx.accounts.token_metadata_program.to_account_info(),
ctx.accounts.metadata.to_account_info(),
candy_machine_creator.to_account_info(),
],
- 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
],
- What is need for seed? invoke_signed is need for PDA, right?
I try like this,
seed = &[&["metadata".as_ref(),
ctx.accounts.token_metadata_program.key().as_ref(),
ctx.accounts.mint.key().as_ref(),
&[bump]]]
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'