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

Provided Methods§

source

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

source

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>

source

fn tranche_token_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, tranche: TrancheLoc<TrancheId> ) -> Result<Option<BalanceRatio>, ApiError>

source

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

source

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

source

fn tranche_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, tranche_index: TrancheIndex ) -> Result<Option<TrancheId>, ApiError>

source

fn tranche_currency( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, tranche_loc: TrancheLoc<TrancheId> ) -> Result<Option<Currency>, ApiError>

source

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

Trait Implementations§

source§

impl<Block: BlockT, PoolId, TrancheId, Balance, Currency, BalanceRatio, MaxTranches> RuntimeApiInfo for dyn PoolsApi<Block, PoolId, TrancheId, Balance, Currency, BalanceRatio, MaxTranches>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§