pub struct DexUtils;Implementations§
Source§impl DexUtils
impl DexUtils
pub fn calculate_price_impact( amount_in: u64, reserve_in: u64, reserve_out: u64, ) -> f64
pub fn calculate_optimal_slippage(price_impact: f64) -> f64
pub fn format_token_amount(amount: u64, decimals: u8) -> String
pub async fn validate_token_pair( client: Arc<Aptos>, token_a: &str, token_b: &str, ) -> Result<Vec<String>, String>
Auto Trait Implementations§
impl Freeze for DexUtils
impl RefUnwindSafe for DexUtils
impl Send for DexUtils
impl Sync for DexUtils
impl Unpin for DexUtils
impl UnwindSafe for DexUtils
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more