payer for open ix

This commit is contained in:
alex
2024-07-09 16:23:25 -07:00
parent bef48eb36f
commit 89ee9f1bea
3 changed files with 7 additions and 4 deletions

View File

@@ -256,12 +256,13 @@ pub fn mine(signer: Pubkey, bus: Pubkey, solution: Solution) -> Instruction {
}
/// Builds an open instruction.
pub fn open(signer: Pubkey, miner: Pubkey) -> Instruction {
pub fn open(signer: Pubkey, miner: Pubkey, payer: Pubkey) -> Instruction {
let proof_pda = Pubkey::find_program_address(&[PROOF, signer.as_ref()], &crate::id());
Instruction {
program_id: crate::id(),
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(payer, true),
AccountMeta::new_readonly(miner, false),
AccountMeta::new(proof_pda.0, false),
AccountMeta::new_readonly(solana_program::system_program::id(), false),