split miner authority

This commit is contained in:
Hardhat Chad
2024-06-27 15:49:45 +00:00
parent 410ad47662
commit 6bdc8cbca2
5 changed files with 42 additions and 3 deletions

View File

@@ -214,12 +214,13 @@ pub fn reset(signer: Pubkey) -> Instruction {
}
/// Builds an open instruction.
pub fn open(signer: 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(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),