pub trait UserEndpointsModule:
ContractBase
+ Sized
+ StorageModule
+ EventsModule {
// Provided methods
fn sell_token<T>(&self)
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn buy_token<T>(
&self,
requested_amount: BigUint<Self::Api>,
requested_token: TokenIdentifier<Self::Api>,
requested_nonce: OptionalValue<u64>,
)
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn send_next_available_tokens(
&self,
caller: &ManagedAddress<Self::Api>,
token: TokenIdentifier<Self::Api>,
amount: BigUint<Self::Api>,
) { ... }
fn get_buy_price<T>(
&self,
amount: BigUint<Self::Api>,
identifier: TokenIdentifier<Self::Api>,
) -> BigUint<Self::Api>
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn get_sell_price<T>(
&self,
amount: BigUint<Self::Api>,
identifier: TokenIdentifier<Self::Api>,
) -> BigUint<Self::Api>
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn check_token_exists(&self, issued_token: &TokenIdentifier<Self::Api>) { ... }
fn get_token_availability(
&self,
identifier: TokenIdentifier<Self::Api>,
) -> MultiValueEncoded<Self::Api, MultiValue2<u64, BigUint<Self::Api>>> { ... }
fn check_owned_return_payment_token<T>(
&self,
issued_token: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> EgldOrEsdtTokenIdentifier<Self::Api>
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn check_given_token(
&self,
accepted_token: &EgldOrEsdtTokenIdentifier<Self::Api>,
given_token: &EgldOrEsdtTokenIdentifier<Self::Api>,
) { ... }
fn compute_buy_price<T>(
&self,
identifier: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> BigUint<Self::Api>
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
fn compute_sell_price<T>(
&self,
identifier: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> BigUint<Self::Api>
where T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default { ... }
}
Provided Methods§
fn sell_token<T>(&self)where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn buy_token<T>(
&self,
requested_amount: BigUint<Self::Api>,
requested_token: TokenIdentifier<Self::Api>,
requested_nonce: OptionalValue<u64>,
)where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn send_next_available_tokens( &self, caller: &ManagedAddress<Self::Api>, token: TokenIdentifier<Self::Api>, amount: BigUint<Self::Api>, )
fn get_buy_price<T>(
&self,
amount: BigUint<Self::Api>,
identifier: TokenIdentifier<Self::Api>,
) -> BigUint<Self::Api>where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn get_sell_price<T>(
&self,
amount: BigUint<Self::Api>,
identifier: TokenIdentifier<Self::Api>,
) -> BigUint<Self::Api>where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn check_token_exists(&self, issued_token: &TokenIdentifier<Self::Api>)
fn get_token_availability( &self, identifier: TokenIdentifier<Self::Api>, ) -> MultiValueEncoded<Self::Api, MultiValue2<u64, BigUint<Self::Api>>>
fn check_owned_return_payment_token<T>(
&self,
issued_token: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> EgldOrEsdtTokenIdentifier<Self::Api>where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn check_given_token( &self, accepted_token: &EgldOrEsdtTokenIdentifier<Self::Api>, given_token: &EgldOrEsdtTokenIdentifier<Self::Api>, )
fn compute_buy_price<T>(
&self,
identifier: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> BigUint<Self::Api>where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
fn compute_sell_price<T>(
&self,
identifier: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
) -> BigUint<Self::Api>where
T: CurveFunction<Self::Api> + TopEncode + TopDecode + NestedEncode + NestedDecode + TypeAbi + PartialEq + Default,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.