mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 07:26:51 +00:00
closing
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user