pub trait StakingRewardsApi<Block: BlockT, Balance>: Core<Block>where
    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§

source

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.

source

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.

source

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.

source

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§

source§

impl<Block: BlockT, Balance> RuntimeApiInfo for dyn StakingRewardsApi<Block, Balance>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§