pub trait DexGeneralApi<Block: BlockT, AccountId, AssetId>: Core<Block>where
AccountId: Codec,
AssetBalance: Codec,
AssetId: Codec,{
// Provided methods
fn get_pair_by_asset_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
asset_0: AssetId,
asset_1: AssetId
) -> Result<Option<PairInfo<AccountId, AssetBalance, AssetId>>, ApiError> { ... }
fn get_amount_in_price(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
supply: AssetBalance,
path: Vec<AssetId>
) -> Result<AssetBalance, ApiError> { ... }
fn get_amount_out_price(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
supply: AssetBalance,
path: Vec<AssetId>
) -> Result<AssetBalance, ApiError> { ... }
fn get_estimate_lptoken(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
asset_0: AssetId,
asset_1: AssetId,
amount_0_desired: AssetBalance,
amount_1_desired: AssetBalance,
amount_0_min: AssetBalance,
amount_1_min: AssetBalance
) -> Result<AssetBalance, ApiError> { ... }
fn calculate_remove_liquidity(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
asset_0: AssetId,
asset_1: AssetId,
amount: AssetBalance
) -> Result<Option<(AssetBalance, AssetBalance)>, ApiError> { ... }
}
The identifier of the runtime api.
The version of the runtime api.