performance optimization

This commit is contained in:
Wood
2025-10-07 00:08:41 +08:00
parent f9492b2c3a
commit ffc71cc1d8
7 changed files with 287 additions and 8 deletions
+2
View File
@@ -17,6 +17,7 @@ use crate::{
///
/// # Returns
/// The amount of tokens that will be received (in token's smallest unit)
#[inline]
pub fn get_buy_token_amount_from_sol_amount(
virtual_token_reserves: u128,
virtual_sol_reserves: u128,
@@ -74,6 +75,7 @@ pub fn get_buy_token_amount_from_sol_amount(
///
/// # Returns
/// The amount of SOL that will be received after fees (in lamports)
#[inline]
pub fn get_sell_sol_amount_from_token_amount(
virtual_token_reserves: u128,
virtual_sol_reserves: u128,