This commit is contained in:
Hardhat Chad
2025-07-30 09:50:07 -07:00
parent 8c96e23981
commit dff2bcff4a
5 changed files with 21 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ pub const TREASURY_ADDRESS: Pubkey =
pub const TREASURY_BUMP: u8 = ed25519::derive_program_address(&[TREASURY], &PROGRAM_ID).1;
/// Swap fee in lamports.
pub const FEE_LAMPORTS: u64 = 1_000_000; // 0.001 SOL
pub const FEE_LAMPORTS: u64 = 100_000; // 0.0001 SOL
/// Denominator for fee calculations.
pub const DENOMINATOR_BPS: u64 = 10_000;

View File

@@ -107,6 +107,7 @@ 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 mint_address = MINT_ADDRESS;
let treasury_address = TREASURY_ADDRESS;
@@ -117,6 +118,7 @@ pub fn close(signer: Pubkey, opener: Pubkey, winner: Pubkey, id: u64) -> Instruc
AccountMeta::new(signer, true),
AccountMeta::new(block_adddress, false),
AccountMeta::new(winner, false),
AccountMeta::new_readonly(market_address, false),
AccountMeta::new(miner_tokens_address, false),
AccountMeta::new(mint_address, false),
AccountMeta::new(opener, false),