Struct sg_multi_test::StargazeApp
source · pub struct StargazeApp(_);Implementations§
source§impl StargazeApp
impl StargazeApp
Methods from Deref<Target = App<BankKeeper, MockApi, MockStorage, StargazeModule, WasmKeeper<StargazeMsgWrapper, Empty>>>§
pub fn init_modules<F, T>(&mut self, init_fn: F) -> Twhere F: FnOnce(&mut Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>, &dyn Api, &mut dyn Storage) -> T,
pub fn read_module<F, T>(&self, query_fn: F) -> Twhere F: FnOnce(&Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>, &dyn Api, &dyn Storage) -> T,
sourcepub fn store_code(
&mut self,
code: Box<dyn Contract<<CustomT as Module>::ExecT, <CustomT as Module>::QueryT>, Global>
) -> u64
pub fn store_code( &mut self, code: Box<dyn Contract<<CustomT as Module>::ExecT, <CustomT as Module>::QueryT>, Global> ) -> u64
This registers contract code (like uploading wasm bytecode on a chain), so it can later be used to instantiate a contract.
sourcepub fn contract_data(&self, address: &Addr) -> Result<ContractData, Error>
pub fn contract_data(&self, address: &Addr) -> Result<ContractData, Error>
This allows to get ContractData for specific contract
sourcepub fn dump_wasm_raw(
&self,
address: &Addr
) -> Vec<(Vec<u8, Global>, Vec<u8, Global>), Global>
pub fn dump_wasm_raw( &self, address: &Addr ) -> Vec<(Vec<u8, Global>, Vec<u8, Global>), Global>
This gets a raw state dump of all key-values held by a given contract
pub fn set_block(&mut self, block: BlockInfo)
pub fn update_block<F>(&mut self, action: F)where F: Fn(&mut BlockInfo),
sourcepub fn block_info(&self) -> BlockInfo
pub fn block_info(&self) -> BlockInfo
Returns a copy of the current block_info
sourcepub fn wrap(&self) -> QuerierWrapper<'_, <CustomT as Module>::QueryT>
pub fn wrap(&self) -> QuerierWrapper<'_, <CustomT as Module>::QueryT>
Simple helper so we get access to all the QuerierWrapper helpers, eg. wrap().query_wasm_smart, query_all_balances, …
sourcepub fn execute_multi(
&mut self,
sender: Addr,
msgs: Vec<CosmosMsg<<CustomT as Module>::ExecT>, Global>
) -> Result<Vec<AppResponse, Global>, Error>
pub fn execute_multi( &mut self, sender: Addr, msgs: Vec<CosmosMsg<<CustomT as Module>::ExecT>, Global> ) -> Result<Vec<AppResponse, Global>, Error>
Runs multiple CosmosMsg in one atomic operation. This will create a cache before the execution, so no state changes are persisted if any of them return an error. But all writes are persisted on success.
sourcepub fn wasm_sudo<T, U>(
&mut self,
contract_addr: U,
msg: &T
) -> Result<AppResponse, Error>where
T: Serialize,
U: Into<Addr>,
pub fn wasm_sudo<T, U>( &mut self, contract_addr: U, msg: &T ) -> Result<AppResponse, Error>where T: Serialize, U: Into<Addr>,
Call a smart contract in “sudo” mode. This will create a cache before the execution, so no state changes are persisted if this returns an error, but all are persisted on success.