pub trait DexStableApi<Block: BlockT, CurrencyId, Balance, AccountId, PoolId>: Core<Block>where
    Balance: Codec,
    CurrencyId: Codec,
    AccountId: Codec,
    PoolId: Codec,{
Show 14 methods // Provided methods fn get_virtual_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError> { ... } fn get_a( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError> { ... } fn get_a_precise( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError> { ... } fn get_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<CurrencyId>, ApiError> { ... } fn get_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, index: u32 ) -> Result<Option<CurrencyId>, ApiError> { ... } fn get_lp_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Option<CurrencyId>, ApiError> { ... } fn get_currency_precision_multipliers( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError> { ... } fn get_currency_balances( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError> { ... } fn get_number_of_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<u32, ApiError> { ... } fn get_admin_balances( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError> { ... } fn calculate_currency_amount( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amounts: Vec<Balance>, deposit: bool ) -> Result<Balance, ApiError> { ... } fn calculate_swap( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, in_index: u32, out_index: u32, in_amount: Balance ) -> Result<Balance, ApiError> { ... } fn calculate_remove_liquidity( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amount: Balance ) -> Result<Vec<Balance>, ApiError> { ... } fn calculate_remove_liquidity_one_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amount: Balance, index: u32 ) -> Result<Balance, ApiError> { ... }
}

Provided Methods§

source

fn get_virtual_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError>

source

fn get_a( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError>

source

fn get_a_precise( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Balance, ApiError>

source

fn get_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<CurrencyId>, ApiError>

source

fn get_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, index: u32 ) -> Result<Option<CurrencyId>, ApiError>

source

fn get_lp_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Option<CurrencyId>, ApiError>

source

fn get_currency_precision_multipliers( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError>

source

fn get_currency_balances( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError>

source

fn get_number_of_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<u32, ApiError>

source

fn get_admin_balances( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<Balance>, ApiError>

source

fn calculate_currency_amount( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amounts: Vec<Balance>, deposit: bool ) -> Result<Balance, ApiError>

source

fn calculate_swap( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, in_index: u32, out_index: u32, in_amount: Balance ) -> Result<Balance, ApiError>

source

fn calculate_remove_liquidity( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amount: Balance ) -> Result<Vec<Balance>, ApiError>

source

fn calculate_remove_liquidity_one_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, amount: Balance, index: u32 ) -> Result<Balance, ApiError>

Trait Implementations§

source§

impl<Block: BlockT, CurrencyId, Balance, AccountId, PoolId> RuntimeApiInfo for dyn DexStableApi<Block, CurrencyId, Balance, AccountId, PoolId>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§