pub trait OnchainStateApi<Block: BlockT, AccountId, Balance>: Core<Block>where
AccountId: Encode + Decode,
Balance: Encode + Decode,{
// Provided methods
fn free_balance(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
) -> Result<Balance, ApiError> { ... }
fn get_open_channel_for_chain(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
dst_chain_id: ChainId,
) -> Result<Option<ChannelId>, ApiError> { ... }
fn consensus_chain_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError> { ... }
}
Expand description
Api for querying onchain state in the test
Provided Methods§
sourcefn free_balance(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
) -> Result<Balance, ApiError>
fn free_balance( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId, ) -> Result<Balance, ApiError>
Api to get the free balance of the given account
sourcefn get_open_channel_for_chain(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
dst_chain_id: ChainId,
) -> Result<Option<ChannelId>, ApiError>
fn get_open_channel_for_chain( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, dst_chain_id: ChainId, ) -> Result<Option<ChannelId>, ApiError>
Returns the last open channel for a given domain.
sourcefn consensus_chain_byte_fee(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Balance, ApiError>
fn consensus_chain_byte_fee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Balance, ApiError>
Api to get the current domain transaction byte fee