Trait dock_poa_rpc::PoARuntimeApi
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>
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>
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>
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>
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.