pub trait StakingRewardsRuntimeApi<Block, Balance>: Core<Block>where
    Block: Block,
    Balance: Codec + MaybeDisplay + MaybeFromStr,{
    // Provided methods
    fn yearly_emission(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        total_staked: Balance,
        total_issuance: Balance
    ) -> Result<Balance, ApiError> { ... }
    fn yearly_emission_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        total_staked: Balance,
        total_issuance: Balance
    ) -> Result<Balance, ApiError> { ... }
    fn max_yearly_emission(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Balance, ApiError> { ... }
    fn max_yearly_emission_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Balance, ApiError> { ... }
}

Provided Methods§

fn yearly_emission( &self, __runtime_api_at_param__: &BlockId<Block>, total_staked: Balance, total_issuance: Balance ) -> Result<Balance, ApiError>

Get emission rewards for the whole year given total staked tokens and total issuance. Depends on the reward curve, decay percentage and remaining emission supply.

fn yearly_emission_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, total_staked: Balance, total_issuance: Balance ) -> Result<Balance, ApiError>

Get emission rewards for the whole year given total staked tokens and total issuance. Depends on the reward curve, decay percentage and remaining emission supply.

fn max_yearly_emission( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<Balance, ApiError>

Get max emission rewards for the whole year and depends on decay percentage and remaining emission supply.

fn max_yearly_emission_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext ) -> Result<Balance, ApiError>

Get max emission rewards for the whole year and depends on decay percentage and remaining emission supply.

Trait Implementations§

§

impl<Block, Balance> RuntimeApiInfo for dyn StakingRewardsApi<Block, Balance> + 'staticwhere Block: Block,

§

const ID: [u8; 8] = [4u8, 126u8, 84u8, 253u8, 188u8, 32u8, 68u8, 171u8]

The identifier of the runtime api.
§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§