Struct abstract_app::traits::Accountant
source · pub struct Accountant<'a, T>where
T: AccountingInterface,{ /* private fields */ }Expand description
API for querying the Account’s asset values and accounting configuration.
§Example
use abstract_sdk::prelude::*;
let accountant: Accountant<MockModule> = module.accountant(deps.as_ref());Implementations§
source§impl<'a, T> Accountant<'a, T>where
T: AccountingInterface,
impl<'a, T> Accountant<'a, T>where
T: AccountingInterface,
sourcepub fn query_total_value(&self) -> Result<AccountValue, AbstractSdkError>
pub fn query_total_value(&self) -> Result<AccountValue, AbstractSdkError>
Query the total value denominated in the base asset The provided address must implement the TotalValue Query
sourcepub fn asset_value(
&self,
asset_entry: AssetEntry
) -> Result<Uint128, AbstractSdkError>
pub fn asset_value( &self, asset_entry: AssetEntry ) -> Result<Uint128, AbstractSdkError>
Query the asset value denominated in the base asset
sourcepub fn base_asset(&self) -> Result<BaseAssetResponse, AbstractSdkError>
pub fn base_asset(&self) -> Result<BaseAssetResponse, AbstractSdkError>
Return the proxy’s base asset
sourcepub fn assets_list(&self) -> Result<AssetsInfoResponse, AbstractSdkError>
pub fn assets_list(&self) -> Result<AssetsInfoResponse, AbstractSdkError>
List enabled assets (AssetInfos)
Trait Implementations§
source§impl<'a, T> Clone for Accountant<'a, T>where
T: Clone + AccountingInterface,
impl<'a, T> Clone for Accountant<'a, T>where
T: Clone + AccountingInterface,
source§fn clone(&self) -> Accountant<'a, T>
fn clone(&self) -> Accountant<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, T> Freeze for Accountant<'a, T>
impl<'a, T> !RefUnwindSafe for Accountant<'a, T>
impl<'a, T> !Send for Accountant<'a, T>
impl<'a, T> !Sync for Accountant<'a, T>
impl<'a, T> Unpin for Accountant<'a, T>
impl<'a, T> !UnwindSafe for Accountant<'a, T>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request