mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-06 13:47:44 +00:00
remove logs
This commit is contained in:
@@ -131,10 +131,6 @@ pub fn buy(
|
||||
args: Buy,
|
||||
) -> Instruction {
|
||||
let bonding_curve: Pubkey = PumpFun::get_bonding_curve_pda(mint).unwrap();
|
||||
|
||||
println!("user_ata: {:?}", get_associated_token_address(&payer.pubkey(), mint));
|
||||
println!("bonding_curve_ata: {:?}", get_associated_token_address(&bonding_curve, mint));
|
||||
|
||||
Instruction::new_with_bytes(
|
||||
constants::accounts::PUMPFUN,
|
||||
&args.data(),
|
||||
|
||||
-30
@@ -255,34 +255,15 @@ impl PumpFun {
|
||||
) -> Result<String, ClientError> {
|
||||
let start_time = Instant::now();
|
||||
|
||||
println!("111111111111111111");
|
||||
|
||||
let jito_client = self.jito_client.as_ref()
|
||||
.ok_or_else(|| ClientError::Other("Jito client not found".to_string()))?;
|
||||
|
||||
println!("222222222222222222");
|
||||
|
||||
let global_account = self.get_global_account()?;
|
||||
|
||||
println!("333333333333333333");
|
||||
// let bonding_curve_account = self.get_bonding_curve_account(mint)?;
|
||||
|
||||
println!("444444444444444444");
|
||||
// let buy_amount = bonding_curve_account
|
||||
// .get_buy_price(max_sol_cost)
|
||||
// .map_err(ClientError::BondingCurveError)?;
|
||||
|
||||
println!("555555555555555555");
|
||||
let buy_amount_with_slippage =
|
||||
utils::calculate_with_slippage_buy(max_sol_cost, slippage_basis_points.unwrap_or(DEFAULT_SLIPPAGE));
|
||||
|
||||
println!("666666666666666666");
|
||||
|
||||
let mut instructions = vec![];
|
||||
|
||||
let tip_account = jito_client.get_tip_account().await?;
|
||||
|
||||
println!("777777777777777777");
|
||||
let ata = get_associated_token_address(&self.payer.pubkey(), mint);
|
||||
if self.rpc.get_account(&ata).is_err() {
|
||||
instructions.push(create_associated_token_account(
|
||||
@@ -293,8 +274,6 @@ impl PumpFun {
|
||||
));
|
||||
}
|
||||
|
||||
println!("888888888888888888");
|
||||
|
||||
instructions.push(instruction::buy(
|
||||
&self.payer.clone(),
|
||||
mint,
|
||||
@@ -304,8 +283,6 @@ impl PumpFun {
|
||||
_max_sol_cost: buy_amount_with_slippage,
|
||||
},
|
||||
));
|
||||
|
||||
println!("999999999999999999");
|
||||
|
||||
instructions.push(
|
||||
system_instruction::transfer(
|
||||
@@ -315,8 +292,6 @@ impl PumpFun {
|
||||
),
|
||||
);
|
||||
|
||||
println!("101010101010101010");
|
||||
|
||||
let recent_blockhash = self.rpc.get_latest_blockhash()?;
|
||||
let transaction = Transaction::new_signed_with_payer(
|
||||
&instructions,
|
||||
@@ -325,8 +300,6 @@ impl PumpFun {
|
||||
recent_blockhash,
|
||||
);
|
||||
|
||||
println!("110000000000000000");
|
||||
|
||||
let signature = jito_client.send_transaction(&transaction).await?;
|
||||
println!("Total Jito buy operation time: {:?}ms", start_time.elapsed().as_millis());
|
||||
|
||||
@@ -597,12 +570,9 @@ impl PumpFun {
|
||||
&self,
|
||||
mint: &Pubkey,
|
||||
) -> Result<accounts::BondingCurveAccount, ClientError> {
|
||||
println!("aaaaaa");
|
||||
let bonding_curve_pda = Self::get_bonding_curve_pda(mint)
|
||||
.ok_or(ClientError::BondingCurveNotFound)?;
|
||||
println!("bbbbbb");
|
||||
let account = self.rpc.get_account(&bonding_curve_pda)?;
|
||||
println!("cccccc");
|
||||
accounts::BondingCurveAccount::try_from_slice(&account.data)
|
||||
.map_err(ClientError::BorshError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user