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),

View File

@@ -10,4 +10,4 @@ pub(crate) use ore_utils as utils;
use solana_program::declare_id;
// declare_id!("mineRHF5r6S7HyD9SppBfVMXMavDkJsxwGesEvxZr2A");
declare_id!("7LARaw2QJCftkGR14QVV6NSj3MFZM9iUL4GfSKySXphJ");
declare_id!("CWZk6C3fGbpr1UprdCGaLvnW2ogh7okEmeXaS161RxUg");