Trait dock_poa::runtime_api::PoAApi
source · 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§
sourcefn get_treasury_account(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<AccountId, ApiError>
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
sourcefn get_treasury_account_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<AccountId, ApiError>
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
sourcefn get_treasury_balance(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Balance, ApiError>
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.
sourcefn get_treasury_balance_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Balance, ApiError>
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.