pub trait PoAApi<Block: BlockT, AccountId, Balance>: Core<Block>where
    AccountId: Codec + MaybeDisplay + MaybeFromStr,
    Balance: Codec + MaybeDisplay + MaybeFromStr,{
    // Provided methods
    fn get_treasury_account(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<AccountId, ApiError> { ... }
    fn get_treasury_account_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<AccountId, ApiError> { ... }
    fn get_treasury_balance(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Balance, ApiError> { ... }
    fn get_treasury_balance_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Balance, ApiError> { ... }
}

Provided Methods§

source

fn get_treasury_account( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<AccountId, ApiError>

Return account address of treasury. The account address can then be used to query the chain for balance

source

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

Return account address of treasury. The account address can then be used to query the chain for balance

source

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

Return free balance of treasury account. In the context of PoA, only free balance makes sense for treasury. But just in case, to check all kinds of balance (locked, reserved, etc), get the account address with above call and query the chain.

source

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

Return free balance of treasury account. In the context of PoA, only free balance makes sense for treasury. But just in case, to check all kinds of balance (locked, reserved, etc), get the account address with above call and query the chain.

Trait Implementations§

source§

impl<Block: BlockT, AccountId, Balance> RuntimeApiInfo for dyn PoAApi<Block, AccountId, Balance>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§