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§
sourcefn periods_per_cycle(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<PeriodNumber, ApiError>
fn periods_per_cycle( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<PeriodNumber, ApiError>
How many periods are there in one cycle.
sourcefn eras_per_voting_subperiod(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<EraNumber, ApiError>
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.
sourcefn eras_per_build_and_earn_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>
How many standard eras are there in the build&earn subperiod.
sourcefn blocks_per_era(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<BlockNumber, ApiError>
fn blocks_per_era( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<BlockNumber, ApiError>
How many blocks are there per standard era.
sourcefn 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_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.
sourcefn get_dapp_tier_assignment(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<BTreeMap<DAppId, RankedTier>, ApiError>
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.