Struct kujira_std::KujiraQuerier
source · pub struct KujiraQuerier<'a> { /* private fields */ }
Expand description
This is a helper wrapper to easily use our custom queries
Implementations§
source§impl<'a> KujiraQuerier<'a>
impl<'a> KujiraQuerier<'a>
pub fn new(querier: &'a QuerierWrapper<'a, KujiraQuery>) -> Self
sourcepub fn query_exchange_rate<T: Into<String>>(
&self,
denom: T
) -> StdResult<HumanPrice>
pub fn query_exchange_rate<T: Into<String>>( &self, denom: T ) -> StdResult<HumanPrice>
Queries the oracle module for the exchange rate of the specified denom.
This returns a HumanPrice
, which is a wrapper around Decimal
that
should be normalized before use in calculations.
pub fn query_supply_of(&self, denom: Denom) -> StdResult<SupplyResponse>
pub fn inner(&self) -> &QuerierWrapper<'a, KujiraQuery>
pub fn query_interchain_address( &self, owner: Addr, connection_id: String, account_id: String ) -> StdResult<AccountAddressResponse>
Trait Implementations§
source§impl<'a> From<&'a Deps<'a, KujiraQuery>> for KujiraQuerier<'a>
impl<'a> From<&'a Deps<'a, KujiraQuery>> for KujiraQuerier<'a>
source§fn from(deps: &'a Deps<'_, KujiraQuery>) -> Self
fn from(deps: &'a Deps<'_, KujiraQuery>) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a DepsMut<'a, KujiraQuery>> for KujiraQuerier<'a>
impl<'a> From<&'a DepsMut<'a, KujiraQuery>> for KujiraQuerier<'a>
source§fn from(deps: &'a DepsMut<'_, KujiraQuery>) -> Self
fn from(deps: &'a DepsMut<'_, KujiraQuery>) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a QuerierWrapper<'a, KujiraQuery>> for KujiraQuerier<'a>
impl<'a> From<&'a QuerierWrapper<'a, KujiraQuery>> for KujiraQuerier<'a>
source§fn from(querier: &'a QuerierWrapper<'_, KujiraQuery>) -> Self
fn from(querier: &'a QuerierWrapper<'_, KujiraQuery>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for KujiraQuerier<'a>
impl<'a> !RefUnwindSafe for KujiraQuerier<'a>
impl<'a> !Send for KujiraQuerier<'a>
impl<'a> !Sync for KujiraQuerier<'a>
impl<'a> Unpin for KujiraQuerier<'a>
impl<'a> !UnwindSafe for KujiraQuerier<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more