I need a fixed amount(10) to be passed in so I'm not sure if that would be a tuple, vector or array in Rust.
Something like this maybe? see "pub keys" account.
pub struct VerifyReview<'info> {
#[account(init, payer = author, space = Verify::LEN)]
pub verify: Account<'info, Verify>,
#[account(mut)]
pub author: Signer<'info>,
pub keys: Vec<PubKeys>,
pub system_program: Program<'info, System>,
}
Typescript
it('passes in keys as account vec', async () => {
const contentAccounts = await program.account.content.all();
let theKeys = contentAccounts;
const verify = anchor.web3.Keypair.generate();
await program.rpc.validateV0({
accounts: {
verify: verify.publicKey,
author: program.provider.wallet.publicKey,
keys: theKeys,
systemProgram: anchor.web3.SystemProgram.programId,
},
signers: [verify],
});
const validateAccount = await program.account.verify.fetch(verify.publicKey);
});