close sdk

This commit is contained in:
Hardhat Chad
2025-08-11 16:41:41 -07:00
parent aba3a7defc
commit 246c5a6bec

View File

@@ -107,7 +107,8 @@ pub fn claim(signer: Pubkey, amount: u64) -> Instruction {
pub fn close(signer: Pubkey, opener: Pubkey, winner: Pubkey, id: u64) -> Instruction {
let block_adddress = block_pda(id).0;
let market_address = market_pda().0;
let miner_tokens_address = get_associated_token_address(&winner, &MINT_ADDRESS);
let miner_address = miner_pda(winner).0;
let miner_tokens_address = get_associated_token_address(&miner_address, &MINT_ADDRESS);
let mint_address = MINT_ADDRESS;
let treasury_address = TREASURY_ADDRESS;
let treasury_tokens_address = treasury_tokens_address();
@@ -116,7 +117,7 @@ pub fn close(signer: Pubkey, opener: Pubkey, winner: Pubkey, id: u64) -> Instruc
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(block_adddress, false),
AccountMeta::new(winner, false),
AccountMeta::new(miner_address, false),
AccountMeta::new_readonly(market_address, false),
AccountMeta::new(miner_tokens_address, false),
AccountMeta::new(mint_address, false),