mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-26 07:18:06 +00:00
set jito fee
This commit is contained in:
+5
-3
@@ -40,7 +40,7 @@ use borsh::BorshDeserialize;
|
|||||||
const DEFAULT_SLIPPAGE: u64 = 1000; // 10%
|
const DEFAULT_SLIPPAGE: u64 = 1000; // 10%
|
||||||
const DEFAULT_COMPUTE_UNIT_LIMIT: u32 = 10_000_000;
|
const DEFAULT_COMPUTE_UNIT_LIMIT: u32 = 10_000_000;
|
||||||
const DEFAULT_COMPUTE_UNIT_PRICE: u64 = 500_000;
|
const DEFAULT_COMPUTE_UNIT_PRICE: u64 = 500_000;
|
||||||
const JITO_TIP_AMOUNT: u64 = 1255211;
|
const JITO_TIP_AMOUNT: u64 = 4123210;
|
||||||
|
|
||||||
/// Priority fee configuration
|
/// Priority fee configuration
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
@@ -252,6 +252,7 @@ impl PumpFun {
|
|||||||
buy_token_amount: u64,
|
buy_token_amount: u64,
|
||||||
max_sol_cost: u64,
|
max_sol_cost: u64,
|
||||||
slippage_basis_points: Option<u64>,
|
slippage_basis_points: Option<u64>,
|
||||||
|
jito_fee: Option<u64>,
|
||||||
) -> Result<String, ClientError> {
|
) -> Result<String, ClientError> {
|
||||||
let start_time = Instant::now();
|
let start_time = Instant::now();
|
||||||
|
|
||||||
@@ -284,11 +285,12 @@ impl PumpFun {
|
|||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
||||||
|
let jito_fee = jito_fee.unwrap_or(JITO_TIP_AMOUNT);
|
||||||
instructions.push(
|
instructions.push(
|
||||||
system_instruction::transfer(
|
system_instruction::transfer(
|
||||||
&self.payer.pubkey(),
|
&self.payer.pubkey(),
|
||||||
&tip_account,
|
&tip_account,
|
||||||
JITO_TIP_AMOUNT,
|
jito_fee,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -471,7 +473,7 @@ impl PumpFun {
|
|||||||
system_instruction::transfer(
|
system_instruction::transfer(
|
||||||
&self.payer.pubkey(),
|
&self.payer.pubkey(),
|
||||||
&tip_account,
|
&tip_account,
|
||||||
JITO_TIP_AMOUNT/10,
|
JITO_TIP_AMOUNT/20,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user