pub struct App<MtApp> { /* private fields */ }
Available on crate feature
mt
only.Expand description
Wrapper around cw_multi_test::App
to provide additional functionalities.
Implementations§
Source§impl<ExecC, QueryC> App<BasicApp<ExecC, QueryC>>
impl<ExecC, QueryC> App<BasicApp<ExecC, QueryC>>
Sourcepub fn custom<F>(init_fn: F) -> Selfwhere
ExecC: CustomMsg + 'static,
QueryC: Debug + CustomQuery + 'static,
F: FnOnce(&mut Router<BankKeeper, FailingModule<ExecC, QueryC, Empty>, WasmKeeper<ExecC, QueryC>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule, StargateFailing>, &MockApi, &mut dyn Storage),
pub fn custom<F>(init_fn: F) -> Selfwhere
ExecC: CustomMsg + 'static,
QueryC: Debug + CustomQuery + 'static,
F: FnOnce(&mut Router<BankKeeper, FailingModule<ExecC, QueryC, Empty>, WasmKeeper<ExecC, QueryC>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule, StargateFailing>, &MockApi, &mut dyn Storage),
Creates new default App
implementation working with customized exec and query messages.
Source§impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> App<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> App<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>>
Sourcepub fn block_info(&self) -> BlockInfo
pub fn block_info(&self) -> BlockInfo
Returns the info of the current block on the chain.
Sourcepub fn update_block<F: Fn(&mut BlockInfo)>(&self, action: F)
pub fn update_block<F: Fn(&mut BlockInfo)>(&self, action: F)
Updates the info of the current block on the chain.
Sourcepub fn code_info(&self, code_id: u64) -> StdResult<CodeInfoResponse>
pub fn code_info(&self, code_id: u64) -> StdResult<CodeInfoResponse>
Returns CodeInfoResponse for the given code_id
.
Sourcepub fn querier(&self) -> QuerierWrapper<'_, CustomT::QueryT>
pub fn querier(&self) -> QuerierWrapper<'_, CustomT::QueryT>
Initialize a new QuerierWrapper used to call e.g. query_wasm_smart
or
query_all_balances
.
A counterpart to cw_multi_test::App::wrap
method.
Trait Implementations§
Source§impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> Querier for App<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> Querier for App<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>>
Source§fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
raw_query is all that must be implemented for the Querier.
This allows us to pass through binary queries from one level to another without
knowing the custom format, or we can decode it, with the knowledge of the allowed
types. People using the querier probably want one of the simpler auto-generated
helper methods
Auto Trait Implementations§
impl<MtApp> !Freeze for App<MtApp>
impl<MtApp> !RefUnwindSafe for App<MtApp>
impl<MtApp> Send for App<MtApp>where
MtApp: Send,
impl<MtApp> !Sync for App<MtApp>
impl<MtApp> Unpin for App<MtApp>where
MtApp: Unpin,
impl<MtApp> UnwindSafe for App<MtApp>where
MtApp: UnwindSafe,
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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 more