Trait runtime_common::apis::PoolsApi
source · pub trait PoolsApi<Block: BlockT, PoolId, TrancheId, Balance, Currency, BalanceRatio, MaxTranches>: Core<Block>where
PoolId: Codec,
TrancheId: Codec,
Balance: Codec,
Currency: Codec,
BalanceRatio: Codec,
MaxTranches: Codec + Get<u32>,{
// Provided methods
fn currency(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId
) -> Result<Option<Currency>, ApiError> { ... }
fn inspect_epoch_solution(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
solution: Vec<TrancheSolution>
) -> Result<Option<EpochSolution<Balance, MaxTranches>>, ApiError> { ... }
fn tranche_token_price(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
tranche: TrancheLoc<TrancheId>
) -> Result<Option<BalanceRatio>, ApiError> { ... }
fn tranche_token_prices(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId
) -> Result<Option<Vec<BalanceRatio>>, ApiError> { ... }
fn tranche_ids(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId
) -> Result<Option<Vec<TrancheId>>, ApiError> { ... }
fn tranche_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
tranche_index: TrancheIndex
) -> Result<Option<TrancheId>, ApiError> { ... }
fn tranche_currency(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
tranche_loc: TrancheLoc<TrancheId>
) -> Result<Option<Currency>, ApiError> { ... }
fn nav(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId
) -> Result<Option<PoolNav<Balance>>, ApiError> { ... }
}
Expand description
Runtime for pallet-pool-system.
Note: The runtime api is pallet specific, while the RPC methods are more focused on domain-specific logic