pub trait DappStakingApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn periods_per_cycle(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<PeriodNumber, ApiError> { ... }
    fn eras_per_voting_subperiod(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<EraNumber, ApiError> { ... }
    fn eras_per_build_and_earn_subperiod(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<EraNumber, ApiError> { ... }
    fn blocks_per_era(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<BlockNumber, ApiError> { ... }
    fn get_dapp_tier_assignment_before_version_2(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<BTreeMap<DAppId, TierId>, ApiError> { ... }
    fn get_dapp_tier_assignment(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<BTreeMap<DAppId, RankedTier>, ApiError> { ... }
}
Expand description

dApp Staking Api.

Used to provide information otherwise not available via RPC.

Provided Methods§

source

fn periods_per_cycle( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<PeriodNumber, ApiError>

How many periods are there in one cycle.

source

fn eras_per_voting_subperiod( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<EraNumber, ApiError>

For how many standard era lengths does the voting subperiod last.

source

fn eras_per_build_and_earn_subperiod( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<EraNumber, ApiError>

How many standard eras are there in the build&earn subperiod.

source

fn blocks_per_era( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<BlockNumber, ApiError>

How many blocks are there per standard era.

source

fn get_dapp_tier_assignment_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<BTreeMap<DAppId, TierId>, ApiError>

👎Deprecated

Get dApp tier assignment for the given dApp.

source

fn get_dapp_tier_assignment( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<BTreeMap<DAppId, RankedTier>, ApiError>

Get dApp ranked tier assignment for the given dApp.

Trait Implementations§

source§

impl<Block: BlockT> RuntimeApiInfo for dyn DappStakingApi<Block>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§