domain_test_primitives

Trait OnchainStateApi

source
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§

source

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

source

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.

source

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

Trait Implementations§

source§

impl<Block: BlockT, AccountId, Balance> RuntimeApiInfo for dyn OnchainStateApi<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§