gmsol-sdk 0.9.0

GMX-Solana is an extension of GMX on the Solana blockchain.
Documentation
1
2
3
4
5
6
7
8
use crate::constants;
use wasm_bindgen::prelude::*;

/// Apply `factor` to the `value`.
#[wasm_bindgen]
pub fn apply_factor(value: u128, factor: u128) -> Option<u128> {
    gmsol_model::utils::apply_factor::<_, { constants::MARKET_DECIMALS }>(&value, &factor)
}