pub struct StargazeApp(_);

Implementations§

source§

impl StargazeApp

source

pub fn new() -> Self

Methods from Deref<Target = App<BankKeeper, MockApi, MockStorage, StargazeModule, WasmKeeper<StargazeMsgWrapper, Empty>>>§

source

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,

source

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,

source

pub fn store_code( &mut self, code: Box<dyn Contract<<CustomT as Module>::ExecT, <CustomT as Module>::QueryT> + 'static, Global> ) -> u64

This registers contract code (like uploading wasm bytecode on a chain), so it can later be used to instantiate a contract.

source

pub fn contract_data(&self, address: &Addr) -> Result<ContractData, Error>

This allows to get ContractData for specific contract

source

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

source

pub fn set_block(&mut self, block: BlockInfo)

source

pub fn update_block<F>(&mut self, action: F)where F: Fn(&mut BlockInfo),

source

pub fn block_info(&self) -> BlockInfo

Returns a copy of the current block_info

source

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, …

source

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.

source

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.

source

pub fn sudo(&mut self, msg: SudoMsg) -> Result<AppResponse, Error>

Runs arbitrary SudoMsg. 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.

Trait Implementations§

source§

impl Default for StargazeApp

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Deref for StargazeApp

source§

impl DerefMut for StargazeApp

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Querier for StargazeApp

source§

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§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.