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

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

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

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.

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§

§

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

§

const ID: [u8; 8] = [58u8, 80u8, 9u8, 202u8, 214u8, 156u8, 179u8, 245u8]

The identifier of the runtime api.
§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§