How can I test in Solana Anchor if a hacker can call or invoke certain program functions?
Is it by changing the first element inside the signers array:
await program.rpc.initializeProgram(
arg1, arg2, ... {
accounts: {...}
signers: [keypair1, keypair2, ... keypairN],
)
But in some tutorial cases, this signers array are omitted... Where in Anchor can I set the caller's keypair that is used to sign the transaction?
See example Anchor codes from https://project-serum.github.io/anchor/tutorials/tutorial-1
keywords: smart contract, security test