Skip to main content

AsyncStakingQueryMsgFns

Trait AsyncStakingQueryMsgFns 

Source
pub trait AsyncStakingQueryMsgFns<Chain: AsyncWasmQuerier + ChainState, CwOrchQueryMsgType: Sync>: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>
where StakingQueryMsg: Into<CwOrchQueryMsgType>,
{ // Provided methods async fn info_async( &self, provider: ProviderName, staking_tokens: Vec<AssetEntry>, ) -> Result<StakingInfoResponse, CwEnvError> { ... } async fn staked_async( &self, provider: ProviderName, staker_address: impl Into<String>, stakes: Vec<AssetEntry>, unbonding_period: Option<Duration>, ) -> Result<StakeResponse, CwEnvError> { ... } async fn unbonding_async( &self, provider: ProviderName, staker_address: impl Into<String>, staking_tokens: Vec<AssetEntry>, ) -> Result<UnbondingResponse, CwEnvError> { ... } async fn reward_tokens_async( &self, provider: ProviderName, staking_tokens: Vec<AssetEntry>, ) -> Result<RewardTokensResponse, CwEnvError> { ... } }
Expand description

Automatically derived trait that allows you to call the variants of the message directly without the need to construct the struct yourself.

Provided Methods§

Source

async fn info_async( &self, provider: ProviderName, staking_tokens: Vec<AssetEntry>, ) -> Result<StakingInfoResponse, CwEnvError>

Automatically generated wrapper around StakingQueryMsg::Info variant

Source

async fn staked_async( &self, provider: ProviderName, staker_address: impl Into<String>, stakes: Vec<AssetEntry>, unbonding_period: Option<Duration>, ) -> Result<StakeResponse, CwEnvError>

Automatically generated wrapper around StakingQueryMsg::Staked variant

Source

async fn unbonding_async( &self, provider: ProviderName, staker_address: impl Into<String>, staking_tokens: Vec<AssetEntry>, ) -> Result<UnbondingResponse, CwEnvError>

Automatically generated wrapper around StakingQueryMsg::Unbonding variant

Source

async fn reward_tokens_async( &self, provider: ProviderName, staking_tokens: Vec<AssetEntry>, ) -> Result<RewardTokensResponse, CwEnvError>

Automatically generated wrapper around StakingQueryMsg::RewardTokens variant

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Chain: AsyncWasmQuerier + ChainState, CwOrchQueryMsgType: Sync, SupportedContract> AsyncStakingQueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContract
where StakingQueryMsg: Into<CwOrchQueryMsgType>, SupportedContract: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,

Available on non-WebAssembly only.