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