What if we want to pass arbitrary number of accounts to the function(as part of accounts).
Expectation :-
If we have a program and there is a function named as transferMultiple (Which is responsible for extracting multiple accounts and pay them a constant amount of tokens).
pub fn transferMultiple(ctx:Context<TransferMultiple>, amt:uint8) -> Result<()> {
//extract the arbitrary number of accounts from ctx
//transfer "amt" number of tokens to every account extracted.
}
#[derive(Accounts)]
pub struct TransferMultiple<'info> {
#[account(mut)]
pub from: Signer<'info>,
pub input_accounts: **Here I need to specify array of AccountInfo**,
}
How to achieve the above operation ?