miner as fee payer

This commit is contained in:
alex
2024-07-10 11:41:47 -07:00
parent b602b532a6
commit 70fb0bcfb8
3 changed files with 6 additions and 9 deletions

View File

@@ -256,14 +256,13 @@ pub fn mine(signer: Pubkey, bus: Pubkey, solution: Solution) -> Instruction {
}
/// Builds an open instruction.
pub fn open(signer: Pubkey, miner: Pubkey, payer: Pubkey) -> Instruction {
pub fn open(signer: Pubkey, miner: 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(miner, true),
AccountMeta::new(proof_pda.0, false),
AccountMeta::new_readonly(solana_program::system_program::id(), false),
AccountMeta::new_readonly(sysvar::slot_hashes::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!("EarRpm6FCvs7biAjL1F6yTugqUvLoXtYUvPKb2tHNh8w");
declare_id!("6NSA5s2mk5fJctfoKxWoewFpT4uwtZpBAVd6DHyMk8Zi");