multiversx_sc_modules/bonding_curve/curves/
curve_function.rs

1
2
3
4
5
6
7
8
9
10
11
12
multiversx_sc::imports!();
multiversx_sc::derive_imports!();

use crate::bonding_curve::utils::structs::CurveArguments;
pub trait CurveFunction<M: ManagedTypeApi> {
    fn calculate_price(
        &self,
        token_start: &BigUint<M>,
        amount: &BigUint<M>,
        arguments: &CurveArguments<M>,
    ) -> BigUint<M>;
}